To reproduce:
public Form1()
{
InitializeComponent();
this.radPropertyGrid1.SelectedObject = this;
this.radPropertyGrid1.ContextMenuOpening += radPropertyGrid1_ContextMenuOpening;
}
private void radPropertyGrid1_ContextMenuOpening(object sender, Telerik.WinControls.UI.PropertyGridContextMenuOpeningEventArgs e)
{
foreach (RadItem item in e.Menu.Items)
{
if (item.Text == "Sort")
{
item.Visibility = ElementVisibility.Collapsed;
item.PropertyChanged += item_PropertyChanged;
}
}
}
Workaround:
private void radPropertyGrid1_ContextMenuOpening(object sender, Telerik.WinControls.UI.PropertyGridContextMenuOpeningEventArgs e)
{
RadItem item = null;
for (int i = 0; i < e.Menu.Items.Count; i++)
{
item = e.Menu.Items[i];
if (item.Text=="Sort")
{
e.Menu.Items.Remove(item);
}
}
}
Hi,
This issue was originally reported more than 10 years ago and has received little community interest or follow-up since then. Given the limited demand and the availability of a workaround, we aren't able to prioritize it over improvements with higher impact and stronger community interest. Feel free to use the suggsted workaround.
I will close this item and set its status to "Declined" on our feedback portal.
If you have any other questions or concerns, please do not hesitate to contact us. Thank you!
Regards,
Nadya | Tech Support Engineer
Progress Telerik