Upgrading a working project from .NET Framework 4.8 to .NET 6.0 and these lines fail to compile.
The XML methods are just not there.
"SaveAsXML is not a member of UltraGridLayout"
What gives?
Me.udsNextActivities.LoadFromXml(objStream)
...
mobjGrid.DisplayLayout.LoadFromXml(objLayoutStream, PropertyCategories.All And Not PropertyCategories.ValueLists)
mobjGrid.DisplayLayout.SaveAsXml(objLayoutStream, PropertyCategories.All And Not PropertyCategories.ValueLists)
Hello Simon,
The issue has been discussed in this forum post:
https://es.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/124253/net6-ultragrid-missing-methods-loadfromxml-and-saveasxml/545405#545405
To sum it up, the reason why the LoadFromXML and SaveAsXml methods are not present is that they both are using the SoapFormatter class extensively, which is only supported in .NET Framework. The workaround that has been suggested is to use the Save and Load methods, which generate and load binary file. If you have an XML file that needs to be loaded, it is recommended that you first load it in a .NET Framework application and then re-save it using the Save method.
In the below documentation page there is an example of how the Save/Load methods could be used:
https://es.infragistics.com/help/winforms/infragistics.win.ultrawingrid~infragistics.win.ultrawingrid.ultragridlayout~save(stream,propertycategories)
Regards, Ivan Kitanov
This is a huge problem for us as the SaveAsXML method was used to save to a TextStream which could then be saved in a VARCHAR(Max) column in a table in the database, allowing grid layouts to be saved and shared between users. Do you expect to recode these methods to return them to the product in a future version?
If you are looking for the Save/LoadFromXML methods to return, I would recommend suggesting a product idea for this functionality at our Ideas Site for Windows Forms. This will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.