jquery ui combogrid 查詢
jquery:

1 $("#StallName").combogrid({ 2 panelWidth: 450, 3 idField: 'Value', 4 textField: 'Text', 5 pageSize: 10, //每頁顯示的記錄條數,默認為10 6 pageList: [10], //可以設置每頁記錄條數的列表 7 method: 'post', 8 fit: true, //自動大小 9 rownumbers: true, //序號 10 fitColumns: true, 11 striped: true, 12 editable: false, 13 pagination: true, //是否分頁 14 url: '/DetectInfo/ArchivesInfo?name=' + pName, 15 columns: [[ 16 { field: 'Value', title: '攤主編號', width: 60 }, 17 { field: 'Text', title: '攤主名稱', width: 60 }, 18 { field: 'GUID', hidden: true } 19 ]], 20 onDblClickRow: function (rowIndex, rowData) { 21 if (rowData) { 22 StallNoValue(rowData); 23 } 24 }, 25 onClickRow: function (rowIndex, rowData) { 26 if (rowData) { 27 StallNoValue(rowData); 28 } 29 }, keyHandler: { 30 31 up: function () { 32 33 }, 34 down: function () { 35 36 }, 37 enter: function () { 38 39 }, 40 query: function (q) { 41 42 $('#StallName').combogrid("grid").datagrid("reload", { 'keyword': q }); 43 $('#StallName').combogrid("setValue", q); 44 } 45 46 } 47 });
.net:

1 public string ArchivesInfo() 2 { 3 string keyword = Request["keyword"] ?? string.Empty; 4 int pageIndex = Convert.ToInt32(Request.Params["page"]); 5 int rows = Convert.ToInt32(Request.Params["rows"]); 6 var list = _IDetectInfoService.QueryArchivesInfo(pageIndex, rows, keyword, ConfigurationStatus.DeleteStatus); 7 var result = helper.ToJson(list); 8 return result; 9 }