Hello,
With the latest version, I still cannot replicate this issue.
I have added a RadMenuButtonItem to the context menu as you have specified and it doesn't produce the behaviour you specified.
Please can you try the following example:
Form1 Designer File
namespace
RadControlsWinFormsApp1
{
partial
class
Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System.ComponentModel.IContainer components =
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose(
bool
disposing)
{
if
(disposing && (components !=
null
))
{
components.Dispose();
}
base
.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent()
{
this
.components =
new
System.ComponentModel.Container();
this
.radListControl1 =
new
Telerik.WinControls.UI.RadListControl();
this
.radContextMenuManager1 =
new
Telerik.WinControls.UI.RadContextMenuManager();
this
.radContextMenu1 =
new
Telerik.WinControls.UI.RadContextMenu(
this
.components);
this
.radMenuItem1 =
new
Telerik.WinControls.UI.RadMenuItem();
this
.radMenuButtonItem1 =
new
Telerik.WinControls.UI.RadMenuButtonItem();
((System.ComponentModel.ISupportInitialize)(
this
.radListControl1)).BeginInit();
this
.SuspendLayout();
//
// radListControl1
//
this
.radListControl1.CaseSensitiveSort =
true
;
this
.radListControl1.ItemHeight = 18;
this
.radListControl1.Location =
new
System.Drawing.Point(147, 56);
this
.radListControl1.Name =
"radListControl1"
;
this
.radContextMenuManager1.SetRadContextMenu(
this
.radListControl1,
this
.radContextMenu1);
this
.radListControl1.Size =
new
System.Drawing.Size(363, 518);
this
.radListControl1.TabIndex = 0;
this
.radListControl1.Text =
"radListControl1"
;
//
// radContextMenu1
//
this
.radContextMenu1.Items.AddRange(
new
Telerik.WinControls.RadItem[] {
this
.radMenuItem1,
this
.radMenuButtonItem1});
//
// radMenuItem1
//
this
.radMenuItem1.AccessibleDescription =
"radMenuItem1"
;
this
.radMenuItem1.AccessibleName =
"radMenuItem1"
;
this
.radMenuItem1.Name =
"radMenuItem1"
;
this
.radMenuItem1.Text =
"radMenuItem1"
;
this
.radMenuItem1.Visibility = Telerik.WinControls.ElementVisibility.Visible;
//
// radMenuButtonItem1
//
this
.radMenuButtonItem1.AccessibleDescription =
"radMenuButtonItem1"
;
this
.radMenuButtonItem1.AccessibleName =
"radMenuButtonItem1"
;
//
//
//
this
.radMenuButtonItem1.ButtonElement.AccessibleDescription =
"radMenuButtonItem1"
;
this
.radMenuButtonItem1.ButtonElement.AccessibleName =
"radMenuButtonItem1"
;
this
.radMenuButtonItem1.Name =
"radMenuButtonItem1"
;
this
.radMenuButtonItem1.Text =
"radMenuButtonItem1"
;
this
.radMenuButtonItem1.Visibility = Telerik.WinControls.ElementVisibility.Visible;
//
// Form1
//
this
.AutoScaleDimensions =
new
System.Drawing.SizeF(6F, 13F);
this
.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this
.ClientSize =
new
System.Drawing.Size(801, 628);
this
.Controls.Add(
this
.radListControl1);
this
.Name =
"Form1"
;
this
.Text =
"Form1"
;
((System.ComponentModel.ISupportInitialize)(
this
.radListControl1)).EndInit();
this
.ResumeLayout(
false
);
}
#endregion
private
Telerik.WinControls.UI.RadListControl radListControl1;
private
Telerik.WinControls.UI.RadContextMenuManager radContextMenuManager1;
private
Telerik.WinControls.UI.RadContextMenu radContextMenu1;
private
Telerik.WinControls.UI.RadMenuItem radMenuItem1;
private
Telerik.WinControls.UI.RadMenuButtonItem radMenuButtonItem1;
}
}
Form 1
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
using
Telerik.WinControls;
using
Telerik.WinControls.UI;
namespace
RadControlsWinFormsApp1
{
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
List<Item> items =
new
List<Item>();
int
i = 0;
while
(i <= 100)
{
items.Add(
new
Item(i,
"Item "
+ i.ToString()));
i++;
}
this
.radListControl1.DataSource = items;
this
.radListControl1.DisplayMember =
"Name"
;
this
.radListControl1.ValueMember =
"Id"
;
radMenuItem1.Click +=
new
EventHandler(item1_Click);
radMenuButtonItem1.Click +=
new
EventHandler(radMenuButtonItem1_Click);
}
void
radMenuButtonItem1_Click(
object
sender, EventArgs e)
{
RadMessageBox.Show(
"Menu Button Item 1 Clicked"
);
}
void
item1_Click(
object
sender, EventArgs e)
{
RadMessageBox.Show(
"Menu Item 1 Clicked"
);
}
public
class
Item
{
public
Item()
{ }
public
Item(
int
id,
string
name)
{
Id = id;
Name = name;
}
public
int
Id
{
get
;
set
; }
public
string
Name
{
get
;
set
; }
}
}
}
Thanks
Richard