次の方法で共有


DataGrid.ShowParentDetailsButtonClick イベント

ShowParentDetails ボタンがクリックされると発生します。

Public Event ShowParentDetailsButtonClick As EventHandler
[C#]
public event EventHandler ShowParentDetailsButtonClick;
[C++]
public: __event EventHandler* ShowParentDetailsButtonClick;

[JScript] JScript では、このクラスで定義されているイベントを処理できます。ただし、独自に定義することはできません。

イベント データ

イベント ハンドラが EventArgs 型の引数を受け取りました。

使用例

 
Private Sub CallShowParentDetailsButtonClick()
   AddHandler myDataGrid.ShowParentDetailsButtonClick, AddressOf _
                                           DataGridShowParentDetailsButtonClick_Clicked
End Sub 'CallShowParentDetailsButtonClick


' raise the event when ParentDetailsButton is clicked.
Protected Sub DataGridShowParentDetailsButtonClick_Clicked(sender As Object, e As EventArgs)
   Dim myMessage As String = "ShowParentDetailsButtonClick event raised"
   
   ' Show the message when event is raised.
   MessageBox.Show(myMessage, "ShowParentDetailsButtonClick information")
End Sub 'DataGridShowParentDetailsButtonClick_Clicked

[C#] 
private void CallShowParentDetailsButtonClick()
{
   myDataGrid.ShowParentDetailsButtonClick +=
      new EventHandler(DataGridShowParentDetailsButtonClick_Clicked);
}

// raise the event when ParentDetailsButton is clicked.
protected void DataGridShowParentDetailsButtonClick_Clicked(object sender, EventArgs e)
{
   string myMessage = "ShowParentDetailsButtonClick event raised";

   // Show the message when event is raised.
   MessageBox.Show(myMessage, "ShowParentDetailsButtonClick information");
}

[C++] 
private:
    void CallShowParentDetailsButtonClick() {
        myDataGrid->ShowParentDetailsButtonClick += 
            new EventHandler(this, &MyForm::DataGridShowParentDetailsButtonClick_Clicked);
    }

    // raise the event when ParentDetailsButton is clicked.
protected:
    void DataGridShowParentDetailsButtonClick_Clicked(Object* /*sender*/, EventArgs* /*e*/) {
        String* myMessage = S"ShowParentDetailsButtonClick event raised";

        // Show the message when event is raised.
        MessageBox::Show(myMessage, S"ShowParentDetailsButtonClick information");
    }

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

DataGrid クラス | DataGrid メンバ | System.Windows.Forms 名前空間