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
close icon

Help my column widths grow by 15 pixels everytime i run my application

We allow the user to save the column widths in our grid and restore them when the user restarts.  We have been having a problem even in previous version with the column widths growning by 15 pixels everytime you save.  This was introduced in an earlier version when the filter icon on the grid went to a 15 pixel tornado looking icon. 

When we restore the column width use a code snippet like:

grid.TableDescriptor.Columns[sName].Width = width;

The key is when we save

foreach (var col in grid.TableDescriptor.Columns)

and then get the column width using

col.Width.ToString()  and this is 15 pixels larger than what was it was when the application started.


I used to be able to code around this by unwiring the filter to the grid and then getting the column sizes

using the following:

filter = grid.Tag as GridExcelFilter;

filter.UnWireGrid(grid);

This no longer works, the 15 pixel growth is now in regardless in version 12.1.0.43


4 Replies

TL Todd Liveringhouse May 19, 2014 03:47 PM UTC

When we start we configure the grid and then apply the column sizes.  If in the configuration I have found if I do NOT apply the GridExcelFilter then the column sizes do not grow.


grid.OptimizeFilterPerformance = true;

GridExcelFilter filter = null;

filter = new GridExcelFilter();

grid.Tag = filter;

GridExcelFilter.EnableFilteredColumnIcon = true;

filter.WireGrid(grid);





SA Solai A L Syncfusion Team May 20, 2014 12:05 PM UTC

Hi Todd

 

Thank you for your interest in Syncfusion products.

 

We have provided the solution for this query in the incident 125231.Kindly refer it and let us know if you have any other concerns.

 

Thanks & Regards,

AL.Solai.



TL Todd Liveringhouse May 20, 2014 01:06 PM UTC

There was no solution provided, you simply said it is working as per design. 

So let me explain another way.  Everytime we load a screen with the grid we load the saved settings.  When we leave we save the settings.  Since you add 15 to what I write to the column width and DO NOT subtract 15 from when I read it, everytime I open and close the form the column widths grow by 15.  After 10 times that is 150 pixels.

This is a problem.



SA Solai A L Syncfusion Team May 21, 2014 12:35 PM UTC

Hi Todd,

Thanks for the update.

We have updated in the incident. Kindly follow the incident for further clarification.

Thanks & Regards,

AL.Solai.


Loader.
Live Chat Icon For mobile
Up arrow icon