|
HOWTO: Obtaining the Row and Column Position of the Mouse. Sometimes users need the ability to determine what row or column is currently under the mouse pointer. To do this we can use the MouseRow and MouseCol properties. The following code demonstrates the use of these properties to get the row and column position of the mouse when a mouse click occurs and displays the results, along with the row's type, in a message box. Private Sub SGGrid1_Click() 'Output the row position, column position, and row type when a mouse click occurs in SharpGrid MsgBox ("Row: " & SGGrid1.MouseRow & " | Col: " & SGGrid1.MouseCol & " | This row's type is " & SGGrid1.Rows.Current.Type) End Sub The links below contain additional information about the use of the MouseRow and MouseCol properties. The attached sample demonstrates the how the code above is used to get the column position, row position, and the type of row in which the clicked cell resides. MouseRow MouseCol If you have any questions or need assistance, please feel free to submit a support request.
Applies To: SharpGrid 2.0
|