Version

AllowCellEdit Property (UltraTreeColumnSet)

Gets/sets whether cells can be 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 of the UltraTreeColumnSet object to configure the cell editing functionality for a particular UltraTreeColumnSet:

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 columnSet As UltraTreeColumnSet = Me.ultraTree1.ColumnSettings.ColumnSets(0)

        '	Use the ActiveCellAppearance to bring attention to the cell
        '	with the input focus
        columnSet.ActiveCellAppearance.BackColor = Color.Red
        columnSet.ActiveCellAppearance.ForeColor = Color.White

        '	Set AllowCellEdit to 'ActivateOnly' so that clicking a cell does
        '	not put in into edit mode immediately
        columnSet.AllowCellEdit = AllowCellEdit.ActivateOnly

        '	Enable tooltips for cells whose value is not fully visible
        columnSet.TipStyleCell = TipStyleCell.Show
    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;

		private void button3_Click(object sender, System.EventArgs e)
		{
			UltraTreeColumnSet columnSet = Me.ultraTree1.ColumnSettings.ColumnSets[0];

			//	Use the ActiveCellAppearance to bring attention to the cell
			//	with the input focus
			columnSet.ActiveCellAppearance.BackColor = Color.Red;
			columnSet.ActiveCellAppearance.ForeColor = Color.White;

			//	Set AllowCellEdit to 'ActivateOnly' so that clicking a cell does
			//	not put in into edit mode immediately
			columnSet.AllowCellEdit = AllowCellEdit.ActivateOnly;

			//	Enable tooltips for cells whose value is not fully visible
			columnSet.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