GGC & ColWidths

Hi.

I'm trying to resize my form so that all columns could be visible.

Code:
this.Width = grid.TableModel.ColWidths.GetTotal ( 0, grid.TableModel.ColCount - 1);

Code resides below setting DataSource property however all columns return size of 65 which is default size.

So, question is: how can I found total size of all visible columns in GGC?

Thanks.

1 Reply

AD Administrator Syncfusion Team February 21, 2007 06:21 PM UTC

Hi Srdjan,

Here is a code snippet that shows you "How can I found total size of all visible columns in GGC?".

int Startcol = this.gridGroupingControl1.TableControl.ViewLayout.VisibleCellsRange.Left;
int EndCol = this.gridGroupingControl1.TableControl.ViewLayout.VisibleCellsRange.Right;
int width = this.gridGroupingControl1.TableModel.ColWidths.GetTotal(Startcol,EndCol);
MessageBox.Show( "Visible Column Width : " + width.ToString() );

Best regards,
Haneef

Loader.
Up arrow icon