This is a migrated thread and some comments may be shown as answers.

Error when trying to access CommandBinding into a RadDropDownMenu

6 Answers 82 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Frédéric
Top achievements
Rank 1
Frédéric asked on 11 Jul 2008, 11:48 AM

Hello !

Maybe this question as been already asked but I didn't find it.

Into an item of a RadDropDownMenu, when I click the button on the right of CommandBinding, I have a message box that say :

"Unable to cast object of type 'Telerik.WinControls.UI.RadSubMenuLayoutPanel' to type 'System.ComponentModel.IComponent'."

Do you have an idea of what is going wrong. I m' currently testing your product with the demo version...

Thanks in advance for your help.

Best regards.

6 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 14 Jul 2008, 12:34 PM
Hello Frédéric,

Thank you for writing.

I did not manage to reproduce the described issue. To provide you with further assistance, please send me a more detailed description of the following:
  1. PC configuration
  2. Windows version
  3. Visual studio version
  4. Telerik controls version
  5. Step-by-step description of reproducing the exception
I am looking forward to your reply.
 

All the best,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Frédéric
Top achievements
Rank 1
answered on 29 Jul 2008, 11:33 AM
Hi,

Here you will find the requested informations. Hope you will be able to help me.

Best regards.


System info :

Système d'exploitation Microsoft Windows XP Professionnel 
Version 5.1.2600 Service Pack 2 Nu 2600 
Fabricant Dell Inc. 
Modèle Precision WorkStation 670 
Type X86-based PC 
Processeur x86 Family 15 Model 4 Stepping 1 GenuineIntel ~2992 Mhz 


Visual studio info :

 > Microsoft Visual Studio 2005
 > Version 8.0.50727.762  (SP.050727-7600)
 > Microsoft .NET Framework
 > Version 2.0.50727
 > Installed Edition: C# Express


Telerik controls version

Runtime Version : 2.0.50727
Version : 6.1.0.0
Trial version

Step by step procedure :

 > Add a radDropDownMenu into your form
 > clic the little button right to "items" property
 > Add a new RadMenuItem
 > Clic the little button right to "CommandBinding" ... The error occurs !

0
Frédéric
Top achievements
Rank 1
answered on 29 Jul 2008, 11:33 AM
 
0
Martin Vasilev
Telerik team
answered on 01 Aug 2008, 06:25 AM
Hello Frédéric,

Thank you for the additional info.

I have managed to reproduce the exception and I confirm that this is an issue in the old version Q1 2008 SP1. RadDropDownMenu component has replaced with RadContextMenu in new Q2 2008 release, and the described issue is not present anymore. I recommend you to upgrade to latest version and use RadContextMenu instead RadDropDownMenu.

If you have other questions, do not hesitate to contact me again.

Regards,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Frédéric
Top achievements
Rank 1
answered on 11 Aug 2008, 12:28 PM
Hi,

I did what you say but I have another problem.

I set a ContextMenu for the radTreeview and a radContextMenu to a node.

When I right click on the node, both menus appear on over each other…

Is it normal?
0
Accepted
Martin Vasilev
Telerik team
answered on 12 Aug 2008, 12:07 PM
Hello Frédéric,

In this case, you have to remove the ContextMenuStrip from RadTreeView when opening a context menu from the specified node. You could use ContextMenuShowing event to do this. Please, review the code-block below as example:
private void Form1_Load(object sender, EventArgs e) 
    this.radTreeView1.Nodes[0].ContextMenu = this.radContextMenu1.DropDown; 
 
private void radTreeView1_ContextMenuShowing(object sender, Telerik.WinControls.UI.ContextMenuShowingEventArgs e) 
    if (e.Node == this.radTreeView1.Nodes[0]) 
    { 
        this.radTreeView1.ContextMenuStrip = null
    } 
 
private void radTreeView1_NodeMouseLeave(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e) 
    if (e.Node == this.radTreeView1.Nodes[0]) 
    { 
        this.radTreeView1.ContextMenuStrip = this.contextMenuStrip1; 
    } 

I hope this helps. If you have other questions, do not hesitate to contact me again.

Sincerely yours,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Menu
Asked by
Frédéric
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Frédéric
Top achievements
Rank 1
Share this question
or