'Declaration Public Event BeforeCellEnterEditMode As BeforeCellEnterEditModeEventHandler
public event BeforeCellEnterEditModeEventHandler BeforeCellEnterEditMode
The event handler receives an argument of type BeforeCellEnterEditModeEventArgs containing data related to this event. The following BeforeCellEnterEditModeEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from System.ComponentModel.CancelEventArgs) | |
Cell (Inherited from Infragistics.Win.UltraWinTree.CancelableCellEventArgs) | Returns the UltraTreeNodeCell object for which this instance was created. |
Column (Inherited from Infragistics.Win.UltraWinTree.CancelableCellEventArgs) | Returns the UltraTreeNodeColumn for which this instance was created. |
Node (Inherited from Infragistics.Win.UltraWinTree.CancelableCellEventArgs) | Returns the UltraTreeNode for which this instance was created. |
Imports Infragistics.Win Imports Infragistics.Win.UltraWinTree Private Sub ultraTree1_BeforeCellEnterEditMode(ByVal sender As Object, ByVal e As BeforeCellEnterEditModeEventArgs) Handles ultraTree1.BeforeCellEnterEditMode If e.Column.Key = "Address" Then Dim cellValue As Object = e.Cell.Value If cellValue Is Nothing Or cellValue Is System.DBNull.Value Then Dim status As Object = e.Node.Tag If Not status Is Nothing And status = "DO_NOT_CHANGE_EMPTY_VALUES" Then e.Cancel = True MessageBox.Show("Cell value cannot be modified.", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop) End If End If End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinTree; using System.Diagnostics; private void ultraTree1_BeforeCellEnterEditMode(object sender, Infragistics.Win.UltraWinTree.BeforeCellEnterEditModeEventArgs e) { if ( e.Column.Key == "Address" ) { object cellValue = e.Cell.Value; if ( cellValue == null || cellValue == System.DBNull.Value ) { object status = e.Node.Tag; if ( status != null && status is string && (string)status == "DO_NOT_CHANGE_EMPTY_VALUES" ) { e.Cancel = true; MessageBox.Show( "Cell value cannot be modified.", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Stop ); } } } }
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