is there is away to handle the Right Click Action on Grid Row?
i just want to make the Row Selected When the user Right Click on it.
thanks.
One of several possible solutions is to handle MouseDown and programmatically select the row at the cursor position:
void ultraGrid_MouseDown(object sender, MouseEventArgs e){ UltraGrid control = sender as UltraGrid; UIElement controlElement = control.DisplayLayout.UIElement; UIElement elementAtPoint = controlElement != null ? controlElement.ElementFromPoint( e.Location ) : null; UltraGridRow rowAtPoint = elementAtPoint != null ? elementAtPoint.GetContext(typeof(UltraGridRow) ) as UltraGridRow : null; if ( rowAtPoint != null ) { ISelectionManager selectionManager = control as ISelectionManager; if ( selectionManager.ActivateItem(rowAtPoint) == false ) { bool clearExistingSelection = true; selectionManager.SelectItem( rowAtPoint, clearExistingSelection ); } }}
Note that you could also do this in response to MouseUp, MouseClick, etc.