GridControl Column Merge and ColWidth value

If you merge columns:

grid.CoveredRanges.Add(GridRangeInfo.Cells(record.Row,
record.Column,
endRow,
endColumn));

The width for column B and C stay the
same. How can I easily get the total
width of B and C if the columns are
merged?

1 Reply

AD Administrator Syncfusion Team November 3, 2006 04:28 AM UTC

H Robbe,

Use the GetTotal method to calculate the width of the columns in a grid. Here is a code snippet.

int width = this.grid.ColWidths.GetTotal(Fromindex,Toindex);

Best Regards,
Haneef

Loader.
Up arrow icon