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.

GridDataboundGrid ResizeToFit Problame

Thread ID:

Created:

Updated:

Platform:

Replies:

77871 Nov 19,2008 11:10 AM Nov 24,2008 06:49 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 19, 2008 11:10 AM

Hello,

I am using multiple (at least 20) GridDataboundGrid in one form and and i wanted to automatically set the Column width. I know who to use ResizeToFit but the problam is, once i started to use Async methods to load data, the ResizeToFit call fails to return. In fact is the form becomes unresponsive and I am forced to manually end the process.

Please note that the Grids are bounded to data tables and the tables are populated through a datareader object.

The data could be a lot ( in 10's of thousands)

Do u have an idea why the method resizetofit is failing on Async processing

any insight is welocme

thank you.



Nisha Arockiya A [Syncfusion]
Replied On November 24, 2008 06:49 AM

Hi Ephem,

Thanks for your interest in Syncfusion Products.

In case of the GridDataBoundGrid, by default, the grid will resize its columns accordingly to text in the column. Please try calling the ResizeToFit method after setting format properties in load event.
+++++++ Code Snippet +++++++++
this.gridDataBoundGrid1.AllowResizeToFit = false;
this.gridDataBoundGrid1.Model.ColWidths.ResizeToFit(this.gridDataBoundGrid1.ViewLayout.VisibleCellsRange, Syncfusion.Windows.Forms.Grid.GridResizeToFitOptions.IncludeHeaders);
+++++++ Code Snippet +++++++++

Sample:
http://websamples.syncfusion.com/samples/kb/grid.windows/GDBGColwidth/main.htm

Please let me know am I missing anything.

Regards,
Nisha


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.

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.

;