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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

AllowResizeToFit in GridGrouping

Thread ID:





15237 Jun 15,2004 09:49 AM UTC Jun 18,2004 05:56 PM UTC WinForms 4
Tags: Grouping
Administrator [Syncfusion]
Asked On June 15, 2004 09:49 AM UTC

Please could you tell me where to find the AllowResizeToFit property in the GridGrouping control. Thanks, Ben Lamb.

Sean Greer
Replied On June 15, 2004 03:57 PM UTC

Perhaps this will do? gridControl.TableModel.Options.ResizeColsBehavior = GridResizeCellsBehavior.None; >Please could you tell me where to find the AllowResizeToFit property in the GridGrouping control. > >Thanks, > >Ben Lamb.

Administrator [Syncfusion]
Replied On June 16, 2004 12:34 AM UTC

Ben, I think you are looking for this.grid.TableDescriptor.AllowCalculateMaxColumnWidth If you set this false the GridTable object will stop calculating maximum column widths. But, you can also force columns to have a specific size by setting GridColumnDescriptor.Width of a column. Once a specific width has been specified this will not be automatically resized. Only if the user double clicks on the vertical line it will be resized to fit maximum length. Stefan

Administrator [Syncfusion]
Replied On June 16, 2004 06:43 AM UTC

Thanks again Sean and Stefan, your advice is invaluable. ResizeColsBehavior wasn''t what I wanted but useful to know about nonetheless. I am constructing an array of columns using: myGrid.TableDescriptor.Columns.Clear(); myGrid.TableDescriptor.Columns.AddRange( new GridColumnDescriptor[] { GridColumnDescriptor("A Column", "A Column", null, true, 40), }); The width specified here was being ignored. I was overriding the width as Stefan suggested which worked but I wanted to be able to use the width specified in the GridColumnDescriptor constructor call. Setting AllowCalculateMaxColumnWidth to false has the desired effect. Incidentally, when setting up the columns in this way* I no longer get red arrows when I reorder the columns. Any ideas why? The users really liked the arrows! Thanks, Ben. * Instead of just letting the grid take the columns from the datasource.

Administrator [Syncfusion]
Replied On June 18, 2004 05:56 PM UTC

Ben, I tried to reproduce the problem you mention that the red arrow indicator does not work any more but it worked fine for me. If you continue to see the problem can you give instructions how to reproduce it. You could modify one of our samples (e.g. GroupCustomers) or create a new small sample project. Thanks, Stefan


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

Live Chat Icon For mobile
Live Chat Icon