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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

116400 May 19,2014 10:57 AM May 21,2014 08:35 AM Windows Forms 4
loading
Tags: GridGroupingControl
Todd Liveringhouse
Asked On May 19, 2014 10:57 AM

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


Todd Liveringhouse
Replied On May 19, 2014 11:47 AM

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);




Solai A L [Syncfusion]
Replied On May 20, 2014 08:05 AM

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.


Todd Liveringhouse
Replied On May 20, 2014 09:06 AM

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.


Solai A L [Syncfusion]
Replied On May 21, 2014 08:35 AM

Hi Todd,

Thanks for the update.

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

Thanks & Regards,

AL.Solai.


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.

;