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. Image for the cookie policy date

Unable to cast ...... XPMenusProvider to IContextMenuProvider

Hi

I have been trying to use your PivotGridControl in our application.

I tested this was fit for purpose by creating a little app to test it would work and all seemed great.

I then tried to incorporate my test app in to our application and now each time I try to DataBind the grid to a datasource I get the error:

"Unable to cast object of type 'Syncfusion.Windows.Forms.Tools.XPMenus.XPMenusProvider' to type 'Syncfusion.Windows.Forms.IContextMenuProvider'."

The application is .NET 2.0 and the the new project I added in is also .NET 2.0

Please can you help

Much appreciated

5 Replies

NR Nirmal Raja Syncfusion Team June 23, 2010 02:54 PM UTC

Hi Richard,

Thank you for your interest in Syncfusion products.

The IContextMenu interface and the XPMenu component has be conflicted due to the reference missing. The XPMenu is on Tools.Windows and the provided interface is in the Shared.Base. You would have missed any only of the assembly in the references of both pivot and the application. Try by attaching both the assembly of Syncfusion.Tools.Windows and Syncfusion.Shared.Base to the references.

Let me know if you still face any issues.

Regards,
Nirmal


JW JD West June 24, 2010 09:20 PM UTC

I am having the exact same issue.

It seemed to be working last time I was in this project, and have not run any syncfusion updates.

Not sure if it matters, but I did do my "normal" system updates this week though.

Please help!!!

Thanks!


JW JD West June 24, 2010 09:24 PM UTC

UPDATE: It seems to be working now.

Not sure if this did it, but I exited the VS2010 IDE, reran the "Syncfusion Dashboard", chose the MultiTargetManager, and set my Target to 2.0.

Then reopened the IDE, seems to work.



NR Nirmal Raja Syncfusion Team June 25, 2010 10:59 AM UTC

Hi JD,

We are glad to hear that the issue has been resolved on your end. As we specified in the previous update, this issue is depends on the mismatch in the version of the assemblies. The target manager will point out to single framework assembly which seems to fix the issue.

Regards,
Nirmal


AB Adam Bruss January 31, 2014 05:16 PM UTC

We are getting the same error. We have two syncfusion projects in Visual Studio. One is VS 2008 and needs to use the .NET 3.5 and the other in VS 2012 and needs to use .NET 4.0. How can we get both to work on the same development machine? Setting the .NET framework in Multi-Target Manager has no effect. The only thing that works right now is removing the .net 3.5 or 4.0 assemblies in the Assembly Manager to get the respective project to work. Is there an easier way?  

Thanks,
Adam

Loader.
Live Chat Icon For mobile
Up arrow icon