DataGrid.HitTestInfo.Row プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGrid.HitTestInfo.Row プロパティの意味・解説 

DataGrid.HitTestInfo.Row プロパティ

ユーザークリックした行の番号取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説
使用例使用例

System.Windows.Forms.DataGrid コントロールの MouseDown イベント内から HitTest メソッド呼び出すことにより、クリックされた行と列番号出力する例を次に示します。この例では、DataGrid.HitTestInfo オブジェクト返されます。

Private Sub dataGrid1_MouseDown(ByVal
 sender As Object, ByVal
 e As System.Windows.Forms.MouseEventArgs)
    Dim newLine As String
 = ControlChars.Cr
    Console.WriteLine(newLine)
    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(("Column " & myHitTest.Column))
    Console.WriteLine(("Row " & myHitTest.Row))
End Sub 'dataGrid1_MouseDown
private void dataGrid1_MouseDown
(object sender, System.Windows.Forms.MouseEventArgs e)
{
   string newLine = "\n";
   Console.WriteLine(newLine);
   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("Column " + myHitTest.Column);
   Console.WriteLine("Row " + myHitTest.Row);
}
   
private:
   void dataGrid1_MouseDown( Object^ /*sender*/,
      System::Windows::Forms::MouseEventArgs^ e )
   {
      String^ newLine = "\n";
      Console::WriteLine( newLine );
      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( "Column {0}", myHitTest->Column );
      Console::WriteLine( "Row {0}", myHitTest->Row );
   }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGrid.HitTestInfo クラス
DataGrid.HitTestInfo メンバ
System.Windows.Forms 名前空間
DataGrid クラス
DataGrid.HitTestType
HitTest


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataGrid.HitTestInfo.Row プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataGrid.HitTestInfo.Row プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataGrid.HitTestInfo.Row プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataGrid.HitTestInfo.Row プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGrid.HitTestInfo.Row プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS