leora
leora

Reputation: 196679

in jqgrid, is there anyway to support greaterthan and lessthan in the toolbar search

i know i can support this by using the advanced search but people are finding it a bit cumbersome. It would be cool if i could support something like this right in the toolbar search:

< 100

or

11-Dec-2010

by just entering this string above in the toolbar textbox. is there anyway for jqgrid to support this

Upvotes: 0

Views: 1972

Answers (1)

Oleg
Oleg

Reputation: 221997

You can define one compare operation for the column used in the searching toolbar (see the answer). If the first operation in the sopt array of searchoptions for the corresponding column is 'lt' or 'le' the operation will be used for the filtering:

searchoptions: {sopt:['lt','eq','ne','le',...] }

The full set of values from sopt will be used for the "Adnanced Searching"

Upvotes: 2

Related Questions