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.

AllowResizeToFit in GridGrouping

Thread ID:

Created:

Updated:

Platform:

Replies:

15237 Jun 15,2004 05:49 AM Jun 18,2004 01:56 PM Windows Forms 4
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On June 15, 2004 05:49 AM

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 11:57 AM

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 15, 2004 08:34 PM

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 02:43 AM

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 01:56 PM

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

CONFIRMATION

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.

;