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

adjusting column width with hierachical GridDataBoundGrid

Thread ID:





45529 Jun 22,2006 06:22 PM UTC Jun 22,2006 08:51 PM UTC WinForms 2
Tags: GridControl
Nick M
Asked On June 22, 2006 06:22 PM UTC

Hello, I am have been unable to successfully change column widths with my 3-level hierachy grid. I am using InternalColumns. I am using DataTables and DataSets as a data source. Snippet: ------- GridHierarchyLevel level0 = gridDataBoundGrid1.Binder.RootHierarchyLevel; level0.InternalColumns[1].MappingName = "test"; gridDataBoundGrid1.Model.ColWiths["test"]= 250; ------- I would expect this to set the column width of the second column to 250. It does not. Changing the index or mapping name does not change any of the column widths. What am I doing wrong? Thanks, Nick

Administrator [Syncfusion]
Replied On June 22, 2006 06:41 PM UTC

Hi Nick, In general grid should automatically resize columns to fit cell contents on first disply of the data. To turn off the this behavior, you need to set the AllowResizeToFit property to false. Please find the code snippet below. this.gridDataBoundGrid1.AllowResizeToFit = false; Let me know if this helps. Best Regards, Haneef

Nick M
Replied On June 22, 2006 08:51 PM UTC

That did it...thanks!


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