Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
How to save all properties of a grid except for the value list
posted

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.

Parents
  • 5520
    Suggested Answer
    posted

    Hi,

    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

Reply Children