Easygrid
Easygrid copied to clipboard
Question - is it possible to set initial filter for particular column (but changable by user)
Hi,
Lets say i have a column 'date', and I would like it to be set to today date whenever user loads the page, however he should be able to change it to some past date. Is there a way to set the default value in filterClosure which would be loaded every time, but with option to change it by user?
Basically, you want to set a default value in the search input element for that column?
If yes you should use: searchoptions.defaultValue
see: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:search_config
What if you want to pass a parameter to the initialCriteria closure when the grid loads, so the user can select a new date range to load and pass as "params" or so when the grid is called initially?
Thanks for the answer. Actually my case is little bit more tricky because the initial filter should be "is null" for that particular column. I'm not sure but i think I can't achieve that using only jqgrid options (how to handle null value), I thought there is some backend way to achieve that (something like globalFilterClosure for only first request)..
Oh, so you want to filter the rows where that date "Is null" ?
Umm, this should be possible, but it's not implemented in the current version.