Hi Gerard.Well, I think that that is all doable. Have a look at the grid's DisplayLayout.SaveAsXml and you will see that you have many property categories that you can save. I'm posting the code I have on my subclassed grid to give you an idea...
''' <summary>
''' Created a public method to be called on the Form's OnFormClosing for every Grid on it in order to save
''' columns order and width that might have been changed by user and keep it in a XML file. The call is on
''' the base form (PFNStandardForm) which checks all form's controls for an UltraGrid and then calls this
''' method whenever one is found.
''' Tried to use the grid's own Validated but had problems because we need to set the Grid's DataSource
''' to Nothing on closing the form to avoid "The given key was not present in the dictionary."
''' </summary>
''' <param name="grid"></param>
''' <remarks></remarks>
Public Sub SaveGridLayoutAndLeave(ByVal grid As Infragistics.Win.UltraWinGrid.UltraGrid)
'-- establish locals
Dim lcPath As String
Dim lcFile As String
'-- create the Path
lcPath = Application.StartupPath & "\Layouts"
If lcPath <> String.Empty Then
If IO.Directory.Exists(lcPath) = False Then
'-- create folder for Grid Layout, if it doesn't exist already
Try
IO.Directory.CreateDirectory(lcPath)
Catch ex As Exception
End Try
End If
End If
'-- delete older Layout file, so it won't keep older files when Version changes
For Each FileFound As String In IO.Directory.GetFiles(lcPath, grid.Name.Trim & "*.xml")
IO.File.Delete(FileFound)
Next
'-- get the path and build the file name
lcFile = lcPath & "\" & grid.FindForm.Name.Trim & "_" & grid.Name.Trim & "_" & Me.Version.Trim & ".xml"
'-- save current layout
Try
grid.DisplayLayout.SaveAsXml(lcFile, Infragistics.Win.UltraWinGrid.PropertyCategories.Bands)
Catch ex As Exception
End Try
'-- sets Datasource to nothing to avoid "key not found exception"
Me.DataSource = Nothing
End Sub
Also, to save it, I used its InitializeLayout:
Private Sub UltraGridOffisys_InitializeLayout(ByVal sender As System.Object, ByVal e As _
Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles MyBase.InitializeLayout
'-- establish locals
Dim lcFile As String
'-- set path and build the file name
lcFile = Application.StartupPath & "\Layouts\" & Me.FindForm.Name.Trim & "_" & Me.Name.Trim & "_" & _
Me.Version.Trim & ".xml"
'-- load saved layout, if Version changed, Layout will be reset to original
Try
Me.DisplayLayout.LoadFromXml(lcFile)
Catch ex As Exception
End Try
End Sub
As for the roadmap to WPF I only know that the guys are going to get it done, but I don't have a time for that. If I get any info about that, I will come back here.