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.

default column width in a databound grid

Thread ID:

Created:

Updated:

Platform:

Replies:

50463 Oct 11,2006 07:09 PM Oct 12,2006 02:16 PM Windows Forms 3
loading
Tags: GridControl
Charlie Mao
Asked On October 11, 2006 07:09 PM

Can someone tell me how to set the default column width in a data bound grid. thanks

Charlie Mao
Replied On October 11, 2006 07:23 PM

Sorry, I mean for each column not the entire grid.


>Can someone tell me how to set the default column width in a data bound grid. thanks

Administrator [Syncfusion]
Replied On October 12, 2006 09:10 AM

Hi Charlie,

Try the code below to set the column width for any particluar column.

this.gridDataBoundGrid1.AllowResizeToFit = false;
this.gridDataBoundGrid1.Model.ColWidths[ColIndex] = 100;
//or
this.gridDataBoundGrid1.Model.ColWidths["Col Name"] = 100;

Thanks,
Rajagopal

Charlie Mao
Replied On October 12, 2006 02:16 PM

Thanks Rajagopal,

I''ll try this.....

>Hi Charlie,

Try the code below to set the column width for any particluar column.

this.gridDataBoundGrid1.AllowResizeToFit = false;
this.gridDataBoundGrid1.Model.ColWidths[ColIndex] = 100;
//or
this.gridDataBoundGrid1.Model.ColWidths["Col Name"] = 100;

Thanks,
Rajagopal

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.

;