Gets information, such as row and column number of a clicked point on the grid, using the x and y coordinate passed to the method.
A System.Windows.Forms.DataGrid.HitTestInfo that contains information about the clicked part of the grid.
The System.Windows.Forms.DataGrid.HitTestInfo, in conjunction with the DataGrid.HitTest(int, int) method of the System.Windows.Forms.DataGrid control, is used to determine which part of a System.Windows.Forms.DataGrid control the user has clicked. The System.Windows.Forms.DataGrid.HitTestInfo contains the row, column, and part of the grid that was clicked. Additionally, the System.Windows.Forms.DataGrid.HitTestInfo.Type property returns a System.Windows.Forms.DataGrid.HitTestType enumeration.
The DataGrid.HitTest(int, int) method takes an x and y argument supplied by the System.Windows.Forms.DataGrid control's Control.DragDrop, Control.DragEnter, Control.DragOver, Control.MouseDown, Control.MouseMove, Control.MouseUp and Control.MouseWheel events.