Item Property
Description
Returns the Item at the given X and Y coordinates.
Property Type
Read-only property
Syntax (Visual Basic)
Public Property Item() As [GridRecordItem](XtremeGridControl~GridRecordItem.md)
Example
HitTest Item Sample (Visual Basic)
This sample illustrates how to return a reference to an Item at a given X and Y coordinate.
Private Sub wndGridControl_MouseDown(Button As Integer, Shift As Integer, X As Long, Y As Long)
Dim hitRow As GridRow
Dim hitItem As GridRecordItem
' Returns a reference to the row clicked
' Determines which row the mouse was positioned over on mousedown.
Set hitRow = wndGridControl.HitTest(X, Y).Row
' Returns a reference to the item clicked
' Determines which row the mouse was positioned over on mousedown.
Set hitItem = wndGridControl.HitTest(X, Y).Item
If Not hitItem Is Nothing Then
If Not wndGridControl.PreviewMode Then
Debug.Print "MouseDown on Item: " & hitItem.Value & " in column: " & hitColumn.Caption
ElseIf Not (hitRow.Record.PreviewText = "") Then
Debug.Print "MouseDown on PreviewText"
End If
End If
End Sub
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.