How to Handle grid selection model in accordion layout in
collapsed mode.
Problem: I have
three grid which are within accordion layout.
I have to select the record in gird which is collapsed mode first time view is
loaded.
We are getting error as view is not available in collapse mode.
Solution : we need to handle like below code. Need to add listener
to grid to select the grid data after grid expanded first time.
Source Code:
if (grid.collapsed
!== true) {
grid.getSelectionModel().select(recordArray,
true, false);
} else {
grid.addListener('expand', function() {
grid.getSelectionModel().select(recordArray, true, false);
}, grid, {
single: true
});
}
No comments:
Post a Comment