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.

how to use gridcontrol ColumnSizer Property

Thread ID:





100627 Aug 19,2011 06:06 AM Aug 23,2011 04:42 AM WPF 1
Tags: GridControl
Asked On August 19, 2011 06:06 AM


I'm using grid control in my project. Column widths of Grid Control should be adjusted with respect to the cell and header content.
For this I tried to use as follows and end up with compilation errors.
gridControl1 is my object.

gridControl1.ColumnSizer = Syncfusion.Windows.Controls.Grid.GridControlLengthUnitType.SizeToCells;

and also i tried as below.

gridControl1.Model.Options.ColumnSizer = Syncfusion.Windows.Controls.Grid.GridControlLengthUnitType.SizeToCells;

This is also ends up with error.
Am I missing something..? waiting for the reply..!
Thanks in Advance..!

Ramesh V [Syncfusion]
Replied On August 23, 2011 04:42 AM

Hi Ramm,

Thanks for your interest in syncfusion products.

We have analyzed your requirements and you can set ColumnSizer in grid loaded event as like the following and also this is working fine in our side.

Code Snippet[C#]:

void grid_Loaded(object sender, RoutedEventArgs e)
grid.Model.Options.ColumnSizer = GridControlLengthUnitType.Auto;

Please let us know if this helps.



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.