This is a migrated thread and some comments may be shown as answers.

Grid - How to iterate the Filter options for multiple columns in the ParameterMap function?

0 Answers 260 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Guna
Top achievements
Rank 1
Guna asked on 29 Mar 2012, 04:45 PM
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);
                                }
                            }                            
                            
                        }

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Guna
Top achievements
Rank 1
Share this question
or