I'm migrating a winforms project from .net 4.7.2 to dotnet 6. The 4.7.2 project is using v22.1 of the controls. In as much as I'm not getting compilation errors, it seems to have mostly worked, but I'm having a few errors relating to the chart controls. I've added Infragistics.WinForms.Charts 22.1.71 via our private nuget feed, but I'm getting the following compile time errors:
Any suggestions as to what might be the issue? Looking in a new project and dropping a chart control on a form, it looks like the chart controls might now be under Infragistics.Win.DataVisualization? I'm a little confused by that, as I'd have expected APIs to be more or less the same for the same major/minor version?
Hello,
I have been investigating into your requirement, and you are correct that the LoadFromXml and SaveAsXml methods are not present on the UltraGrid.DisplayLayout in .NET 6. The reason for this is because Microsoft discontinued the SoapFormatter class in .NET Core, which the methods in question used extensively.
Luckily, we do expose other methods to save and load the layout of the UltraGridLayout via the Save and Load methods. These will save to binary, and so if you have an XML file that needs to be loaded, I would recommend that you first load it in a .NET Framework application and then re-save it using the Save method.
Regards
Okay, thanks. Just seen how long since ultradatachart was released, so guess it was about time we updated. We don't make massive use of charting in the application, so I guess it was never revisited. Anyway, I've migrated all of our charts successfully in the .net framework version and copied the classes to the net 6 version
Hope you don't mind me taking a slight tangent? Now that's resolved I see we have another issue. We use code like the following to load and save the user's customisations to each grid control:
grid.DisplayLayout.LoadFromXml(ms, _categories);
where ms is a stream. Using .net framework 22.1 this method is supported, but using the same code in net 6 it tells me that this member does not exist?
Unfortunately, we dont gave packages for the UltraChart so its upto you.
Hi Divya,
thanks for your reply. We’re currently using the ultraChart control. I’ll be honest, I’d sooner not be switching components at this stage. This is a large multi-project application, and the less I have to change during the migration itself, the better. Do I have any option to stick with the ultraChart or do I need switch?
Kevin
Hello Kavin,
Thank you for the post.
I totally understand the confusion about the chart packages, here I am trying to explain , so we had ultraChart which is old control and almost retired , ultraChart is been replaced by ultraDataChart which is a new control and comparatively more efficient. We have dlls available for both the controls but for the NuGet we have packages for only UltraDataChart.
So for UltraDataChart you would need to include chart package which will include dataVisulaization and portable core assemblies. Attached screenshot for the reference.(adding packages from the license feed)
So may I know 1st which chart control you are using ultraChart or UltraDatachart?