Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Allowed Field, EditAllowedEventArgs Class

Defines whether the cell can be edited. This value can be modified by the EditAllowed event handler.

Class: EditAllowedEventArgs
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public bool Allowed;
Public Allowed As Boolean

Comments

Defines whether the cell can be edited. This value can be modified by the EditAllowed event handler.

Examples

C#

            sftTree1.RecalcHorizontalExtent();
            sftTree1.Initializing = false;
        }

        private void sftTree1_EditAllowed(object sender, Softelvdm.SftTreeNET.EditAllowedEventArgs e) {
            Debug.Write("** EditAllowed");
            DumpValues(e);
            if (e.Cell.ColumnIndex == 0) // Can't edit the first column
                e.Allowed = false;
        }

        private void sftTree1_EditSetup(object sender, Softelvdm.SftTreeNET.EditSetupEventArgs e) {
            Debug.Write("** EditSetup");
            DumpValues(e);

            if (e.Cell.ColumnIndex == 1) {

VB.NET

    sftTree1.RecalcHorizontalExtent()
    sftTree1.Initializing = False
End Sub

Private Sub sftTree1_EditAllowed(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.EditAllowedEventArgs) Handles sftTree1.EditAllowed
    Debug.Write("** EditAllowed")
    DumpValues(e)
    If e.Cell.ColumnIndex = 0 Then ' Can't edit the first column
        e.Allowed = False
    End If
End Sub

Private Sub sftTree1_EditSetup(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.EditSetupEventArgs) Handles sftTree1.EditSetup
    Debug.Write("** EditSetup")
    DumpValues(e)

See Also EditAllowedEventArgs Class | Classes | SftTree/NET 2.0