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.
Syncfusion Feedback

column widths are increased by 12 when a column on the grid is sorted

Thread ID:

Created:

Updated:

Platform:

Replies:

114047 Oct 24,2013 06:55 PM UTC Nov 18,2013 10:18 AM UTC Windows Forms 2
loading
Tags: GridControl
Todd Liveringhouse
Asked On October 24, 2013 06:55 PM UTC

We load the columns widths when we start are application.  When we change off of a grid or close the application we save the column widths in order to restore to the size the user left them.

 

A problem is if the user sorts a column on the grid and then we save the column width the widths have increased by 12. 

 

foreach (var col in grid.TableDescriptor.Columns)

{

xw.WriteAttributeString("Width", col.Width.ToString());

}

 

And as the user repeatly brings up and down the application the column widths grow.

How can I fix this or get the column width excluding the 12 pixels...I assume for some reason this is adding in an icon size or something funny like that.

 

 

 

 


Todd Liveringhouse
Replied On October 24, 2013 08:52 PM UTC

The problem happens when I have the GridExcelFilter wired to the Grid.  If I removed that option the problem went away.

 

 

 

 

 


Praveena P [Syncfusion]
Replied On November 18, 2013 10:18 AM UTC

The default sizing of the grid uses the width of the header text to size the columns. So when GridExcel is wired to the grid the header text size increases and column widths are increased by 12

 To exclude default sizing  need to set the property grid.AllowResizeToFit to False. Then the explicit sizing will work.

Regards,

Praveena.


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

;