Skip to content

Column Property

Description

Returns the Column at the given X and Y coordinates.

Property Type

Read-only property

Syntax (Visual Basic)

Public Property Column() As [GridColumn](XtremeGridControl~GridColumn.md)

Remarks

This will also return a reference to a column header in the Group Box. If the X and Y coordinates are located anywhere in the column (column header, items in the column), a reference will be returned to that column.

Example

HitTest Column Sample (Visual Basic)

This sample illustrates how to return a reference to a column at a given X and Y coordinate.

Private Sub wndGridControl_MouseDown(Button As Integer, Shift As Integer, X As Long, Y As Long)  
    Dim hitColumn As GridColumn  

    ' Returns a reference to the column clicked  
    ' Determines which column the mouse is positioned over on MouseDown. 
    ' This will also be executed if the column header in the Group By box is clicked. 
    ' This will be true if any item in the column is clicked, not just column headers.  
    Set hitColumn = wndGridControl.HitTest(X, Y).Column  

    If Not hitColumn Is Nothing Then  
        Debug.Print "MouseDown on Column header: " & hitColumn.Caption  
    End If  
End Sub

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.