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

Setting column width on GGC

Thread ID:





61407 May 25,2007 05:15 AM UTC May 25,2007 08:30 AM UTC WinForms 1
Tags: GridControl
Russell Coombes
Asked On May 25, 2007 05:15 AM UTC

Hi Guys,

I have a GridGroupingControl with a single column. I want to set the column width so that it spans the entire width of the grid. I thought this should be a simple exercise, but it is not.

So far, I have tried:

myGrid.TableModel.ColWidths[0] = myWidth;

myGrid.TableDescriptor.Columns[0].Width = myWidth;


I have tried all of the above statements, and none of them seem to work no matter what the following setting is:

myGrid.TableDescriptor.AllowCalculateMaxColumnWidth = true; // false doesn't work either!

I also thought I'd try the example here...


But the attached code and example is for a GridDataBoundGrid not a GridGroupingControl.

So - can Syncfusion please tell me - What is it that I need to do to get my single column width to span the entire grid?


Administrator [Syncfusion]
Replied On May 25, 2007 08:30 AM UTC

Try this code.

grid.TableDescriptor.Columns[0].Width = grid.ClientRectangle.Width - grid.TableOptions.RowHeaderWidth - SystemInformation.VerticalScrollBarWidth;

Here is a little sample.



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