To reproduce: please refer to the attached sample project and follow the steps in the gif file.
Workaround:
private void radGanttView1_ContextMenuOpening(object sender, Telerik.WinControls.UI.GanttViewContextMenuOpeningEventArgs e)
{
foreach (RadMenuItem item in e.Menu.Items)
{
if (item.Text == "&Delete")
{
item.MouseDown -= item_MouseDown;
item.MouseDown += item_MouseDown;
}
}
}
private void item_MouseDown(object sender, MouseEventArgs e)
{
this.radGanttView1.GanttViewElement.BeginUpdate();
if (this.radGanttView1.SelectedItem.Parent == null)
{
while (this.radGanttView1.SelectedItem.Items.Count > 0)
{
this.radGanttView1.SelectedItem.Items.RemoveAt(0);
}
}
this.radGanttView1.GanttViewElement.EndUpdate();
}