Hello all,
I got the problem: load grid layout from an XML layout file throws exception.
Situation:
The windows application (OS WindowsXP) with UltraGrid (Infragistics 2008 Vol. 1)
User can move columns or set columns unvisible.. so far so well.
then the user favorite layout can be save as one XML File -
This XML document can be saved as string in one table column in oracle database, which has datatype as CLOB.
Next time if the user use the application, we get the string from database and store in an XML document.
Then in WindowsForm LoadEvent use this -
this
But I could not see any bands in the grid, the grid is empty. (Without the "LoadFromXML" all is fine.)
It seems that the XML file corrupt?
or is the layout file dependent on database table column type or database parameters?
or perhaps I should use this method in the Grid InitializeLayout Event?
Many thanks in advance & best wishes
I found the problem - SaveAsXML saves also filtercondition!
I used SaveAsXML("file.xml", UltraWinGrid.PropertyCategories.All)
So if I only want to save the column position or column visibility of each bands,
which PropertyCategory should I use?
Many thanks & best wishes.
PropertyCategories is a flagged enumeration. So you can combine values.
If you want to save everything but the filters, you could do this:
this.ultraGrid1.DisplayLayout.SaveAsXml("file.xml", PropertyCategories.All & ~PropertyCategories.ColumnFilters);