This project is read-only.

Column default filter

Jan 7, 2013 at 3:08 AM

Is it possible to add a default filter to a  grid column

Jan 9, 2013 at 11:25 AM


Can you explain: what you mean by default filter? You can make column filterable. This is described in the Filtering section of documentation

Jan 10, 2013 at 11:34 PM


I'd like to pre-set filter type and value. For example, I want to have initial Type as 'Contains' for some columns, not 'Equals'.

Even more, I want to have filter as Type = 'Contains' and value = 'Running' and my grid filtered when I open my page. May be I just do not know how to do it. I'm working on mvc 2.

Jan 11, 2013 at 5:25 AM

There is no methods to setup initial filter settings for the columns (when query string settings is empty) like sorting (SortInitialDirection method).

I'll add this functionallity in the next release od Grid.Mvc, but now you can define filter settings by redirecting user to special URL, that setup filter by query string, like: /?grid-filter-col=OrderID&grid-filter-type=1&grid-filter-val=10976 - filter by OrderID column, filter type = equals, value - 10976

If you have any questions, please let me know.

Oct 28, 2014 at 5:38 PM

Is this functionality in the latest version of the grid? Is it possible I can set the default filter type for a column. Eg. If user type in a search term and press enter it will do the contains filter type?
Nov 26, 2014 at 5:58 PM
Do you know if there is any progress with that feature?