ASP.NET MVC Kendo UI value for data source data filter is null

I am trying to dynamically add mesh filters in my view using the html helper using the data source configuration, as this example is from the kendo documentation :

@(Html.Kendo().Grid<Product>() .Name("grid") .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("Products_Read", "Home")) .Filter(filters => { if (someCondition){ // Show products whose ProductName property contains "C" filters.Add(product => product.ProductName).Contains("C"); // and UnitsInStock is greater than 10 filters.Add(product => product.UnitsInStock).IsGreaterThan(10); } }) ) ) 

Filters are added, but filterdescriptor.Value is always null in each case (members and operator are ok).

Any help is greatly appreciated. Thank you --Berry

+4
source share
1 answer

Make sure you enable kendo.aspnetmvc.min.js. Lack of this will lead to similar symptoms.

+3
source

Source: https://habr.com/ru/post/1485101/


All Articles