Reputation: 1409
i have this following code for displaying data , it works fine , but it does not show search icon, what things i lost in my code?
jQuery("#list2").jqGrid({
url:'post2.php',
datatype:"json",
colNames:['id','lastname','fname'],
colModel:[
{name:'id',index:'id',hidden:true, width:90},
{name:'fname',index:'fname', width:90},
{name:'lastname',index:'lastname', width:100}
],
rowNum:10, rowList:[10,20,30],
pager: '#pager2',
height:'100%',
sortname: 'id',
viewrecords: true,
sortorder: "asc", caption:"example1" });
jQuery("#list2").jqGrid('navGrid','#pager2',{search:true, searchtext:"Search"});
thanks
Upvotes: 1
Views: 3649
Reputation: 69
I realize the OP found an answer, but there is another situation to consider that affected me and might help someone else.
I had a typo in my div id
reference for the pager. I had accidentally exluded the 'r' in pager. Interestingly, my jqgrid's
pager was both intact and working. Only the "search" icon was missing (which is the same behavior the OP mentions).
Wrong :
jQuery("#list2").jqGrid('navGrid','#page2',{search:true, searchtext:"Search"});
Correct :
jQuery("#list2").jqGrid('navGrid','#pager2',{search:true, searchtext:"Search"});
Make sure your referenced id actually matches the id
from the html tag.
Upvotes: 0
Reputation: 1409
thanks oleg
i found the problem , jqgrid 3.7 dose not display search icon with jquery-ui-1.8.2.custom
and with jquery-ui-1.7.3.custom its word fine
Upvotes: 1
Reputation: 221997
The code which you posted has no errors (I don't count the switching between column names 'lastname' and 'fname' as an error). The default value searchicon:"ui-icon-search"
are used for the search icon. You should verify that you correct include jQuery UI (CSS with coresponding images) in your code.
Upvotes: 0