このプロパティは、セルが編集モードかどうかを示します。ActiveCell プロパティは、セルが編集モードであるかどうかを決定するために使用できます。
BeforeEnterEditMode イベントは、セルが編集モードに入る前に生成されます。
BeforeExitEditMode イベントは、セルが編集モードから出る前に生成されます。
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 ); } }