Please use the following code snippet and click the filter button for the first column in the virtual grid. You will notice that the default menu is shown:
RadContextMenu menu = new RadContextMenu();
public RadForm1()
{
InitializeComponent();
RadDateTimePicker aDateTimePicker = new RadDateTimePicker();
RadMenuItem theMenuItem = new RadMenuItem();
theMenuItem.MinSize = new Size(200, 30);
RadHostItem theHostItem = new RadHostItem(aDateTimePicker);
theMenuItem.Children.Add(theHostItem);
menu.Items.Add(theMenuItem);
this.radVirtualGrid1.RowCount = 50;
this.radVirtualGrid1.ColumnCount = 5;
this.radVirtualGrid1.CellValueNeeded+=radVirtualGrid1_CellValueNeeded;
this.radVirtualGrid1.AllowFiltering = true;
this.radVirtualGrid1.ContextMenuOpening+=radVirtualGrid1_ContextMenuOpening;
}
private void radVirtualGrid1_ContextMenuOpening(object sender, VirtualGridContextMenuOpeningEventArgs e)
{
int i;
string theMenuItemText;
if (e.RowIndex == -3 && e.ColumnIndex < 1)
{
e.ContextMenu = menu.DropDown;
}
}
private void radVirtualGrid1_CellValueNeeded(object sender, VirtualGridCellValueNeededEventArgs e)
{
e.Value = Guid.NewGuid().ToString();
}