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"
mobjGrid.DisplayLayout.LoadFromXml(objLayoutStream, PropertyCategories.All And Not PropertyCategories.ValueLists)
mobjGrid.DisplayLayout.SaveAsXml(objLayoutStream, PropertyCategories.All And Not PropertyCategories.ValueLists)
The issue has been discussed in this forum post:
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:
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.