我有一個與asp.Net Web Forms一起使用的jqGrid,它正確顯示了數據庫中所需的信息,但是它也顯示了搜索選項,但是如果我嘗試搜索,可以說等于Lijo的名字,它只是沒有顯示該記錄。該記錄存在。我知道我確實缺少某些肯定要搜索的東西,這是代碼<script type="text/javascript"> $(function() { $("#UsersGrid").jqGrid({ url: 'ModCust.ashx', datatype: 'json', height: 250, width: 800, colNames: ['Application No', 'First Name', 'Middle Name', 'Last Name'], colModel: [ { name: 'cApplicationNo', index: 'cApplicationNo', width: 100, sortable: true}, { name: 'cFirstName', width: 100, sortable: true}, { name: 'cMiddleName', width: 100, sortable: true }, { name: 'cLastName', width: 100, sortable: true }, ], cmTemplate: { title: false}, rowNum: 10, rowList: [10, 20, 30], pager: '#UsersGridPager', sortname: 'cApplicationNo', viewrecords: true, sortorder: 'asc', caption: 'Customer Details' }); $("#UsersGrid").jqGrid('navGrid', '#UsersGridPager', { edit: false, add: false, del: false }); }); </script>這是我的ModCust.ashx處理程序using System;using System.Collections.Generic;using System.Collections.ObjectModel;using System.Data;using System.Data.SqlClient;using System.Web;using System.Web.Script.Serialization;namespace CwizBankApp{ public struct JQGridResults { public int page; public int total; public int records; public JQGridRow[] rows; } public struct JQGridRow { public string id; public string[] cell; }
- 1 回答
- 0 關注
- 505 瀏覽
添加回答
舉報
0/150
提交
取消