I have a nested grid and want to get the height of the subgrids to vary according to number of dataset rows in order to prevent vertcal scrolling in subgrids.
I found a solution by setting each rowdetails with in the desired height, in the bindingcomplete event, like shown beneath.
The problem with this solution, is that it makes redering of the grid extremely slow (say you have 100 rows).
Is there a better way to set different rowdetails height?
$(grid).bind(‘bindingcomplete’, function (event) {
if (event.target.id == name && rowDetailsCount >= 0) {
$(id).jqxGrid(‘beginupdate’);
var datainformation = $(id).jqxGrid(‘getdatainformation’);
for (i = 0; i < datainformation.rowscount; i++) {
var detailsRowHeight = 25;
var detailsHeaderHeight = 25;
var factor = 0.15;
var height = ((detailsRowHeight + factor) * rowDetailsCount) + detailsHeaderHeight;
$(grid).jqxGrid('setrowdetails', i, "
“, height, true);
}
$(id).jqxGrid(‘endupdate’);
}
});