简体   繁体   中英

How to know the colmn on which filtering is applied on telerik grid in MVC

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 ie to get the column name and value or if possible to highlight thoes column.

Thanks supriya

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];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM