Back to Devexpress

TreeListOptionsBehavior.Editable Property

windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsbehavior-684d59ea.md

latest4.9 KB
Original Source

TreeListOptionsBehavior.Editable Property

Gets or sets whether users are allowed to invoke cell editors.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool Editable { get; set; }
vb
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property Editable As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if users are allowed to invoke cell editors; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to Editable
TreeList

.OptionsBehavior .Editable

|

Remarks

Users are allowed to invoke cell editors if the Editable property is set to true. The TreeListColumn.OptionsColumn.AllowEdit property allows you to prevent editors from being invoked for individual columns.

To prevent individual cells from being edited, handle the TreeList.ShowingEditor event.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Editable property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-treelist-customize-node-menu/CS/Form1.cs#L26

csharp
private void bbEdit_ItemClick(object sender, EventArgs e) {
    treeList1.OptionsBehavior.Editable = !treeList1.OptionsBehavior.Editable;
    treeList1.ShowEditor();

xaf-win-enable-inplace-editing-in-tree-list-view/CS/EFCore/TreeListInplaceEF/TreeListInplaceEF.Win/Controllers/TreeListInplaceEditViewController.cs#L52

csharp
if (treeList != null) {
    treeList.OptionsBehavior.Editable = treeListEditor.AllowEdit;
    foreach (RepositoryItem ri in treeList.RepositoryItems) {

winforms-dashboard-custom-items-extension/CS/CustomItemExtension/CustomItems/TreeList/TreeListItemControlProvider.cs#L23

csharp
tree = new TreeList();
tree.OptionsBehavior.Editable = false;
tree.OptionsView.ShowIndicator = false;

winforms-treelist-customize-node-menu/VB/Form1.vb#L28

vb
Private Sub bbEdit_ItemClick(ByVal sender As Object, ByVal e As EventArgs)
    treeList1.OptionsBehavior.Editable = Not treeList1.OptionsBehavior.Editable
    treeList1.ShowEditor()

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/TreeList/TreeListItemControlProvider.vb#L27

vb
tree = New TreeList()
tree.OptionsBehavior.Editable = False
tree.OptionsView.ShowIndicator = False

See Also

ShowingEditor

TreeListOptionsBehavior Class

TreeListOptionsBehavior Members

DevExpress.XtraTreeList Namespace