Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
36
rated 0 times [  43] [ 7]  / answers: 1 / hits: 24286  / 13 Years ago, mon, may 9, 2011, 12:00:00

At http://trirand.com/blog/jqgrid/jqgrid.html, under New in Version 3.7 > Column Search, there is a method explained to search, and it hasn't worked yet for me. I've added:



jQuery(#toolbar).jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false});


and less essential code from the example. My server saw slightly different JSON requests, but no _search=true and no search term, ever.



http://trirand.com/blog/jqgrid/jqgrid.html also gives an incomplete example of server-side code. The SQL statement is given in the example PHP:



$SQL = SELECT item_id, item, item_cd FROM items .$where. ORDER BY $sidx $sord LIMIT $start , $limit;


but, while $sidx, $sord, $start, and $limit all have code to define them, $where is not defined (or referenced) anywhere else on the page.



How can I get a column search like the page documents, where my server is being hit by the appropriate requests?


More From » jquery

 Answers
166

The filterToolbar method should be called on the same element which you use to define the grid. Look at the working example used it.



I can't help you with the PHP part of your question, because I don't use PHP myself. Nevertheless the demo files from the jqGrid download page seems to contain some PHP code examples which could be helpful for you.


[#92323] Saturday, May 7, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
calicinthias

Total Points: 447
Total Questions: 101
Total Answers: 118

Location: Botswana
Member since Sat, Dec 31, 2022
1 Year ago
calicinthias questions
Sun, Jan 2, 22, 00:00, 2 Years ago
Wed, Jan 13, 21, 00:00, 3 Years ago
Mon, Aug 10, 20, 00:00, 4 Years ago
;