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!
Hello Alexander,
Inform me if you need additional assistance with this question.
Thank you, David!
I will try the suggested approach, and probably will prepare small sample that demonstrates my problem with custom behaviour.
Alexander.
Hi Alexander,
No there is no method that does this. You would need to actually set display none (or a css that has display none) to the image of the expansion column. row.get_element().childNodes[0] is the expansion cell without grouping.
-David
Hi, David!
How can I hide expansion indicator? Is there a corresponding method>
Alexander
Hi,
I am not sure what is wrong with your behavior. Perhaps you should implement IInheritableBehavior, too. As for the child grids, that is expected. It is what this interface does. What you could do is go through the parent rows and collapse children that have 0 rows and hide the expansion indicator.