Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






Filter/Search

UserPost

22:53
29/05/2012


marcelocr2

New Member

posts 2

Hi, I am new to jqgrid and I wanty to filter/search data, but I dont know how to change de php file, I am using this in HTML file

$("#srccontents").filterGrid("list",{ gridModel:true, gridNames:true, formtype:"vertical", enableSearch: false, enableClear: false, autosearch: true });

and the query in php file is:

$SQL = "SELECT id, nombre, descripcion FROM desc_examenes ORDER BY $sidx $sord LIMIT $start , $limit"; 


I suppose i should include the where clause, but I dont know how to get the value the user wnats to search

Thank you

00:23
31/05/2012


marcelocr2

New Member

posts 2

Ji, I made some changes and I can search now using the navigation bar, but I want to make the search usig the filtertoolbar too.

        $("#list").jqGrid('filterToolbar',{stringResult: true, searchOnEnter : false, defaultSearch: 'cn'});$("#list").jqGrid('navGrid','#pager',{edit:false,add:false,del:false});


Every time I use the filtertoolbar it doesn send any parameters to the server so the query looks like this:

SELECT id, nombre, descripcion FROM desc_examenes WHERE '' ORDER BY nombre asc

I dont know why I am not capturing the parameters with the toolbar

Thank You


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

31 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9596

Posts: 28792

Membership:

There are 10195 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7010 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information