DataGridView.AllowUserToDeleteRowsChanged Evento

Definición

Se produce cuando cambia el valor de la propiedad AllowUserToDeleteRowsChanged.

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

Tipo de evento

Ejemplos

En el ejemplo de código siguiente se muestra el uso de este miembro. En el ejemplo, un controlador de eventos informa sobre la aparición del AllowUserToDeleteRowsChanged evento. Este informe le ayuda a aprender cuándo se produce el evento y puede ayudarle a depurar. Para informar sobre varios eventos o eventos que se producen con frecuencia, considere la posibilidad de reemplazar MessageBox.ShowConsole.WriteLine por o anexar el mensaje a una línea TextBoxmúltiple.

Para ejecutar el código de ejemplo, péguelo en un proyecto que contenga una instancia de tipo DataGridView denominada DataGridView1. A continuación, asegúrese de que el controlador de eventos está asociado al AllowUserToDeleteRowsChanged evento.

private void DataGridView1_AllowUserToDeleteRowsChanged(Object sender, EventArgs e) {

   MessageBox.Show("You are in the DataGridView.AllowUserToDeleteRowsChanged event.");
}
Private Sub DataGridView1_AllowUserToDeleteRowsChanged(sender as Object, e as EventArgs) _ 
     Handles DataGridView1.AllowUserToDeleteRowsChanged

   MessageBox.Show("You are in the DataGridView.AllowUserToDeleteRowsChanged event.")

End Sub

Comentarios

Para obtener más información acerca de cómo controlar eventos, vea controlar y provocar eventos.

Se aplica a

Consulte también