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.

ColWidths - DataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

54866 Jan 18,2007 04:47 PM Jan 18,2007 05:05 PM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 18, 2007 04:47 PM

I'm trying to set ColWidth of a databound grid using
gdbg.Model.ColWidths[3]= 300;

For some reason, ColWidth is not changing.


Administrator [Syncfusion]
Replied On January 18, 2007 05:05 PM

Hi Shankar,

By default, the GridDataBoundGrid tries to autosize the columns based on headertext. The AllowResizeToFit = false turns off this default sizing.

If you do not turn it off, the grid trying to size things based on headertext can step on any explicit sizing you try to do. Here is a code snippet

this.gridDataBoundGrid1.AllowResizeToFit = false;
this.gridDataBoundGrid1.Model.ColWidths[2] = 300;

Best Regards,
Haneef

CONFIRMATION

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.

;