I have set 'filterable' and 'serverFiltering' to 'true for a Kendo UI Grid.
In the 'parameterMap' function I am able to get the 'options.filter.logic' and iterate the 'options.filter.filters' array to get the filter values for a single column.
Suppose if the user tries to filter the grid on multiple columns, How can i achieve the above?
The 'options.filter' should be an array so that I could get the 'logic' for each column's filter and so on.
Or Am I misunderstanding this? Is there any other way to get the filter values of multiple columns?
Here is that code snippet.
parameterMap: function (options)
{
if (options.filter)
{
alert(options.filter.logic);
alert(options.filter.filters.length);
for(var i = 0; i < options.filter.filters.length; i++)
{
alert(options.filter.filters[i].field);
alert(options.filter.filters[i].operator);
alert(options.filter.filters[i].value);
}
}
}
In the 'parameterMap' function I am able to get the 'options.filter.logic' and iterate the 'options.filter.filters' array to get the filter values for a single column.
Suppose if the user tries to filter the grid on multiple columns, How can i achieve the above?
The 'options.filter' should be an array so that I could get the 'logic' for each column's filter and so on.
Or Am I misunderstanding this? Is there any other way to get the filter values of multiple columns?
Here is that code snippet.
parameterMap: function (options)
{
if (options.filter)
{
alert(options.filter.logic);
alert(options.filter.filters.length);
for(var i = 0; i < options.filter.filters.length; i++)
{
alert(options.filter.filters[i].field);
alert(options.filter.filters[i].operator);
alert(options.filter.filters[i].value);
}
}
}