cellGroups not completely removed when removing column?

Hello,

I have a Grid which looks like this
http://screencast.com/t/qMkZdSg5iOf
, where I can add and delete columns dinamically.

When I select delete column 1, I want all columns below the header 1 to be removed. In order to do that I’m using this in a loop:

grid.removeColumn(propertyId); But when removing columns I get the following exception, thrown by Grid.sanityCheck():


java.lang.IllegalStateException: Not all merged cells were in a continuous range.

When debugging my code I see that this

grid.getHeaderRow(0).getRowState().cellGroups.keySet()

returns [[2, 3, 4]
, [5, 6, 7, 8]
] before removing any columns, then, inside my loop, keys 5 and 6 are removed, but 7 and 8 are not. As I result I get the above exception…

I don’t understand why some of the keys are being removed and others aren’t… Actually if I debug deeper, in the Grid.internalRemoveColumn(), inside this remove method: getState().columnOrder.remove(columnKeys.key(propertyId)); it seems that the keys
do
get removed…!

Any help is much appreciated.
Thalia

Did you ever figure this out?