We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC & ColWidths

Thread ID:





56821 Feb 21,2007 01:39 PM UTC Feb 21,2007 06:21 PM UTC WinForms 1
Tags: GridControl
Asked On February 21, 2007 01:39 PM UTC


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

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?


Administrator [Syncfusion]
Replied On 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,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon