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

How to set the width of a column

Thread ID:





83537 Jun 25,2009 06:32 PM UTC Nov 2,2010 05:09 AM UTC ASP.NET Web Forms (Classic) 3
Tags: GridGroupingControl
Manuel De Leon
Asked On June 25, 2009 06:32 PM UTC

This should have been really easy to do, or at least easy to find in your examples/demos/forums, but here I am asking it.

How can I set the width of a column?

I went to the GridColumnDescriptor Collection Editor, changed the widths of my columns, but they keep resizing based on the contents of the fields.

I also tried a whole bunch of other stuff in the design and via code to no avail.

Rekha P [Syncfusion]
Replied On June 26, 2009 01:03 PM UTC

Hi Manuel,

Thank you for your interest in Syncfusion Products.

The column with can be set using the Width property referred from the GridColumnDescriptor collections. Refer any one of the way to set the Width for the Grid columns.


//To set the width uniformly for all the columns.
foreach (GridColumnDescriptor gcd in this.GridGroupingControl1.TableDescriptor.Columns)
gcd.Width = 90;

//To set it for individual columns.
this.GridGroupingControl1.TableDescriptor.Columns[0].Width = 50;
this.GridGroupingControl1.TableDescriptor.Columns[1].Width = 50;

Please let me know if these snippets helps you out.


Peter Fithian
Replied On October 27, 2010 05:56 PM UTC

In case anyone, like me, reads this and thinks it will work - it doesn't.

Bharath M [Syncfusion]
Replied On November 2, 2010 05:09 AM UTC

Hi Peter,

We regret for the inconvenience caused.

We have tested the solution provided and it is working fine. Could you please update us a simple sample to reproduce this issue, so that we could sort out the cause of the issue and provide you a solution.

Let me know if you have any concerns.



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