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. Image for the cookie policy date

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

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.





2 Replies

TL Todd Liveringhouse 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.






PP Praveena P Syncfusion Team 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.



Live Chat Icon For mobile
Up arrow icon