Infragistics2.Win.UltraWinTree.v8.1
AllowCellEdit Property
See Also  Example
Infragistics.Win.UltraWinTree Namespace > UltraTreeNode Class : AllowCellEdit Property

Gets/sets whether cells contained by this UltraTreeNode can be edited by the end user.

Syntax

Visual Basic (Declaration) 
Public Property AllowCellEdit As AllowCellEdit
C# 
public AllowCellEdit AllowCellEdit {get; set;}

Remarks

The AllowCellEdit property is exposed by each of the column-related objects (UltraTreeNodeColumn, UltraTreeColumnSet, and UltraTreeColumnSettings), and the UltraTreeNodeCell object exposes an UltraTreeNodeCell.AllowEdit property, which is named differently but functionally identical. The AllowCellEdit of the UltraTreeNode object is less specific than the AllowEdit property of the cell, but more specific than that of the column-related objects; for example, setting the property on the node supercedes the setting at all other levels except the cell.

Note: When the AllowCellEdit property is set to 'Disabled', cells are disabled, but the node itself is not; behavior is different in this case than when the node's UltraTreeNode.Enabled property is set to false.

Cells can be disabled by setting the AllowCellEdit property to 'Disabled'.

The end user can be prevented from changing a cell's contents, while still being allowed to copy the cell's contents, by setting the AllowCellEdit property to 'ReadOnly'.

The AllowCellEdit property does not, by itself, determine the behavior exhibited when a cell is clicked with the mouse; the Override.CellClickAction property also determines whether a cell can be activated and/or edited when it is clicked with the mouse.

Example

The following code sample demonstrates how to disable the cells for a particular node:

Visual BasicCopy Code
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTree

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim node As UltraTreeNode = Me.ultraTree1.Nodes(0)
        node.AllowCellEdit = AllowCellEdit.Disabled
    End Sub

C#Copy Code
using Infragistics.Win;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;

       
private void button1_Click(object sender, System.EventArgs e)
       {
           UltraTreeNode node =
this.ultraTree1.Nodes[0];
           node.AllowCellEdit = AllowCellEdit.Disabled;
       }

See Also