0
我正在嘗試使用PHP MVC結構的JqGrid。 我不想使用Jq Grid的搜索功能,而是我想要一般關鍵字搜索。 我在json數組中有數據。請讓我知道如何使用我的json數據集執行搜索。在JqGrid中的Custome搜索表單
該搜索應該在多列上執行。
這是我的搜索形式
<form name="frmsearch" id="frmsearch">
<input type="text" id="txtsearch" name="txtsearch"/>
<a href="javascript:void(0);" onClick="doSearch();">Search</a>
</form>
,這是我的網
$(document).ready(function() {
jQuery("#agentlist").jqGrid({
url: "manageagents/getagents/",
datatype: "json",
mtype:"POST",
jsonReader: {
root: "rows",
page: "currpage",
total: "totalpages",
records: "totalrecords",
id: "0",
cell:"",
repeatitems: false
},
colNames: ['Id','Agent Name', 'Email Address', 'Phone No.1', 'Phone No.2','City', 'State', 'Country'],
colModel: [
... ... ...
],
rowNum:<?php echo $this->config->item('per_page');?>,
rowList:<?php echo $this->config->item('nav_page');?>,
pager: '#plist',
autowidth: true,
height: "100%",
loadonce: true,
viewrecords: true,
altRows:true,
caption: "",
}).navGrid('#plist', { edit: false, add: false, del: false, search: true, refresh: false }); ;
});
請讓我知道,如果需要更多的信息。
它的作品。謝謝 !!! – pinaldesai 2012-03-06 10:14:35
@pinaldesai:不客氣! – Oleg 2012-03-06 10:17:36