HeaderPane
Main
Hide
Share Link
Print

EditEndedEventArgs Class

Provides data for the EditEnded event.

Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Inheritance

Syntax

public class EditEndedEventArgs : System.EventArgs;
Public Class EditEndedEventArgs
    Inherits System.EventArgs

Constructors

This class cannot be instantiated.

Fields

PublicCellThe cell to be edited.
PublicEditControlThe control used for cell editing.
PublicStaticInherited from System.EventArgsEmptyProvides a value to use with events that do not have event data.
PublicItemThe item whose cell is to be edited.
PublicSaveValueDefines whether the new cell contents must be transferred from the control used for cell editing to the tree control's cell.

Methods

PublicInherited from System.ObjectEqualsDetermines whether the specified object is equal to the current object.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicInherited from System.ObjectGetHashCodeServes as the default hash function.
PublicInherited from System.ObjectGetTypeGets the Type of the current instance.
ProtectedInherited from System.ObjectMemberwiseCloneCreates a shallow copy of the current Object.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicInherited from System.ObjectToStringReturns a string that represents the current object.

Examples

C#

            e.Allowed = (e.Cell.ColumnIndex == 2); // only edit cells in column 2
        }

        private void sftTree1_EditClickOutside(object sender, Softelvdm.SftTreeNET.EditClickOutsideEventArgs e) {
            DumpValues("EditClickOutside", e);
        }

        private void sftTree1_EditEnded(object sender, Softelvdm.SftTreeNET.EditEndedEventArgs e) {
            DumpValues("EditEnded", e);

            // save the new cell text if necessary
            if (e.SaveValue)
                e.Cell.Text = textBox1.Text;

            // hide the text box and make the form the control's parent
            textBox1.Visible = false;

VB.NET

        e.Allowed = False
    End If
End Sub

Private Sub SftTree1_EditClickOutside(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.EditClickOutsideEventArgs) Handles SftTree1.EditClickOutside
    DumpValues("EditClickOutside", e)
End Sub

Private Sub SftTree1_EditEnded(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.EditEndedEventArgs) Handles SftTree1.EditEnded
    DumpValues("EditEnded", e)

    ' save the new cell text if necessary
    If e.SaveValue Then
        e.Cell.Text = TextBox1.Text
    End If

See Also Classes | SftTree/NET 3.0