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

How To: GridDataBoundGrid ColumnWidth Float

Thread ID:





9983 Jan 20,2004 08:06 AM UTC Jan 20,2004 08:20 AM UTC WinForms 1
Tags: GridControl
Asked On January 20, 2004 08:06 AM UTC

Hi, I''m using a GridDataBoundGrid and want to set specific width to each column. I tried Grid.Model.ColWidths[1] = 100 :did not work and also Grid.SetColWidth[1,2,new int[]{100,100}): did not work.. What is the solution?

Administrator [Syncfusion]
Replied On January 20, 2004 08:20 AM UTC

In addition to setting grid.Model.ColWidths, make sure you set grid.AllowResizeToFit = false. If this is set true (the default setting), the grid will try to autosize the colwidths based on the header text, and this will step on your explicit sizing.


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