DataGrid.HitTestInfo.ToString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the type, row number, and column number.
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
Returns
The type, row number, and column number.
Examples
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() );
}
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 " + myHitTest.ToString());
}
Private Sub dataGrid1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Dim myHitTest As System.Windows.Forms.DataGrid.HitTestInfo
' Use the DataGrid control's HitTest method with the x and y properties.
myHitTest = dataGrid1.HitTest(e.X, e.Y)
Console.WriteLine(("ToString " & myHitTest.ToString()))
End Sub
Applies to
See also
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示