I have a grid which looks like this:
@(Html.Kendo().Grid()
.Columns(columns =>
{
foreach (var fieldId in listOfFieldIds)
{
columns.Bound(o => o.DictionaryOfFieldIdsToValues[id].Value);
}
}
.DataSource(dataSource =>
{
dataSource.SignalR()
.Filter(filter =>
{
filter.Add(o => o.DictionaryOfFieldIdsToValues["MyId123"].Value).Contains("hello world");
});
})
});
Programmatically setting the filter is not working as expected:
1) the column which corresponds to MyId123 does not get the filter in its header menu
2) on inspecting the filter in parameterMap, the filter has been applied as a filter collection, like so
{logic: "and", filters: Array(1)}
filters: Array(1)
0:
filters: Array(1)
0: {field: "DictionaryOfFieldIdsToValues["MyId123"].Value", operator: "contains", value: "hello world"}
length: 1
logic: "and"
length: 1
When a user filters the column themselves it works as expected (parameterMap shows this)
{logic: "and", filters: Array(1)}
0: {field: "DictionaryOfFieldIdsToValues["MyId123"].Value", operator: "contains", value: "hello world"}
length: 1
logic: "and"