Contains information about a part of the System.Windows.Forms.DataGrid at a specified coordinate. This class cannot be inherited.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Thetype exposes the following members.
|Equals||Indicates whether two objects are identical. (Overrides Object.Equals(Object).)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Gets the hash code for the instance. (Overrides Object.GetHashCode.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Gets the type, row number, and column number. (Overrides Object.ToString.)|
The 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 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.
Private Sub DataGrid1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Console.WriteLine() Dim myHitTest As DataGrid.HitTestInfo ' Use the DataGrid control's HitTest method with the x and y properties. myHitTest = DataGrid1.HitTest(e.X, e.Y) Console.WriteLine("Column " & myHitTest.Column) Console.WriteLine("Row " & myHitTest.Row) Console.WriteLine("Type " & myHitTest.Type) Console.WriteLine("ToString " & myHitTest.ToString) Console.WriteLine("Format " & myHitTest.Type.ToString) End Sub
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.