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

GridGroupingControl - Columns Widths and Resize issue

Thread ID:





57097 Feb 26,2007 02:37 PM UTC Mar 1,2007 09:11 PM UTC WinForms 2
Tags: GridControl
Badri Rajani Kanth
Asked On February 26, 2007 02:37 PM UTC


We are using V GGC.

While our app being closed, we are saving the grid xml settings and then applying them when app is run again.
Below are the code snippets.

//Get Grid Settings xml

StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
XmlTextWriter xw = new XmlTextWriter(sw);
xml = sb.ToString();

//Apply saved settings on Grid
StringReader sr = new StringReader(settings);
XmlReader xr = new XmlTextReader(sr);
GridEngine tempEngine = GridEngine.CreateFromXml(xr); //load grid settings into temp engine(doesnt make any diff to current problem)

GGC.Engine.TableDescriptor.Columns.Clear(); //prevent errors like {"Item has already been added. Key in dictionary: '' Key being added: 'COLUMN NAME'"}.

Now our problem is, when we add or remove any column in runtime, settings are saved and re-applied correctly.
But when we just resize any column (say "ColumnName") to say 19, we see the column width correctly saved in xml file.
Even after the line "GGC.Engine.InitializeFrom(engine);", we can see column width correctly.

I mean, GGC.TableDescriptor.Columns.FindByMappingName("ColumnName").Width will give correct value.
But, the grid display is not changed, column is not resized and in display the column width appears as if 150(default width). This is strange. Even when we debug now, the value of GGC.TableDescriptor.Columns.FindByMappingName("ColumnName").Width will be 19 only!

When we test further we found that, when we manually resize the column in run time and check for "GGC.TableDescriptor.Columns.FindByMappingName("ColumnName").Width" it gives incorrect values.

So, we think, though columns widths are changed using GridColumnDescriptor, they are not resized/grid is not properly refreshed.
And manual resize is not updating "GGC.TableDescriptor.Columns.FindByMappingName("ColumnName").Width" values.
End of the day we are not able to see width changes.

Can you plz look into the issue?

Thanks and Regards
Rajani Kanth

Badri Rajani Kanth
Replied On March 1, 2007 06:21 PM UTC


Can you plz help me on this?

Rajani Kanth

Administrator [Syncfusion]
Replied On March 1, 2007 09:11 PM UTC

Hi Rajani,

Thanks for your update.

I am not sure of what be might be causing this strange behavior without a working sample. I have tested this issue in the XML Serialization browser sample with Essentail studio V.4.x. I was not able to reproduce the issue. Is it possible for you to upload us a minimal sample or modify the XML Serialization browser sample to reproduce the issue here? This will help us to analyse the issue further.

Here is a path.
C:\Program Files\Syncfusion\Essential Studio\\windows\Grid.Grouping.Windows\Samples\Serialization\XML Serialization\cs

Best regards,


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