Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

SaveValue Field, EditEndedEventArgs Class

Defines whether the new cell contents must be transferred from the control used for cell editing to the tree control's cell.

Class: EditEndedEventArgs
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public readonly bool SaveValue;
Public ReadOnly SaveValue As Boolean

Comments

Defines whether the new cell contents must be transferred from the control used for cell editing to the tree control's cell.

Examples

C#

                    MessageBox.Show("Cell text can't be empty in this example.");
                }
            }
        }
        private void sftTree1_EditEnded(object sender, Softelvdm.SftTreeNET.EditEndedEventArgs e) {

            if (e.EditControl is TextBox) {
                // save the new cell text if neccessary
                if (e.SaveValue)
                    e.Cell.Text = textBox1.Text;

                // hide the text box and make the form the control's parent
                textBox1.Visible = false;
                textBox1.Enabled = false;
                textBox1.Parent = sftTree1.Parent;
            } else if (e.EditControl is ComboBox) {

VB.NET

            MessageBox.Show("Cell text can't be empty in this example.")
        End If
    End If
End Sub

Private Sub sftTree1_EditEnded(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.EditEndedEventArgs) Handles sftTree1.EditEnded
    If TypeOf e.EditControl Is TextBox Then
        ' save the new cell text if neccessary
        If (e.SaveValue) Then
            e.Cell.Text = textBox1.Text
        End If
        ' hide the text box and make the form the control's parent
        textBox1.Visible = False
        textBox1.Enabled = False
        textBox1.Parent = sftTree1.Parent
    ElseIf TypeOf e.EditControl Is ComboBox Then

See Also EditEndedEventArgs Class | Classes | SftTree/NET 2.0



Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.