다음을 통해 공유


DataGridTableStyle.RowHeadersVisibleChanged 이벤트

정의

RowHeadersVisible 값이 변경될 때 발생합니다.

public:
 event EventHandler ^ RowHeadersVisibleChanged;
public event EventHandler RowHeadersVisibleChanged;
member this.RowHeadersVisibleChanged : EventHandler 
Public Custom Event RowHeadersVisibleChanged As EventHandler 

이벤트 유형

EventHandler

예제

다음 코드 예제에서는이 멤버를 사용 하는 방법을 보여 줍니다.

   // Instantiate the EventHandler.
public:
   void AttachRowHeaderVisibleChanged()
   {
      myDataGridTableStyle->RowHeadersVisibleChanged += gcnew EventHandler( this, &MyDataGridTableStyle_RowHeadersVisibleChanged::MyDelegateRowHeadersVisibleChanged );
   }

   // raise the event when RowHeadersVisible property is changed.
private:
   void MyDelegateRowHeadersVisibleChanged( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      String^ myString = "'RowHeadersVisibleChanged' event raised, Row Headers are";
      if ( myDataGridTableStyle->RowHeadersVisible )
            myString = String::Concat( myString, " visible" );
      else
            myString = String::Concat( myString, " not visible" );

      MessageBox::Show( myString, "RowHeader information" );
   }

   // raise the event when a button is clicked.
   void myButton_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      if ( myDataGridTableStyle->RowHeadersVisible )
            myDataGridTableStyle->RowHeadersVisible = false;
      else
            myDataGridTableStyle->RowHeadersVisible = true;
   }
// Instantiate the EventHandler.
public void AttachRowHeaderVisibleChanged()
{
   myDataGridTableStyle.RowHeadersVisibleChanged += new EventHandler (MyDelegateRowHeadersVisibleChanged);
}

// raise the event when RowHeadersVisible property is changed.
private void MyDelegateRowHeadersVisibleChanged(object sender, EventArgs e)
{
   string myString = "'RowHeadersVisibleChanged' event raised, Row Headers are";
   if (myDataGridTableStyle.RowHeadersVisible)
      myString += " visible";
   else
      myString += " not visible";

   MessageBox.Show(myString, "RowHeader information");
}

// raise the event when a button is clicked.
private void myButton_Click(object sender, System.EventArgs e)
{
   if (myDataGridTableStyle.RowHeadersVisible)
      myDataGridTableStyle.RowHeadersVisible = false;
   else
      myDataGridTableStyle.RowHeadersVisible = true;
}
' Instantiate the EventHandler.
Public Sub AttachRowHeaderVisibleChanged()
   AddHandler myDataGridTableStyle.RowHeadersVisibleChanged, AddressOf MyDelegateRowHeadersVisibleChanged
End Sub


' raise the event when RowHeadersVisible property is changed.
 Private Sub MyDelegateRowHeadersVisibleChanged(ByVal sender As Object, ByVal e As EventArgs)
     Dim myString As String = "'RowHeadersVisibleChanged' event raised, Row Headers are"
     If myDataGridTableStyle.RowHeadersVisible Then
         myString += " visible"
     Else
         myString += " not visible"
     End If
     MessageBox.Show(myString, "RowHeader information")
 End Sub


' raise the event when a button is clicked.
Private Sub myButton_Click(sender As Object, e As System.EventArgs)
   If myDataGridTableStyle.RowHeadersVisible Then
      myDataGridTableStyle.RowHeadersVisible = False
   Else
      myDataGridTableStyle.RowHeadersVisible = True
   End If
End Sub

설명

이벤트 처리에 대한 자세한 내용은 이벤트 처리 및 발생 을 참조하십시오.

적용 대상

추가 정보