The control used for cell editing.
Class: EditValidateEventArgs
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public readonly Control EditControl;
Public ReadOnly EditControl As ControlThe control used for cell editing.
// off we go!
comboBox1.BringToFront();
comboBox1.Focus();
e.EditControl = comboBox1;
}
}
private void sftTree1_EditValidate(object sender, EditValidateEventArgs e) {
if (e.EditControl is TextBox) {
if (textBox1.Text == "") { // you MUST enter something
e.Valid = false;
MessageBox.Show("Cell text can't be empty in this example.");
}
} else if (e.EditControl is ComboBox) {
if (comboBox1.Text == "") { // you MUST select something
e.Valid = false;
MessageBox.Show("Cell text can't be empty in this example.");
' off we go!
comboBox1.BringToFront()
comboBox1.Focus()
e.EditControl = comboBox1
End If
End Sub
Private Sub sftTree1_EditValidate(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.EditValidateEventArgs) Handles sftTree1.EditValidate
If TypeOf e.EditControl Is TextBox Then
If textBox1.Text = "" Then ' you MUST enter something
e.Valid = False
MessageBox.Show("Cell text can't be empty in this example.")
End If
ElseIf TypeOf e.EditControl Is ComboBox Then
If comboBox1.Text = "" Then ' you MUST select something
e.Valid = FalseSee Also EditValidateEventArgs Class | Classes | SftTree/NET 2.0