Hi,
I've tried it and it works, thank you ;)
On a different page I tried the same approach, but it didn't work. On this page I need all ClientDetailTemplates to be expanded, when the page is loaded. So I call this function in the document.ready handler:
function
expandRows() {
var
grid = $(
'#commissionGrid'
).data(
'kendoGrid'
);
var
rows = grid.tbody.find(
'>tr.k-master-row'
);
for
(
var
i = 0; i < rows.length; i++) {
grid.expandRow(rows.eq(i));
}
}
When I use this function to expand all rows, I receive an exception in the detailInit handler. which says, the the dataSource on 'undefined' cannot be found. It seems like the Grid with the specified ID (#Products_+Name in your example) cannot be found at this point in time. I populate the grid with the "BindTo" method to my model, so I dont have to wait for an additional request to be finished.
Do you know what could be the problem here? Or is there another way to expand all rows when the page is loaded?
Greets