Forum



Am rather new to jqgrid and I have been going through the documentation.
In the search_adv.php I see
However in my post values on firebug I see and I cant find the "filters" param.
nd 1270148130165
page 1
rows 10
searchField income_types_desc
searchOper eq
searchString 5
sidx income_types_desc
sord asc
What am I missing in my script?
<!-- the grid definition in html is a table tag with class 'scroll' -->
<table id="list" class="scroll" cellpadding="0" cellspacing="0"></table>
<!-- pager definition. class scroll tels that we want to use the same theme as grid -->
<div id="pager" class="scroll" style="text-align:center;"></div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#list").jqGrid({
width: 900,
height: 240,
autowidth: false,
rownumbers: true,
rownumWidth: 40,
url:'<?php echo $this->baseUrl() ?>/incometypes/list',
datatype: 'json',
mtype: 'POST',
colNames:['ID','Description','Budget Amount','Budget Period'],
imgpath: '<?php echo $this->baseUrl() ?>/js/themes/coffee/images',
colModel :[
{name:'id', index:'id',
width:10,
hidden:true
},
{name:'income_types_desc', index:'income_types_desc',
width:50,
sortable:true,
editable:true,
editoptions:{size:20}
},
{name:'income_types_budgetamount', index:'income_types_budgetamount',
width:30,
sortable:true,
editable:true,
editoptions:{size:20},
search:true,
searchoptions:{sopt:['eq','ne','lt','le','gt','ge']}
},
{name:'income_types_budgetperiod', index:'income_types_budgetperiod',
width:40,
sortable:true,
editable:true,
edittype:"select",
editoptions:{value:"<?php echo $values?>"}
}
],
pager: $('#pager'),
rowNum:10,
rowList:[10,20,30],
sortname: 'income_types_desc',
sortorder: "asc",
viewrecords: true,
viewsortcols: [true,'horizontal',true],
gridview: false,
hidegrid: false,
editurl:"<?php echo $this->baseUrl() ?>/incometypes/edit",
caption: 'Define Your Various types of Income',
forceFit : true
});
$("#list").jqGrid('navGrid','#pager',
{add:true,addtext:'Add',edit:true,edittext:'Edit',del:true,deltext:'Delete',search:true,searchtext:'Search',refresh:true,refreshtext:'Refresh'},
{url:'<?php echo $this->baseUrl() ?>/incometypes/edit',
closeAfterEdit:'true'},
{url:'<?php echo $this->baseUrl() ?>/incometypes/add',
closeAfterAdd:'true'},
{url:'<?php echo $this->baseUrl() ?>/incometypes/delete',closeAfterAdd:'true'},
{closeOnEscape:true, multipleSearch:true, closeAfterSearch:true },
{multipleSearch:true} // search options
);
});
</script>
17:59

Moderators
30/10/2007

Hello,
Yes the default search is a single search. You missed to see the code on how the multiple Search should be set - in the same example.
(Instead use multipleSearch set to true)
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
106 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66