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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

default column width in a databound grid

Thread ID:

Created:

Updated:

Platform:

Replies:

50463 Oct 11,2006 11:09 PM UTC Oct 12,2006 06:16 PM UTC WinForms 3
loading
Tags: GridControl
Charlie Mao
Asked On October 11, 2006 11:09 PM UTC

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

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

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 01:10 PM UTC

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 06:16 PM UTC

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.

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

;