DataGrid::HitTestInfo::ToString Method ()

 

Gets the type, row number, and column number.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
virtual String^ ToString() override

Return Value

Type: System::String^

The type, row number, and column number.

The following example prints the type, row number, and column number when the user clicks the System.Windows.Forms::DataGrid.

private:
   void dataGrid1_MouseDown( Object^ /*sender*/,
      System::Windows::Forms::MouseEventArgs^ e )
   {
      System::Windows::Forms::DataGrid::HitTestInfo^ myHitTest;
      // Use the DataGrid control's HitTest method with the x and y properties.
      myHitTest = dataGrid1->HitTest( e->X, e->Y );
      Console::WriteLine( "ToString {0}", myHitTest->ToString() );
   }

.NET Framework
Available since 1.1
Return to top
Show: