Version

AllowCellEdit Property (UltraTreeNodeColumn)

Gets/sets whether cells in this UltraTreeNodeColumn can be activated and/or edited.
Syntax
'Declaration
 
Public Property AllowCellEdit As AllowCellEdit
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 AllowEdit property, which is named differently but functionally identical. The AllowCellEdit property is also exposed by the UltraTreeNode class; setting the property at that level affects only cell displayed by that node.

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 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 use the cell editing related properties pf the UltraTreeNodeColumn to customize the cell editing functionality for a particular column:

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 columnQuantity As UltraTreeNodeColumn = Me.ultraTree1.ColumnSettings.ColumnSets("Order Details").Columns("Quantity")
        Dim columnDiscount As UltraTreeNodeColumn = Me.ultraTree1.ColumnSettings.ColumnSets("Order Details").Columns("Discount")
        Dim columnProduct As UltraTreeNodeColumn = Me.ultraTree1.ColumnSettings.ColumnSets("Order Details").Columns("ProductID")

        '	Set the 'Quantity' column to have a ForeColor of blue for
        '	the active cell, allow editing, and restrict the number of
        '	characters accepted for input so that the end user cannot
        '	enter a value greater than 99. Also, don't allow null values.
        columnQuantity.ActiveCellAppearance.ForeColor = Color.Blue
        columnQuantity.AllowCellEdit = AllowCellEdit.Full
        columnQuantity.MaxLength = 2
        columnQuantity.Nullable = Nullable.Disallow

        '	make the 'Discount' column read-only.
        columnDiscount.AllowCellEdit = AllowCellEdit.ReadOnly

        '	Enable tooltips for the 'Product' column, since the
        '	name of the product might not always be fully visible.
        columnProduct.TipStyleCell = TipStyleCell.Show
    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;

		private void button3_Click(object sender, System.EventArgs e)
		{
			UltraTreeNodeColumn columnQuantity = this.ultraTree1.ColumnSettings.ColumnSets["Order Details"].Columns["Quantity"];
			UltraTreeNodeColumn columnDiscount = this.ultraTree1.ColumnSettings.ColumnSets["Order Details"].Columns["Discount"];
			UltraTreeNodeColumn columnProduct = this.ultraTree1.ColumnSettings.ColumnSets["Order Details"].Columns["ProductID"];

			//	Set the 'Quantity' column to have a ForeColor of blue for
			//	the active cell, allow editing, and restrict the number of
			//	characters accepted for input so that the end user cannot
			//	enter a value greater than 99. Also, don't allow null values.
			columnQuantity.ActiveCellAppearance.ForeColor = Color.Blue;
			columnQuantity.AllowCellEdit = AllowCellEdit.Full;
			columnQuantity.MaxLength = 2;
			columnQuantity.Nullable = Nullable.Disallow;

			//	make the 'Discount' column read-only.
			columnDiscount.AllowCellEdit = AllowCellEdit.ReadOnly;

			//	Enable tooltips for the 'Product' column, since the
			//	name of the product might not always be fully visible.
			columnProduct.TipStyleCell = TipStyleCell.Show;
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also