懒得找,存个笔记:easyui combogrid 下拉+关键字搜索

var product;
$.ajax({
url: '请求数据地址',
type: "post",
async: false,
dataType: "json",
success: function (result) {
product = result;
}
});
$('#txtSalesMan').combogrid({
methord: 'post',
idField: 'UserName',
textField: 'TrueName',
panelHeight: '200',
columns: [
[
{ field: 'UserName', title: '用户名', 100 },
{ field: 'TrueName', title: '真实名称', 100 }
]
],
onChange: function (q) {
doSearch(q, product, ['UserName', 'TrueName'], $(this));
},
onShowPanel: function () {
$(this).combogrid('grid').datagrid('loadData', product);
}
});

原文地址:https://www.cnblogs.com/sunshine-wy/p/14009803.html