This is (in short) my Grid code:
@(Html.Kendo().Grid<Model>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.From).Format("{0:dd.MM.yyyy}").Width(150).Filterable(f => {
f.UI("DateTimeFilter");
f.Cell(cell => cell.ShowOperators(false));
});
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.Contains("Contains")
).ForDate( date => date.Clear()
.IsGreaterThan("After")
.IsLessThan("Before")
)
.ForNumber(number => number.Clear()
.IsGreaterThan("Higher than")
.IsLessThan("Lower than")
))
)
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Read(read => //get some data)
)
)
The fact is that p.From is treated as a String (so he gets the filter of a string = .ForString(...)).
How is this possible? the format is also not aplied, but that works when i do this: .ClientTemplate("#= From? kendo.toString(kendo.parseDate(From), 'dd/MM/yyyy') : '' #")
Anybody expirienced this problmen yet?