Gets a HitTestInfo object that contains information about the grid at a given location.

Namespace:  C1.Silverlight.FlexGrid
Assembly:  C1.Silverlight.FlexGrid.4 (in C1.Silverlight.FlexGrid.4.dll)

Syntax

C#
public HitTestInfo HitTest(
	MouseEventArgs e
)
Visual Basic
Public Function HitTest ( _
	e As MouseEventArgs _
) As HitTestInfo

Parameters

e
Type: System.Windows.Input..::..MouseEventArgs
MouseEventArgs that specifies the point to be tested.

Return Value

A HitTestInfo object that contains information about the grid at the location specified by the e parameter.

Examples

The code below handles the MouseMove event and shows the coordinates and content of the cell under the mouse.
Copy CodeC#
void _flex_MouseMove(object sender, MouseEventArgs e)
{
    var ht = _flex.HitTest(e);
    _tb.Text = string.Format(
        "HitTest:: cell type {0}, row {1}, column {2}, content '{3}'", 
        ht.CellType, // e.g. Cell, ColumnHeader, RowHeader
        ht.Row, 
        ht.Column, 
        ht.CellRange.IsValid ? _flex[ht.Row, ht.Column] : "n/a");
}

See Also