After installing .NET 4.5, our existing code that currently runs on .NET 4.0 is throwing exceptions when assigning data source to DataGridView (note that it was working fine before .NET 4.5, and continues to work when 4.5 is uninstalled... but for several reasons we have to have .NET 4.5 on clients computers):
dgrManagers.DataSource = mManagers;
//where mManagers is System.Collections.ObjectModel.ObservableCollection<IManager>; the collection has 0 items.
//and dgrManagers is an instance of class that extends from Infragistics UltraGrid (Infragistics.Win.UltraWinGrid.v5.2.dll, v5.2.20052.1053).
//Extending is for style purposes, no grid content is referenced.
Previous to this, the grid was initialized (once) with:
foreach (UltraGridColumn c in dgrManagers.DisplayLayout.Bands[0].Columns) { switch (c.Key) { case "FullName": c.Header.Caption = "Full name"; c.Header.VisiblePosition = 0; c.Width = dgrManagers.Width - 30; break; default: c.Hidden = true; break; } } dgrManagers.HasLayout = true;
Errors specifics:
HResult: -2147024809
Assemlby: {Infragistics.Shared.v5.2, Version=5.2.20052.1053, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb}
Key already exists Parameter name: Key
at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKeyDoesNotExist(String key, IKeyedSubObject ignoreObject) at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKey(String key, IKeyedSubObject ignoreObject) at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKey(String key) at Infragistics.Shared.KeyedSubObjectsCollectionBase.InternalAdd(IKeyedSubObject obj) at Infragistics.Win.UltraWinGrid.ColumnsCollection.InternalAdd(UltraGridColumn column) at Infragistics.Win.UltraWinGrid.UltraGridBand.InitColumns(UltraGridBand[] oldBands) at Infragistics.Win.UltraWinGrid.UltraGridBand.InitListManager(BindingManagerBase bindingManager, String dataMember, UltraGridBand[] oldBands) at Infragistics.Win.UltraWinGrid.UltraGridLayout.ListManagerUpdated(BindingManagerBase bindingManager) at Infragistics.Win.UltraWinGrid.UltraGridLayout.ListManagerUpdated() at Infragistics.Win.UltraWinGrid.UltraGridBase.Set_ListManager(Object newDataSource, String newDataMember) at Infragistics.Win.UltraWinGrid.UltraGridBase.set_DataSource(Object value)
I understand this is an old version of Infragistics, but we're not ready to switch to new one (even though we have some newer licences) since the project is quite huge and has been working for quite some time, and I'm afraid it would cause even more errors if the new version is not fully backward compatible.
Does anyone have any idea how to circumvent this problem? Any help/hint is appreciated...
Thanks,
Veljko
Hi Urs,
If you are getting the same exception in 12.1 then something is wrong and this probably is not the issue I was thinking of.
Can you post a small sample project demonstrating the exception so we can check it out and get it fixed?
Hi Mike
We still encounter the same problem on Version 12.1.20121.2050, CLR4
Should it be solved?
Kind Regards,
Urs Scherrer
Dear Mike
We encounter the same problem with Version 12.1.20121.2050, CLR4.
Should it be corrected on this version?
If not, when does the next service release arrive?
Thanks in advance
Dear all
Hello Everybody
We see the same error on version 12.1.20121.2050.
So, when will this be corrected? Should it be corrected already?