We have a set of rows and coloums and those rows are ordered using OutlookGroupBy functionality. Which makes the layout look like set of bands.
The solution I am looking for is,
Consider i have expanded some of the bands and changed the column ordering while using the application.
Now, before going to another window I want to save the current layout information of the ultraGrid bands (that is, Which bands are expanded/collapsed/sorted column information etc.) into the database or xml file.
And when I return back to the same window, I want to re-load the layout information which is stored as it is.
Is there any predefined solution for carrying out this action?
Thank you Mike!
To store the information about the rows, such as the expanded/collapsed, I am using the following code and storing the data into xml file.
foreach (UltraGridGroupByRow row in ugBaseGrid.Rows) { if (row.Expanded) { writer.WriteElementString("Row_Name", row.Value.ToString()); } }
The grid's DisplayLayout has SaveAsXml and LoadFromXml methods that will save the layout to a stream or a file.
Note that this includes only the columns and bands. It does not (and cannot) include any information about the rows, such as the expanded or selected state of the row, since these are dependent on the data.