Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

DataGrid.HitTestInfo Class

Contains information about a part of the System.Windows.Forms.DataGrid at a specified coordinate. This class cannot be inherited.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
public final class HitTestInfo

The DataGrid.HitTestInfo class, in conjunction with the HitTest method of the DataGrid control, is used to determine which part of a DataGrid control the user has clicked. The DataGrid.HitTestInfo class contains the row, column, and part of the grid that was clicked. See the DataGrid.HitTestType enumeration returned by the Type property for a complete list of grid parts.

To return a DataGrid.HitTestInfo, invoke the HitTest method from the MouseDown event of DataGrid control. Pass the x and y properties of the MouseEventArgs to the HitTest method.

The following example uses the HitTest method in a MouseDown event to return the DataGrid.HitTestInfo object. The row, column, and part of the grid are then printed.

No code example is currently available or this language may not be supported.
System.Object
  System.Windows.Forms.DataGrid.HitTestInfo
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.