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

GDBG Column width problem in the form load event

Hi ,

In the form load event i set all the columns widhts of gdbg, and at that place am calling cmbTables_SelectedIndexChanged event. in the cmbTables_SelectedIndexChanged also i mentioned the same widths of gdbg.
When I executing the application, gdbg not setting the columns initially, but when i select any item from combo box then it going to set..

I want to know what was the problem ?

I want to know how to set the columns width while design time. ?


Thanx & Regars
Taqi


1 Reply

HA haneefm Syncfusion Team June 18, 2007 07:43 PM UTC

Hi Taqi,

You can resolve the issues by setting the AllowResizeToFit property to false and set the GridResizeToFitOptions.NoShrinkSize. By default the GridDataBoundGrid tries to size the columns based on the header text. To do any other kind of sizing, you first have to turn this default sizing off or it will undo your explicit sizing. To turn off this sizing, set

[C#]
this.gridDataBoundGrid1.AllowResizeToFit = false;
this.gridDataBoundGrid1.Model.ColWidths[1] = 100;

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon