DataGridView.RowErrorTextChanged Událost

Definice

Vyvolá se při ErrorText změně vlastnosti řádku.

public:
 event System::Windows::Forms::DataGridViewRowEventHandler ^ RowErrorTextChanged;
public event System.Windows.Forms.DataGridViewRowEventHandler RowErrorTextChanged;
public event System.Windows.Forms.DataGridViewRowEventHandler? RowErrorTextChanged;
member this.RowErrorTextChanged : System.Windows.Forms.DataGridViewRowEventHandler 
Public Custom Event RowErrorTextChanged As DataGridViewRowEventHandler 

Event Type

Příklady

Následující příklad kódu ukazuje použití tohoto členu. V příkladu obslužná rutina události hlásí výskyt RowErrorTextChanged události. Tato sestava vám pomůže zjistit, kdy k události dojde, a může vám pomoct s laděním. Pokud chcete hlásit více událostí nebo událostí, ke kterým dochází často, zvažte nahrazení MessageBox.ShowConsole.WriteLine nebo připojení zprávy k víceřádkovému TextBoxobjektu .

Pokud chcete spustit ukázkový kód, vložte ho do projektu, který obsahuje instanci typu DataGridView s názvem DataGridView1. Pak se ujistěte, že je obslužná rutina události přidružená k RowErrorTextChanged události.

private void DataGridView1_RowErrorTextChanged(Object sender, DataGridViewRowEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "Row", e.Row );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "RowErrorTextChanged Event" );
}
Private Sub DataGridView1_RowErrorTextChanged(sender as Object, e as DataGridViewRowEventArgs) _ 
     Handles DataGridView1.RowErrorTextChanged

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "Row", e.Row)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"RowErrorTextChanged Event")

End Sub

Poznámky

Další informace o zpracování událostí najdete v tématu Zpracování a vyvolávání událostí.

Platí pro

Viz také