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

Column AutoSize Update delayed

Thread ID:





63060 Jun 27,2007 04:04 PM UTC Jun 28,2007 09:53 AM UTC WinForms 2
Tags: GridControl
Christoph Gasser
Asked On June 27, 2007 04:04 PM UTC

I've implemented a DataBoundGrid in my form and depending on a GridGroupControl the content in the DataBoundGrid changes. So far so good.

To allocate enough space for the content of each column in the DBG I'm using the AutoSize function.

//Resize all columns width to fit the content
this.gridDataBoundGrid.Model.ColWidths.ResizeToFit(GridRangeInfo.Cols(0, this.gridDataBoundGrid.Model.ColCount -1));

What happens now is, that whenever I change the content, the update of the grid "hangs behind". To explain what I mean, I've attached a short screen captured clip.

Any idea how to solve that?


I'm using Syncfusion


haneefm [Syncfusion]
Replied On June 27, 2007 06:06 PM UTC

Hi Christoph,

Below is a forum thread that discuss with the similar issue.

Best regards,

Christoph Gasser
Replied On June 28, 2007 09:53 AM UTC

Thank you for your reply. I do understand that this is a problem when you have a lot of cells in your grid. But at the moment I've 4 rows and 7 columns. That makes 28 cells in total and I do have that problem.

But after fiddeling around a found out what the problem was: The GridRangeInfo.Cols index starts with 1 and not with 0. So instead of
this.gridDataBoundGrid.Model.ColWidths.ResizeToFit(GridRangeInfo.Cols(0, this.gridDataBoundGrid.Model.ColCount -1));

I#m using
this.gridDataBoundGrid.Model.ColWidths.ResizeToFit(GridRangeInfo.Cols(1, this.gridDataBoundGrid.Model.ColCount));

And everything's working perfectly fine!

Nevertheless, thank you for your support which is always perfect and a big help!


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