SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Occurs when cell editing is active and new contents need to be validated.
Class: SftTree
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public event EditValidateEventHandler EditValidate;
Public Event EditValidate As EditValidateEventHandler
Occurs when cell editing is active and new contents need to be validated.
The EditValidate event occurs when editing of one cell is about to end (the user clicks outside of the current cell being edited, cell navigation is handled or if the SftTree.EndEdit(True) method is used. The EditValidate event allows the application to perform input validation. The new cell text currently contained in the control used for cell editing can be inspected and/or modified. If the text entered or selected is invalid, the Valid field of the EditValidateEventArgs instance must be set to False. This indicates that the new value cannot be accepted and cell editing is to be resumed. Setting Valid to True (default) ends cell editing. The tree control properties cannot be modified during this event. Use the EditEnded event to save the new cell contents.
comboBox1.Visible = true; // 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
' 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 = False
See Also SftTree Class | Classes | SftTree/NET 2.0