다음을 통해 공유


DataGrid.Navigate 이벤트

정의

사용자가 새 테이블을 탐색할 때 발생합니다.

public:
 event System::Windows::Forms::NavigateEventHandler ^ Navigate;
public event System.Windows.Forms.NavigateEventHandler Navigate;
member this.Navigate : System.Windows.Forms.NavigateEventHandler 
Public Custom Event Navigate As NavigateEventHandler 

이벤트 유형

예제

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

   // Instantiate the 'Navigate' NavigateEventHandler.
private:
   void CallNavigate()
   {
      myDataGrid->Navigate += gcnew NavigateEventHandler( this, &MyDataGrid::Grid_Navigate );
   }

   // Raise the event when navigating to another table.
private:
   void Grid_Navigate( Object^ /*sender*/, NavigateEventArgs^ /*e*/ )
   {
      // String variable used to show message.
      String^ myString = "Navigate event raised, moved to another table";
      
      // Show the message when navigating to another table.
      MessageBox::Show( myString, "Table navigation information" );
   }
// Instantiate the 'Navigate' NavigateEventHandler.
private void CallNavigate()
{
   myDataGrid.Navigate += new NavigateEventHandler(Grid_Navigate);
}

// Raise the event when navigating to another table.
private void Grid_Navigate(object sender, NavigateEventArgs e)
{
   // String variable used to show message.
   string myString = "Navigate event raised, moved to another table";
   // Show the message when navigating to another table.
   MessageBox.Show(myString, "Table navigation information");
}
' Create an instance of the 'Navigate' NavigateEventHandler.
Private Sub CallNavigate()
   AddHandler myDataGrid.Navigate, AddressOf Grid_Navigate
End Sub


' Raise the event when navigating to another table.
 Private Sub Grid_Navigate(ByVal sender As Object, ByVal e As NavigateEventArgs)
     ' String variable used to show message.
     Dim myString As String = "Navigate event raised, moved to another table"
     ' Show the message when navigating to another table.
     MessageBox.Show(myString, "Table navigation information")
 End Sub

설명

Navigate 이벤트를 사용하여 테이블에 적절하게 너비와 같은 개별 열 속성을 다시 설정합니다.

적용 대상