ST
stanleyj
Syncfusion Team
February 17, 2006 04:50 PM UTC
Hi Alex,
To remove the value in the Tag, the selected range has to be looped through. Here is the code to Clear the cell value and the tag.
public void Clear()
{
GridRangeInfo selectedRange = this.gridControl1.Selections.Ranges.ActiveRange;
// Clear Only the value && tag
for (int rowIndex = selectedRange.Top; rowIndex <= selectedRange.Bottom; rowIndex++)
{
for (int colIndex = selectedRange.Left; colIndex <= selectedRange.Right; colIndex++)
{
GridStyleInfo style = this.gridControl1.Model[rowIndex, colIndex];
this.gridControl1.Model[rowIndex, colIndex].Tag = null;
if (style.GetFormattedText(style.CellValue).Length > 0)
style.ApplyFormattedText("");
}
}
}
Best regards,
Stanley