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

AllowResizeToFit in GridGrouping

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

4 Replies

SG Sean Greer 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.

AD Administrator Syncfusion Team 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

AD Administrator Syncfusion Team 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.

AD Administrator Syncfusion Team 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

Live Chat Icon For mobile
Up arrow icon