i have just upgraded my computer to a Sony all in one PC and i have installed all the software i use,, but when it comes to running my application which uses infragistics controls via deployment and via Debugging environment the app crashes as soon as it has to load data into a XamDataGrid with the following error:
Argument Exception was unhandled
Item has already been added. Key in dictionary: 'Infragistics.Windows.Automation.Peers.DataPresenter.CellAutomationPeer' Key being added: 'Infragistics.Windows.Automation.Peers.DataPresenter.CellAutomationPeer'
I have tried tracking down the error but to no avail so any assistance will be greatly appreciated.
The Computer is running Windows 7 Professional 64bit and im using NetAdvantage WPF 2010.3
The issue should be addressed in the latest hotfix (available back in August). You can get the download by going to My Infragistics => Keys and Downloads.
I have tried installing the WPF 2250 Service Release but error still persists
Andrew, can you send me the source code location for Infragistics 9.1 version? We would like to try the fix you have suggested. Lot of our customers are reporting this issue so we are planning to provide the fix without upgradation.
pramanju said: Andrew, can you send me the source code location for Infragistics 9.1 version? We would like to try the fix you have suggested. Lot of our customers are reporting this issue so we are planning to provide the fix without upgradation.
If you purchased the product with the source then you should have access to it under the My Infragistics->My Keys and Downloads. I'll forward the email to developer support and they can see if you have access to the source based on your purchase.
pramanju,
I have checked and you do have a 2009 Volume 1 key registered to your profile. To see the downloads for the source code you will need to visit the My Keys and Downloads page and then select your 2009 Volume 1 Win Client key. When viewing the downloads scroll down to the source code section and you should see two downloads for the source code:
The first of the two is the latest service release and the second one is the release version of the source code.
Let me know if you have any questions with this matter.
Thanks Alan and Andrew for your replies. Now we are also trying to upgrade to latest version. I'm in the process of validating 11.1 version with last said scenario. I see that 11.1 is the latest version available. Could you please confirm the fix is available in this version? And 11.1 version is latest version?
Andrew/Alan, At this stage we are analysing both options, update the source code with the fix suggested by Alan and upgrading to latest version. We'll take a decision based on less expensive approach.
I was able to download the source code and reach method GetChildrenCore(). Can you please check if below change is correct and it will fix the issue?
Or please suggest me the exact piece of code. I've one more question of the steps involved in compiling the binary and deploying once the fix is finalized which I'll defer to my next post.
/// <summary> /// Returns the collection of child elements of the object that is associated with this <see cref="AutomationPeer"/> /// </summary> /// <returns>The collection of child elements</returns> protected override List<AutomationPeer> GetChildrenCore() { AutomationPeer peer = this.GetUnderlyingPeer();
if (null != peer) { try { System.Reflection.MethodInfo method = typeof(AutomationPeer).GetMethod("UpdateSubtree", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
if (null != method) method.Invoke(peer, Type.EmptyTypes); } catch (SecurityException) { }
if (null != peer.GetChildren()) return peer.GetChildren(); else return new List<AutomationPeer>(); }
return null; }
Andrew, apart from strong name issue, I'm getting two more compilation issues after changing the reference to local assembly which has the fix. I did verify that the dll has the interface but not sure what is missing
Error 11 The type 'Infragistics.Windows.Selection.ISelectableItem' is defined in an assembly that is not referenced. You must add a reference to assembly 'Infragistics3.Wpf.v9.1, Version=9.1.20091.1006, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb'.
Error 12 The type 'Infragistics.Windows.Helpers.DependencyObjectNotifier' is defined in an assembly that is not referenced. You must add a reference to assembly 'Infragistics3.Wpf.v9.1, Version=9.1.20091.1006, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb'.
Please let me know solutions for these.
Thanks Andrew,I'll take the code. Now I'm unable to build our assembly and compilation failiing because Infragistics3.Wpf.v9.1 is not signed with strong name. Could you suggest any work around for this issue?
Error 10 Unknown build error, 'A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)'
No. That is the actual issue - that the actual collection instance provided by the peer element is being returned. The change should be:
var list = peer.GetChildren(); if (list != null) return new List<AutomationPeer>(list);
if (list != null) return new List<AutomationPeer>(list);