I use WebHierarchicalDataGrid with two levels.
I need to implement following scenario:
1. The grid's initially populated only with first-level rows. (the rows have no child rows)
2. User does some action (for ex. clicks on a button) and a child row is added to the selected parent row.
I've done it in following way:
var selectedRow = getSelectedRow(); var childGrid = selectedRow.get_rowIslands()[0]; var row = new Array(""); childGrid.get_rows().add(row);
This approach works fine if parent row already has at least one child row, but if there is no child rows I get null reference exception: selectedRow.get_rowIslands() returns empty array.
Please help!
Hi Alexander,
The child grid has to actually exist on the client for this to work. If you have the RowAdding behavior turned on in the child, then an empty grid will be made.
regards,David Young
Hi, David!
RowAdding behaviour is off, because
1. I add new rows using my own button (not inline functionality) and I don't want this additional line (that allows to add new rows) will be shown.
2. I don't want that empty child grid will be shown for the user (it looks not good)
Is it possible to workaround theese problems?
Alexander