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

How to Reset GGC to initial state?

Hi, I''m having trouble resetting a GGC to a "like new" state. There appears to be some attribute settings left behind after I''ve restored a GGC schema using ApplyXmlSchema(). Is there a method on the GGC that resets the grid to a "new" state? There are a multitude of "Reset..." methods on the GGC, but I''m looking for one that does it all. thanks, Heath

1 Reply

ST stanleyj Syncfusion Team February 2, 2006 07:11 AM UTC

Hi Heath, Please refer the sample in \Syncfusion\Essential Studio\4.1.0.50\windows\Grid.Grouping.Windows\Samples\CategoryView\ folder. With some changes, ApplyXmlSchema can be applied to reset the schema. public Form1() { bool testReadWriteXmlSchema = true; if (testReadWriteXmlSchema) { stream = new System.IO.MemoryStream(); this.gridGroupingControl1.WriteXmlSchema(new XmlTextWriter(stream, null)); } } System.IO.MemoryStream stream; The idea is to initially get the schema in a MemoryStream and then apply it. Add a button handler. private void button1_Click(object sender, System.EventArgs e) { System.IO.MemoryStream stream2 = new System.IO.MemoryStream(stream.ToArray()); this.gridGroupingControl1.ApplyXmlSchema(new XmlTextReader(stream2)); } Best regards, Stanley

Loader.
Live Chat Icon For mobile
Up arrow icon