DataGridView.AllowUserToDeleteRowsChanged Événement

Définition

Se produit quand la valeur de la propriété AllowUserToDeleteRowsChanged change.

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

Type d'événement

Exemples

L’exemple de code suivant illustre l’utilisation de ce membre. Dans l’exemple, un gestionnaire d’événements signale l’occurrence de l’événement AllowUserToDeleteRowsChanged . Ce rapport vous aide à savoir quand l’événement se produit et peut vous aider dans le débogage. Pour signaler plusieurs événements ou événements qui se produisent fréquemment, envisagez de MessageBox.ShowConsole.WriteLine remplacer par ou d’ajouter le message à un message multiligne TextBox.

Pour exécuter l’exemple de code, collez-le dans un projet qui contient un instance de type DataGridView nommé DataGridView1. Vérifiez ensuite que le gestionnaire d’événements est associé à l’événement AllowUserToDeleteRowsChanged .

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

Remarques

Pour plus d’informations sur la façon de gérer les événements, consultez gestion et déclenchement d’événements.

S’applique à

Voir aussi