We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unable to add BarItem to Toolbar. Error "Attempted to store an element of the incorrect type into the array."

Thread ID:





52364 Nov 27,2006 04:57 PM UTC Nov 29,2006 04:27 AM UTC WinForms 1
Tags: Tools
Gary Webb
Asked On November 27, 2006 04:57 PM UTC

I'm getting an error (Header: Microsoft Development Environment, Message: Attempted to store an element of the incorrect type into the array.) which is preventing me from adding a BarItem to a ParentBarItem's Items collection.

When I add the BarItem to the list of Members in the BarItem Collection Editor, it appears and I can modify its properties, but when I press OK, I get the message again.

The app is Windows Forms, C# 1.1 (using VS2003), the toolbar is added to a control.

(Google can only find an MS KnowledgeBase doc which talks about controls being created in VS2003 and editted in VS2002, which clearly isn't the problem here).

Purusothaman R [Syncfusion]
Replied On November 29, 2006 04:27 AM UTC

Hi Gary,

Which version of Syncfusion you are using for your application? Do you have more than one version of Essential Suite installed on your machine?

The exception mentioned by you, may occur during the transition from old versions to new versions. This can be solved easily by referencing the correct version of assemblies.

1. Uninstall all the earlier versions of Syncfusion.

2.Open the Assembly Manager tool choosing "Prebuilt Release" option. The Assembly Manager tool can be accessed from Start Menu >> Programs >> Syncfusion >> Essential Suite x.x >> Assembly Manager. First remove all versions using Assembly Manager and install the assemblies again. This will copy the Syncfusion Assemblies to GAC and PublicAssemblies.

3. Open up your project in the designer and delete all Syncfusion references. Re-add the references from the directory C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\PublicAssemblies\

4. Make sure the "CopyLocal" property for the Syncfusion references is set to false in the designer

5. Now rebuild your application, and let me know how it goes.

Thanks for using Syncfusion Products.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon