Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1250
Impossible to add child row on the client side if parent row is emtpy
posted

 

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!

 

Parents Reply Children
No Data