Hi
We're trying to roll out .NET 4.0 to our PCs and testing out how compatible our WinForms controls that have been created using Infragistics work with 4.0. We seem to have come across some sort of binding issue when assigning the datasource to the UltraGrid.
The datasource being assigned is exactly the same between the .net versions 3.5 and 4.0...3.5 works fine and displays the grid as expected. 4.0 ends up displaying each public property on the datasource, and seems to ignore the assigned datamember field when forming the grid.
Has anyone else experienced any issues with running Ultragrid on a .NET 4.0 framework?
Thanks,
Steve
Having looked up other similar issues - it seems as though the DataGrid is resetting the layout when the DataSource is being set. I've tried using SetDataBinding but no luck. I've examined the serializable class that we're assigning to the DataSource between both versions of .NET and they're identical (from what I can see!).
Struggling to think what are the possible differences between 3.5 & 4.0 that would make the UltraGrid think that the datasource being assigned no longer matches the designer layout any more...
Steve,
I haven't seen this issue before, are you able to reproduce this in an example that you could send that we could use for debugging?
Hi Alan,
Thanks for the reply - I'll try and see if a simple example has the same effect and if so, I'll ping it over...
Cheers,
Thank you for the update. Let me know if the simple example reproduces the behavior or not.
Hi,
I did manage to find a fix after a few days of googling and a bit of trial and error - came down to making use of both BindingSource and the SetDataBinding method. For any others that might be affected this way, here's how the code looked before, and how it looks now - binding an UltraGrid called 'detailsGrid' to a DataSource called 'details':
Before:
detailsGrid.DataSource = details;
After:
BindingSource bindingSource = new BindingSource(details, "Services");
this.detailsGrid.SetDataBinding(bindingSource, string.Empty, true);
Thanks for looking at my post in any case...