windowsforms-404826-controls-and-libraries-tree-list-feature-center-data-editing-disable-cell-editors.md
If a cell is disabled, the user cannot edit and select its value.
Set the TreeList’s OptionsBehavior.Editable property to false to disable all cells.
treeList1.OptionsBehavior.Editable = false;
treeList1.OptionsBehavior.Editable = False
Set a column’s OptionsColumn.AllowEdit property to false to disable its cells.
treeList1.Columns["Region"].OptionsColumn.AllowEdit = false;
treeList1.Columns("Region").OptionsColumn.AllowEdit = False
Enable a column’s OptionsColumn.ReadOnly setting to make its cells read-only (the OptionsColumn.AllowEdit property must be set to true ). The user can invoke the cell’s editor to copy its value, but cannot edit that value.
treeList1.OptionsBehavior.Editable = true;
treeList1.Columns["Region"].OptionsColumn.AllowEdit = true;
treeList1.Columns["Region"].OptionsColumn.ReadOnly = true;
treeList1.OptionsBehavior.Editable = True
treeList1.Columns("Region").OptionsColumn.AllowEdit = True
treeList1.Columns("Region").OptionsColumn.ReadOnly = True
Use one of the following options to disable specific cells or nodes based on a condition:
Handle the ShowingEditor event and set the e.Cancel parameter to true to disable the processed cell based on a specific condition.
Use the Disabled Cell Behavior to disable cells in nodes that meet a specific condition. Disabled cells are grayed-out and cannot be edited.