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

GridGroupingControl - Columns Widths and Resize issue

Hi,

We are using V 4.2.0.37 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);
grd.WriteXmlSchema(xw);
xw.Close();
sw.Close();
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)
xr.Close();

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

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

2 Replies

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

Hi,

Can you plz help me on this?

Rgds
Rajani Kanth


AD Administrator Syncfusion Team 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\4.4.0.49\windows\Grid.Grouping.Windows\Samples\Serialization\XML Serialization\cs

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon