Home Forums WinForms controls Xceed Grid for WinForms How to select cell or row on right click? Reply To: How to select cell or row on right click?

User (Old forums)
Member
Post count: 23064

I’m used to programming in C#, so the following piece of VB.NET could be wrong, but you get the idea:
<code>
Dim element As Xceed.Grid.VisualGridElement
Dim row As Xceed.Grid.Row
element = grid.GetVisualGridElementAtPoint(x, y)
If element Is Xceed.Grid.Row Then row = element As Xceed.Grid.Row
ElseIf element Is Xceed.Grid.Cell Then row = (element As Xceed.Grid.Cell).ParentRow
Else row = null
EndIf
</code>

Imported from legacy forums. Posted by Tommy (had 432 views)