Clearing merge cell information

I'm trying to clear all of the merge information so that when I repopulate my grid the merge information isn't persisted from the old data. However I've now got all manner of ResetVolatileData() calls and still the merge cell infromation persists.

MainGrid.InvalidateRange(GridRangeInfo.Table());
MainGrid.ResetGridCells();
MainGrid.ResetBanneredRanges();
MainGrid.ResetColWidthEntries();
MainGrid.ResetColHiddenEntries();
MainGrid.ResetRowHeightEntries();
MainGrid.ResetRowHiddenEntries();

MainGrid.EndUpdate(false);
MatchingGrid.EndUpdate(false);

// Force them to requery col count etc..
MainGrid.Refresh();
MainGrid.ResetVolatileData();

What am I missing?

4 Replies

HA haneefm Syncfusion Team May 21, 2007 03:41 PM UTC

Hi Richard,

Try calling the CoveredRanges.Clear method to rese all the covered ranges in a grid.

this.grid.Model.CoveredRanges.Clear();

Best regards,
Haneef


RM Richard Mitchell May 22, 2007 09:10 AM UTC

Nope that doesn't seem to work. If I have 8 columns in first time I view I merge 4 pairs of columns. Then when I switch and have about 10000 columns still only the first 4 pairs of columns have been merged.

I'm using the grid virtually if you think that makes a difference.


HA haneefm Syncfusion Team May 22, 2007 06:23 PM UTC

Hi Richard,

Try adding

MainGrid.Model.MergeCells.DelayMergeCells(GridRangeInfo.Table());

right before your MainGrid.Refresh() call to see if that does what you want.

Best regards,
Haneef


RM Richard Mitchell May 23, 2007 10:15 AM UTC

Yup, that's fixed it thanks.

Loader.
Up arrow icon