admin管理员组

文章数量:1414908

How to find all the expanded or collapsed rows in Kendo UI grid hierarchy? I can find the count of all the masterrow using below code but I want to interate through each and check which all are expanded.

var grid = $("#gridList").data("kendoGrid");
var allMasterRows = grid.tbody.find('>tr.k-master-row') 

I have tried below code but it does not work

var strPlus = (grid.tbody.find("k-icon k-plus"));

Please suggest.

How to find all the expanded or collapsed rows in Kendo UI grid hierarchy? I can find the count of all the masterrow using below code but I want to interate through each and check which all are expanded.

var grid = $("#gridList").data("kendoGrid");
var allMasterRows = grid.tbody.find('>tr.k-master-row') 

I have tried below code but it does not work

var strPlus = (grid.tbody.find("k-icon k-plus"));

Please suggest.

Share Improve this question edited May 28, 2015 at 17:12 Piyush asked May 28, 2015 at 16:38 PiyushPiyush 4291 gold badge13 silver badges24 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

You can use these to find the expanded or collapsed rows:

var expandedRows = $('.k-detail-row:visible');
var collapsedRows = $('.k-detail-row:hidden');

If you're looking for the icons, your selector is off...it should be:

var strPlus = (grid.tbody.find(".k-icon.k-plus"));

本文标签: javascriptHow to find all the expanded or collapsed rows in Kendo UI grid hierarchyStack Overflow