views:

23

answers:

1

Hi I have an MVC application and in that i am using telerik grid to display the list . I am also using filtering option on the column. Is is possible to know on which column the current filtering is applied i.e to get the column name and value or if possible to highlight thoes column.

Thanks supriya

A: 

You can use the following jQuery statement to find the filtered column elements:

$('th:has(.t-active-filter)');

It will return the column header (the element). You can obtain the column index easily:

var index = $('th:has(.t-active-filter)').index();

And then get the column JavaScript object:

var grid = $('#Grid').data('tGrid');
var column = grid.columns[index];
korchev
i am new to it can u please help me out where i have to mention it.Is it to be placed under script tag.Also can we get all multiple column names if filtering is applied on more than one column
Yes, this is JavaScript code and it should be put inside a script tag. The first statement will actually return all column elements which have filter applied.
korchev
is it possible to change the funnel color on telerik grid when the filtering is applied to a column.