If you are clearing styles, then ClearCells will fail when this call returns false:
ChangeCells(expandedRange, GridStyleInfo.Empty, StyleModifyType.Remove);
It tries to empty the styles in the cells in the expanded range.
If you are not clearing styles, then ClearCells will fail when this call return false:
style.ApplyFormattedText("", GridCellBaseTextInfo.ClearCells);
So, exactly what kind of cells is the clearing failing on? Are they ReadOnly or are the cells something that a empty text or empty style would not be a proper value for?
The code does call ExpandRange to convert any row range to a cell range before it does any looping. In the sample below, I don''t really see any significant difference in using cell ranges or row ranges. The one that is done first takes a little more time because of the JITing. Do you see a difference in the sample?
If you own the source, the operable code is in Essential Suite\2.0.3.0\Grid\Src\Base\Model\GridModel.cs(5998).
ForumClearCells_9258.zip