Hello everybody.
I have an interface with a tree of kendo grids made with detail grids. These grids are built dinamically depending on how many levels the loaded data has. The data comes from outside the grid, so it is set manually. Everything ok until here. The thing is that I need all the detail grids rendered at the load of the interface, so I did a routine which expands and collapses all details only to make sure they (their html in DOM)are all generated. But this routine becomes slow and sometimes freezes the tab for a few seconds while executing if the data is somewhat big. What I want to ask is if there is any other way to do that with more performance than the way I did. Here is the demo: http://dojo.telerik.com/@marcio/OKiPARAb.
The routine is as below:
let generateDetailAllLevelsRecursive =
function
generateDetailAllLevelsRecursive($grid) {
let grid = $grid.data(
"kendoGrid"
);
$grid.find(
".k-master-row"
).each(
function
() {
let $row = $(
this
);
grid.expandRow($row);
generateDetailAllLevelsRecursive($row.next(
".k-detail-row"
).find(
".k-grid"
));
grid.collapseRow($row);
});
};
Thanks in advance.