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.
Unfortunately, activation email could not send to your email. Please try again.

how to specified specific columns width in ggc to be fixed and non-resizable

Thread ID:





52506 Nov 29,2006 11:36 AM Nov 30,2006 07:45 AM Windows Forms 2
Tags: Grouping
James Blibo
Asked On November 29, 2006 11:36 AM

In the ggc, how do I specified specific columns width in the ggc to be fixed and non-resizable?

Administrator [Syncfusion]
Replied On November 29, 2006 10:56 PM

Hi James,

Use the GridColumnDescriptor.Width property to set the width of the column in a grid. And you need to subscribe the ResizingColumns event and set e.Cancel = true to handle it. Here is a code snippet to show this.

//Set the width of the first column to 200.
this.gridGroupingControl1.TableDescriptor.Columns[1].Width = 200;
this.gridGroupingControl1.TableControl.ResizingColumns +=new GridResizingColumnsEventHandler(TableControl_ResizingColumns);

private void TableControl_ResizingColumns(object sender, GridResizingColumnsEventArgs e)
if( e.Columns.Right == 2)
e.Cancel = true;

Best Regards,

James Blibo
Replied On November 30, 2006 07:45 AM

This works perfect! thanks!

Can I do the same for column dragging/moving. That is, I want to prevent specific columns from being moved


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.

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.