I have a Hierarchical Grid with two bands. Both bands have a column called 'DELETE_ROW' which is set to a type of Infragistics.WebUI.UltraWebGrid.ColumnType.Button. I am handling the cell button click event with the following code:
function SearchResults_ClickCellButton(gridId, cellId) { var grid = igtbl_getGridById(gridId); var row = igtbl_getRowById(cellId);
//check top level grid switch (cellId) { //case grid.Rows.getRow(row.getIndex()).getCellFromKey('DELETE_ROW').Id: case row.getCellFromKey('DELETE_ROW').Id: row.deleteRow(); break; //case grid.Rows.getRow(row.getIndex()).getCellFromKey('DETAILS').Id: case row.getCellFromKey('DETAILS').Id: row.editRow(); break; } }
This works great if I delete a row from Band(0), however when I delete the last row in Band(1) I get a javascript error in ig_WebGrid_cb.js within the igtbl_showColButton function. I am using IE 6 SP2
What am I mising here? Do I need to do something special? If I continue through all of the errors, my row is deleted but the parent row's expansion indicator is still visible. Ideally, I'd like to be able to remove the row and also have the expansion indicator be hidden if there are no child rows.