# Edit Mode

## Content



In **FlexGrid**, edit mode can be invoked at runtime using mouse click or even keyboard. To determine programmatically whether the grid is in edit mode, you can read the value of [ActiveEditor](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.GridControl/C1.WinUI.Grid.C1GridControl.ActiveEditor.html) property. If the grid is in edit mode, the property returns a reference to the control that is being used as editor such as **TextBox** or **ComboBox**. However, if the grid is not in edit mode, the property returns **null**.

To put the grid in edit mode programmatically, you can use the [StartEditing](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Grid/C1.WinUI.Grid.FlexGrid.StartEditing.html) method and to finish editing, you can call the [FinishEditing](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.GridControl/C1.WinUI.Grid.C1GridControl.FinishEditing.html) method.

In addition, FlexGrid fires various events to facilitate better control on the editing process. Below table lists the sequence of events which are fired by the grid during the editing process.

| **Event Name** | **Description** |
| --- | --- |
| [BeginningEdit](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Grid/C1.WinUI.Grid.FlexGrid.BeginningEdit.html) | The event occurs when the editing process in a cell is about to start. |
| [CellEditEnded](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Grid/C1.WinUI.Grid.FlexGrid.CellEditEnded.html) | The event occurs after the editing process of a cell is committed. |
| [CellEditEnding](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Grid/C1.WinUI.Grid.FlexGrid.CellEditEnding.html) | The event occurs before the editing process in a cell is committed. |
| [PrepareCellForEdit](/componentone/api/winui/online-winui/dotnet-api/C1.WinUI.Grid/C1.WinUI.Grid.FlexGrid.PrepareCellForEdit.html) | The event occurs before an editor cell becomes active and it is created. |