Hi,
I am using Infragistics2.Win.v9.2 and I am trying to save the properties of a grid except I do not want to save the valuelists as my values can change on a weekly basis and the users do not want to see the id of an object but the actual name.
I was using
.SaveAsXml(objStream, Infragistics.Win.UltraWinGrid.PropertyCategories.All)
And I tried
SaveAsXml(objStream, Infragistics.Win.UltraWinGrid.PropertyCategories.UnboundColumns)
and it gave me the same results as All.
The documentation for PropertyCategories is not that informative. So how can I do this? All I want to do is store the position of the columns and the sizing of each column so users can customize the grid to their preferences. And when they launch the app they then get the grid the way they want it.
Thanks.
you can combine the properties you want.
Actually in your case you need the property : Infragistics.Win.UltraWinGrid.PropertyCategories.Bands
you might want to combine it with Infragistics.Win.UltraWinGrid.PropertyCategories.AppearanceCollection
to keep the appearance of the grid
so the code is:
ultraGrid1.DisplayLayout.SaveAsXml(objStream, Infragistics.Win.UltraWinGrid.PropertyCategories.Bands|Infragistics.Win.UltraWinGrid.PropertyCategories.AppearanceCollection);
hope this helps
The documentation for the PropertyCategories enum has been updated in 10.3.
http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.3/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v10.3~Infragistics.Win.UltraWinGrid.PropertyCategories.html