I have a problem that I don't know how to solve.
I use the MouseDown event to change a popupmenu.
I do something like this.
Public Sub GridView1_MouseDown()
If Mouse.Right Then
' In the following line I get the error: GridView1.Row (Bad row index)
Dim sSQL As String = "Select row1, row2 From Tabla1 Where row2 ='" & GridView1[GridView1.Row, 0].Text & "';"
Dim resultado As Result = mG.gConn.Exec(sSQL)
If resultado.Count < 1 Then
GridView1.PopupMenu = Popup1.Name
Else
GridView11.PopupMenu = Popup2.Name
Endif
Endif
End
But when I try to do a previous query to see if you have records and thus determine whether to put a popup menu or another, it returns the following error.And I don't know how to do the previous consultation to change the popupmenu.