Leer en inglés

Compartir a través de


DataGrid.Navigate Evento

Definición

Se produce cuando el usuario navega a una nueva tabla.

C#
public event System.Windows.Forms.NavigateEventHandler Navigate;

Tipo de evento

Ejemplos

En el ejemplo de código siguiente se muestra el uso de este miembro.

C#
// 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");
}

Comentarios

Use el Navigate evento para restablecer propiedades de columna individuales, como el ancho, según corresponda a la tabla.

Se aplica a

Producto Versiones
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 10