ASP.NETMVC2.0在jqGrid中搜索的实现嗨,我正在尝试使用jqGrid中使用MVC 2在.NET中的单列搜索(VS 2008)-这是我到目前为止拥有的代码,但我需要一个示例来匹配它,或者我缺少的一个提示jQuery("#list").jqGrid({
url: '/Home/DynamicGridData/',
datatype: 'json',
mtype: 'POST',
search: true,
filters: {
"groupOp":"AND",
"rules": [
{"field":"Message","op":"eq","data":"True"}
]
},
multipleSearch: false,
colNames: [ 'column1', 'column2'],
colModel: [
{ name: 'column1', index: 'column1', sortable: true, search: true,
sorttype: 'text', autoFit: true,stype:'text',
searchoptions: { sopt: ['eq', 'ne', 'cn']} },
{ name: 'column2', index: 'column2', sortable: true,search: false,
sorttype: 'text', align: 'left', autoFit: true}],
pager: jQuery('#pager'),
rowNum: 10,
rowList: [10, 60, 100],
scroll: true,
sortname: 'column2',
sortorder: 'asc',
gridview: true,
autowidth: true,
rownumbers: true,
viewrecords: true,
imgpath: '/scripts/themes/basic/images',
caption: 'my data grid'});jQuery("#list").jqGrid('navGrid', '#pager', {add: false, edit: false, del: false},
{}, {}, {}, { multipleSearch: true, overlay: false });//jQuery("#list").jqGrid('filterToolbar',
{stringResult:true, searchOnEnter:true});jQuery("#list").jqGrid('navButtonAdd', '#pager',
{ caption: "Finding", title: "Toggle Search Bar",
buttonicon: 'ui-icon-pin-s',
onClickButton: function() { $("#list")[0].toggleToolbar() }
});jQuery("#list").jqGrid = {
search : {
caption: "Search...",
Find: "Find",
Reset: "Reset",
odata : ['equal', 'not equal','contains'],
groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
matchText: " match",
rulesText: " rules"
}} });分页有两样东西没有出现并进行搜索,尽管我打开了搜索窗口,其中只有hte列1作为选项;单击find时,它似乎加载了网格,但实际上没有匹配我在文本框中键入的值。
1 回答
- 1 回答
- 0 关注
- 292 浏览
添加回答
举报
0/150
提交
取消