We have an application were we allow the various users to save the layout of a wingrid. We allow them to re-position the columns, show/hide columns, set the column widths and so on with no problems. We save the user's layout to a Xml file. Below is the code we use to save the grid's layout.
Dim FileLayout As New IO.FileStream(strGridLayoutFolder & "MrmInventory_ugMRM.xml", IO.FileMode.Create)
FileLayout.Seek(0, IO.SeekOrigin.Begin)
Me.ugMRM.DisplayLayout.SaveAsXml(FileLayout, UltraWinGrid.PropertyCategories.All)
FileLayout.Close()
We've recently added some code to allow the user to increase the font size of the grid. This has been especially useful to some of our "older" users. The problem we have is when the user saves their grid layout the font size change is not included.
The question is, is the font size one of the items saved as part of the gridlayout? And if it is, how can we save that as part of the XML file? Or, should we be pursing a different method for saving the font size value?
Thanks!
How are you changing the font size on the grid? If you are using grid.Font , it won't be saved, because that's not on the layout.
The thing to do is use grid.DisplayLayout.Appearance.FontData, and then that should be saved and loaded with the layout.
Mike,
Thanks for the reply. That's the answer. Thanks again.
Jim