Aracılığıyla paylaş


DataGrid.Navigate Olay

Tanım

Kullanıcı yeni bir tabloya gittiği zaman gerçekleşir.

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 

Olay Türü

Örnekler

Aşağıdaki kod örneğinde bu üyenin kullanımı gösterilmektedir.

   // 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

Açıklamalar

Tabloya Navigate uygun genişlik gibi tek tek sütun özelliklerini sıfırlamak için olayını kullanın.

Şunlara uygulanır