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

Auto-Sizing Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

76615 Sep 16,2008 06:36 PM UTC Sep 18,2008 03:20 PM UTC WinForms 2
loading
Tags: GridControl
abc
Asked On September 16, 2008 06:36 PM UTC

How do I auto-size the columns in a GridDataBoundGrid control? I know how to do it in a GridControl control, but the object model for GridDataBoundGrid seems to be completely different.

-TC


Nisha Arockiya A [Syncfusion]
Replied On September 17, 2008 05:17 AM UTC

Hi,

Thanks for your interest in Syncfusion Products.

If you want to autosize the columns to fit the text, you can call the ResizeToFit member of the ColWidths class. You can pass in any range you want to resize. This code does the whole table.


this.gridDataBoundGrid1.Model.ColWidths.ResizeToFit(GridRangeInfo.Table);


Please let me know if this is not the information you need.

Regards,
Nisha


>How do I auto-size the columns in a GridDataBoundGrid control? I know how to do it in a GridControl control, but the object model for GridDataBoundGrid seems to be completely different.

-TC




abc
Replied On September 18, 2008 03:20 PM UTC

Nisha,

Thank you. That worked great.

-TC


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

;