I have stumbled upon a problem using Kendo UI with ASP.NET MVC Wrappers. I am applying intial filters in a extension method on GridBuilder like this:
public static GridBuilder<T> Test<T>(this GridBuilder<T> builder)
where T : class
{
var filters = new List<IFilterDescriptor>();
filters.Add(//adding my filters)
return builder.DataSource(s => s.Server().Filter(f => f.AddRange(filters)));
}
The problem appears when I for example sort a specific column and Kendo creates its query string:
?Grid-sort=FName-desc&Grid-page=1&Grid-pageSize=10&Grid-group=&Grid-filter=
What happens is that Grid-filter= overrides my intial filters causing them to not be applied anymore. The exception is when i apply one of my own filters before Kendo creates its query string, then my filter gets added to the query string and everything is fine and dandy.
Is there a way to prevent Kendo from overriding my intial filters?
Thanks in advance.
public static GridBuilder<T> Test<T>(this GridBuilder<T> builder)
where T : class
{
var filters = new List<IFilterDescriptor>();
filters.Add(//adding my filters)
return builder.DataSource(s => s.Server().Filter(f => f.AddRange(filters)));
}
The problem appears when I for example sort a specific column and Kendo creates its query string:
?Grid-sort=FName-desc&Grid-page=1&Grid-pageSize=10&Grid-group=&Grid-filter=
What happens is that Grid-filter= overrides my intial filters causing them to not be applied anymore. The exception is when i apply one of my own filters before Kendo creates its query string, then my filter gets added to the query string and everything is fine and dandy.
Is there a way to prevent Kendo from overriding my intial filters?
Thanks in advance.