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

Serialization

Using the WriteXmlSchema and ApplyXmlSchema methods I was able to save column layout of the grouping grid, which is nice. I would also like to save the expanded/collapsed state of the grouping and the current record. Is there an easy way to do this?

1 Reply

AD Administrator Syncfusion Team April 28, 2005 09:19 PM UTC

Hi Kjetil, you could create a strong-typed collection. Elements of the collection could be a GroupState class, e.g. class GroupState { string category; bool expanded; public bool Categorty { get; set; } public bool Expanded { get; set; } } This collection could then be serialized into an xml stream. (See also EmployeeViewXmlIO example for xml serialization and strong-typed collection). To write contents to xml you would you would loop through groupingGrid.Table.TopLevelGroup.Groups and query group.Category and group.IsExpanded settings and add that information to the strong typed collection and then write that collection to xml. To restore the expansion state of groups you would read the collection back from xml stream and then for each Group look up the group using groupingGrid.Table.TopLevelGroup.Groups.FindGroup(category) and set its Expanded state. Stefan >Using the WriteXmlSchema and ApplyXmlSchema methods I was able to save column layout of the grouping grid, which is nice. I would also like to save the expanded/collapsed state of the grouping and the current record. Is there an easy way to do this?

Loader.
Live Chat Icon For mobile
Up arrow icon