Hi all - I need to retain the default context menu available when right clicking in the header row. I really don't want to have to re-create all the menus and what-not. I know exactly where I need to do this decision (in the ContextMenuOpening call), but I can't figure out how to determine if the rightclick happened in the header row or not.
Can you suggest how I can replace the commented out code so this works? Thanks! Richard
void radGridView1_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
//if ( mouse was clicked in the header row )
// {
// do nothing, we like the existing menu for that and don't want to reimplement it
// } else
if (radGridView1.SelectedRows.Count == 1)
{
e.ContextMenu = SingleRowSelectedcontextMenu.DropDown;
cell = e.ContextMenuProvider as GridDataCellElement;
}
else if (radGridView1.SelectedRows.Count >= 1)
{
e.ContextMenu = MultiRowSelectedcontextMenu.DropDown;
cell = e.ContextMenuProvider as GridDataCellElement;
}
}
Can you suggest how I can replace the commented out code so this works? Thanks! Richard
void radGridView1_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
//if ( mouse was clicked in the header row )
// {
// do nothing, we like the existing menu for that and don't want to reimplement it
// } else
if (radGridView1.SelectedRows.Count == 1)
{
e.ContextMenu = SingleRowSelectedcontextMenu.DropDown;
cell = e.ContextMenuProvider as GridDataCellElement;
}
else if (radGridView1.SelectedRows.Count >= 1)
{
e.ContextMenu = MultiRowSelectedcontextMenu.DropDown;
cell = e.ContextMenuProvider as GridDataCellElement;
}
}