DataGridView.AllowUserToDeleteRowsChanged Evento

Definição

Ocorre quando o valor da AllowUserToDeleteRowsChanged propriedade muda.

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

Tipo de Evento

Exemplos

O seguinte exemplo de código demonstra a utilização deste elemento. No exemplo, um gestor de eventos reporta a ocorrência do AllowUserToDeleteRowsChanged evento. Este relatório ajuda-o a saber quando o evento ocorre e pode ajudá-lo na depuração. Para reportar múltiplos eventos ou eventos que ocorrem frequentemente, considere substituir MessageBox.Show ou Console.WriteLine anexar a mensagem a uma multilinha TextBox.

Para executar o código de exemplo, cole-o num projeto que contenha uma instância do tipo DataGridView chamada DataGridView1. Depois, certifique-se de que o gestor de eventos está associado ao 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

Observações

Para mais informações sobre como gerir eventos, consulte Gestão e Levantamento de Eventos.

Aplica-se a

Ver também