开发者

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 a开发者_如何学Cpplied i.e 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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜