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.

GridDataBoundGrid Column Widths

Thread ID:





4363 May 8,2003 04:25 PM May 9,2003 10:15 AM Windows Forms 2
Tags: GridControl
G. Hurley
Asked On May 8, 2003 04:25 PM

How do you alter column widths in a GridDataBoundGrid control? I've tried: grid.Model.ColWidths[x] = y; grid.Model.Cols.Size[x] = y; Neither work. I recall previously using the grid's TableStyles collection but can no longer find that property in a GridDataBoundGrid. Ideas? Thanks.

Administrator [Syncfusion]
Replied On May 8, 2003 05:09 PM

In addition to using the code above, also make sure you set grid.AllowResizeToFit = false. If this is true, the grid will try to autosize things based on header text which will undo your explicit sizing code.

G. Hurley
Replied On May 9, 2003 10:15 AM

Fixed. Thanks! btw: Both of these work now: grid.Model.ColWidths[x] = y; grid.Model.Cols.Size[x] = y;


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.