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
close icon

How To: GridDataBoundGrid ColumnWidth Float

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?

1 Reply

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

Loader.
Live Chat Icon For mobile
Up arrow icon