Hi,
I am wondering is there any properties if user press right click on datagrid then row become active.
Or I have to write code for that?
I don't know if there is a way to do it without code. If there isn't, here is some code to do it:
Private Sub grid_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles grid.MouseDown If e.Button = Windows.Forms.MouseButtons.Right Then Dim mousePoint As Point = New Point(e.X, e.Y) 'get the user interface element from the location of the mouse click Dim element As UIElement = gridEquipment.DisplayLayout.UIElement.ElementFromPoint(mousePoint) Dim row As UltraGridRow = Nothing 'see if that element is an ultragridrow row = CType(element.GetContext(GetType(UltraGridRow)), UltraGridRow) If row IsNot Nothing Then 'select the row first row.Selected = True End If End IfEnd Sub
Thanks Dear. My problem has been solved