Gets or sets a value indicating what triggers will cause cells to enter edit mode.
Syntax
Property Value
An EditTriggers value indicating what triggers will cause cells to enter edit mode. By default, EditTriggers.BeginEditCommand, ClickOnCurrentCell, and ActivationGesture.
Member |
Description |
None |
No special triggers will cause cells to enter edit mode. |
BeginEditCommand |
Cells will enter edit mode when the Edit Command (default F2) is sent to the containing DataRow. |
ClickOnCurrentCell |
The current cell will enter edit mode when it is clicked. |
SingleClick |
Cells will enter edit mode when it is clicked. |
CellIsCurrent |
A cell will enter edit mode when it becomes current. |
ActivationGesture |
Cells will enter edit mode when the user performs the appropriate activation gesture for the current cell's editor. |
RowIsCurrent |
All cells in a row will enter edit mode when the row becomes current. |
Example
All examples in this topic assume that the grid is bound to the
Orders table of the Northwind database, unless stated otherwise.
The following example demonstrates how to enter edit mode only when a cell becomes current by setting the EditTriggers property to CellIsCurrent.
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
<Grid.Resources>
<xcdg:DataGridCollectionViewSource x:Key="cvs_orders"
Source="{Binding Source={x:Static Application.Current},
Path=Orders}"/>
</Grid.Resources>
<xcdg:DataGridControl x:Name="OrdersGrid"
ItemsSource="{Binding Source={StaticResource cvs_orders}}"
EditTriggers="CellIsCurrent"/>
</Grid>
Requirements
Target Platforms: Windows 11, Windows 10, 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