EasyUI入門5 給combobox增加選擇事件
阿新 • • 發佈:2019-01-23
當combobox選擇了某一項之後,直接觸發動作返回資料集
//選擇專業重新整理採購包列表.datagrid({ loadFilter: pagerFilter })
$('#ddlDiscipline').combobox({
onSelect: function (row) {
if (row != null) {
$.ajax({
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
url: "../../Controller/Interface/POtoPriceLib.ashx?Action=Refresh" ,
type: "get",
data: {
"DisciplineName": encodeURIComponent(row.專業名稱),
"PurchaseNumber": encodeURIComponent($('#PurchaseNumber').textbox('getValue'))
},
dataType: "json",
success: function (data) {
$("#dg").datagrid("options").pageNumber = 1;
$("#dg").datagrid("loadData", data);
}
});
}
}
});