tags:

views:

173

answers:

2

hello all, 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

A: 

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.

Oleg
A: 

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

user1400
In general jqgrid 3.7.x works fine with jQuery UI 1.8.2. I use this combination for example. One more general remark. You should better write a comment to my answer instead of writing your own answer. In case of writing of comment I'll receive a notification and can read your answer. Now I read your answer randomly. But I am glad that your problem is solved.
Oleg