Functional element of grid.

Namespace: Dapfor.Net.Ui
Assembly: Dapfor.Net (in Dapfor.Net.dll) Version: (


public enum HitTestInfo
Visual Basic
Public Enumeration HitTestInfo
Visual C++
public enum class HitTestInfo
type HitTestInfo


Member nameValueDescription
OutsideGrid0 The element is outside of the client area of Grid
Cell1 The Cell
RowSelector2 The row selector
RowSeparator3 Separator between two row selectors
RowHierarchicalIndent4 Space between row selector and first cell
RowEmptyRight5 Space after the last cell
ExpansionButton6 Space for expansion (+/-) button
EmptyBottom7 Space below the last row
HeaderSelector8 Space on the left of header
HeaderGroupPanel9 Grouping panel in header
HeaderHierarchicalIndent10 Space between HeaderSelector and the first column.
HeaderEmptyRight11 Space after last column
Column12 A Column
ColumnSeparator13 Separator between two Columns
CellVerticalSeparator14 Vertical separator between two Cells
CellHorizontalSeparator15 Horizontal separator between two Cells
GroupRow16 A group Row
GroupedColumn17 A Column on the group panel
ColumnFilterIcon18 A filter icon in the Column
MergedColumn19 A merged column


The grid has a convenient system of getting elements by their location inside the grid. This is done with Grid.HitTest() method that returns type of element in specified position. To get the element itself you can use one of Grid.HitTests methods that return element pointers. We tried to create an API to avoid unnecessary type casting. An example of its use is provided below.
 Copy imageCopy
public void HitTestExample(Grid grid)
    //Get the current cursor position
    Point position = System.Windows.Forms.Cursor.Position;

    //Get position in the client coordinates
    position = grid.PointToClient(position);

    //Get a part of the grid, the cursor points to.
    HitTestInfo info = grid.HitTest(position);

    //Try get a header, the cursor points to.
    Header header = grid.HitTests.HeaderTest(position);

    //Try get a row, the cursor points to.
    Row row = grid.HitTests.RowTest(position);

    //Try get a cell, the cursor points to.
    Cell cell = grid.HitTests.CellTest(position);

    //Try get a column, the cursor points to.
    Column column = grid.HitTests.ColumnTest(position);

    //Do something...

See Also