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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to use gridcontrol ColumnSizer Property

Thread ID:





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


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 08:42 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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