Delete subgrid from grid, removing +/i

I have the subgrid working and depending the action a user takes, I want to remove the subgrid along with the plus / minus signs (+ / -).

I thought it would work something like this
var subgrid = maingrid.cells(row,col).getSubGrid();

if (subgrid) {
subgrid.destructor();
}

How do I completely remove a subgrid and have main grid look like it was never there?

Thank you,

Rich

Hello.

Please, try to change the cell type from the “sub_row_grid” to some other type. Like:

bbyDRgrid.setCellExcellType(rowId,0,"ed"); //remove the subgrid
bbyDRgrid.cells(rowId,0).setValue(""); //reset the cell value

Thank you. It didn’t work, but after some trial and error, this worked.

subgrid.destructor();
grid.setCellExcellType(row,0,‘’);
grid.cells(row,0).setValue(‘’);

Thanks again.

Rich