Skip to main content
A newer version of this page is available. .

DataGridView.EditorShowing Event

Fires when a cell editor is about to be displayed and allows you to cancel the action.

Namespace: DevExpress.Maui.DataGrid

Assembly: DevExpress.Maui.DataGrid.dll

NuGet Package: DevExpress.Maui.DataGrid

Declaration

public event EventHandler<EditorShowingEventArgs> EditorShowing

Event Data

The EditorShowing event's data class is EditorShowingEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
FieldName
Item
RowHandle

Example

The code below shows how to prevent the Priority column from being edited if an item was sent more than a month ago.

Data Grid View Showing Editor

<dxg:DataGridView x:Name="dataGridView"
                  Grid.Row="1"
                  EditorShowMode="Tap"
                  EditorShowing="dataGridView_ShowingEditor"
                  ItemsSource="{Binding Path=OutlookData}"
                  Tap="Handle_Tap"
                  ValidateCell="DataGridView_ValidateCell"
                  ValidationError="DataGridView_ValidationError">
    <dxg:DataGridView.Columns>
        <dxg:NumberColumn FieldName="Id" Width="70" IsReadOnly="true"/>
        <dxg:ComboBoxColumn FieldName="Priority" MinWidth="120"/>
        <dxg:TextColumn FieldName="From.Name" Caption="From" MinWidth="150" ClearIconVisibility="Auto"/>
        <dxg:DateColumn FieldName="Sent" Width="110"/>
        <dxg:TimeColumn FieldName="Time" Width="100"/>
    </dxg:DataGridView.Columns>
</dxg:DataGridView>
See Also