Version

CanEnterEditMode Property (UltraGridCell)

Returns true if the cell can enter edit mode
Syntax
'Declaration
 
Public ReadOnly Property CanEnterEditMode As Boolean
public bool CanEnterEditMode {get;}
Example
Following code shows how to enter a cell in edit mode.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub Button108_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button108.Click

       Dim cell As UltraGridCell = Me.UltraGrid1.Rows(0).Cells(0)

       ' Make the cell the active cell.
       Me.UltraGrid1.ActiveCell = cell

       ' CanEnterEditMode indicates whether the cell can enter edit mode or not. It would be
       ' false when for example the underlying data source or the column is read only or 
       ' when various activation and allow-edit related properties are set to disallow the cell
       ' to enter edit mode.
       If cell.CanEnterEditMode Then
           ' IsInEditMode indicates whether the cell is currently in edit mode.
           ' Write out the value of IsInEditMode property before going into the edit mode.
           Debug.WriteLine("Before performing EnterEditMode action, is cell in edit mode ? " & cell.IsInEditMode)

           ' Make the active cell go into edit mode.
           Me.UltraGrid1.PerformAction(UltraGridAction.EnterEditMode)

           ' Write out the velue of IsInEditMode property after going into the edit mode.
           Debug.WriteLine("After performing EnterEditMode action, is cell in edit mode ? " & cell.IsInEditMode)
       End If

   End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button108_Click(object sender, System.EventArgs e)
{

	UltraGridCell cell = this.ultraGrid1.Rows[0].Cells[0];

	// Make the cell the active cell.
	this.ultraGrid1.ActiveCell = cell;

	// CanEnterEditMode indicates whether the cell can enter edit mode or not. It would be
	// false when for example the underlying data source or the column is read only or 
	// when various activation and allow-edit related properties are set to disallow the cell
	// to enter edit mode.
	if ( cell.CanEnterEditMode )
	{
		// IsInEditMode indicates whether the cell is currently in edit mode.
		// Write out the value of IsInEditMode property before going into the edit mode.
		Debug.WriteLine( "Before performing EnterEditMode action, is cell in edit mode ? " + cell.IsInEditMode );

		// Make the active cell go into edit mode.
		this.ultraGrid1.PerformAction( UltraGridAction.EnterEditMode );

		// Write out the velue of IsInEditMode property after going into the edit mode.
		Debug.WriteLine( "After performing EnterEditMode action, is cell in edit mode ? " + cell.IsInEditMode );
	}

}
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