Forum

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

Search Forums:


 






jqgrid filtering

No Tags
UserPost

12:34
23/08/2010


asb1986

Member

posts 7

Hello… Iwant to implement filtering in my jqgrid… May i know how to start with this????? ANy ample code, documentation telling how to use filtering in this… I am using jqgrid in my spring mvc3.0 project…..

13:19
23/08/2010


OlegK

Germany

Member

posts 1210

Hello!

The answer on your question depends a little how you interpret the "filtering". If you want use some external controls (selects, checkboxes and so on on the same page where you have jqGrid) to filter your data I recommend you to read http://stackoverflow.com/quest…..19#2928819

If you want to implement data filtering inside of jqGrid you can choose between serching with respect of "search" and reset of serching results with respect of "refresh" buttons of the navigator (simple searching and advanced searching), the usage of toolbar searching (conside the usage of stringResult: true to be more conform with other form of searching) and custom searching.

If you deceide to use advance searching you can just add string filter parameter to the (see http://stackoverflow.com/quest…..55#3371155) action which provide the grid data or add three string parameters searchField, searchString, searchOper if you want to use simple searching feature. In all cases you will have to add WHERE to the SELECT statments which will be constructed in your program based on the values of the new parameters.

Probably other people post you more urls to the good full code examples which you could use.

Best regards
Oleg

13:21
23/08/2010


asb1986

Member

posts 7

Thanks for your reply… Its like i want to filter my records depending on dates…. as in… "from" date till "to" date… in such a case, how to go about this thing… and secondly, database hit should be minimum….

13:23
23/08/2010


asb1986

Member

posts 7

one more thing i wish to ask… does spring mvc3.0 affect any coding of this filtering facilty???? cos i find jqgrid examples with php and asp.net mvc… but i hardly could find any examples for spriing mvc3.0….

13:54
23/08/2010


OlegK

Germany

Member

posts 1210

I don't use Spring Framework myself, so I could not help you with any Spring MVC 3.0 examples. Some general solution is more common. For example in ASP.NET MVC solutions I prefer don't fill the data in the grid directly using MVC. Instead of that I provide a JSON web service (implemented as a part of ASP.NET MVC solutions or as WFC service which are the part of the same web site) which uel I place in jqGrid parameter. So you should just invest in the writing on business logic in form of JSON/XML web service which provide the data. The most jqGrid specific code you can write in JavaScript. So you can share the experience of other people in the usage of jqGrid and have a clear separation of HTML code from the business logic. Moreover JSON/XML web services can be better tested for example with respect of unit tests.

By the way is the question http://stackoverflow.com/quest…..-filtering are yours?

Regards
Oleg 

16:21
21/09/2010


asb1986

Member

posts 7

Sorry Oleg.. But yes… I had posted the same qs in stack overflow too… I am stuck with jqGrid for implementing sorting, paging, filtering at the server side… I dont know how to start… So posting questions..

No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

215


Currently Online:

41 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 10274

Posts: 30361

Membership:

There are 11038 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1210

markw65 – 179

kobruleht – 144

phicarre – 132

YamilBracho – 124

Renso – 118

Administrators: admin (60 Posts)

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




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information