Xceed Toolkit Plus for WPF v4.6 Documentation
EditTriggers Enumeration
Example Example 


Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace : EditTriggers Enumeration
Value indicating what triggers will cause cells to enter edit mode.
Syntax
'Declaration
 
<FlagsAttribute()>
Public Enum EditTriggers 
   Inherits System.Enum
'Usage
 
Dim instance As EditTriggers
[Flags()]
public enum EditTriggers : System.Enum 
Members
MemberDescription
ActivationGestureCells will enter edit mode when the user performs the appropriate activation gesture for the current cell's editor.
BeginEditCommandCells will enter edit mode when the Edit Command (default F2) is sent to the containing DataRow.
CellIsCurrentA cell will enter edit mode when  it becomes current.
ClickOnCurrentCellThe current cell will enter edit mode when it is clicked.
NoneNo special triggers will cause cells to enter edit mode.
RowIsCurrentAll cells in a row will enter edit mode when the row becomes current.
SingleClickCells will enter edit mode when it is clicked.
Remarks

The conditions under which cell editors are displayed are determined by the value of the CellEditorDisplayConditions Property, which can be defined for the entire grid or per row. The EditTriggers and CellEditorDisplayConditions properties work independently of each other. For example, if the EditTriggers property is set to None and the CellEditorDisplayConditions property is set to CellIsCurrent, when a cell becomes current, its editor will be displayed and the content of the cell can be edited when focus is given to the cell editor.

A cell editor can be displayed without it being in edit mode.

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>
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Xceed.Wpf.DataGrid.EditTriggers

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

Reference

Xceed.Wpf.DataGrid Namespace

Properties

EditTriggers Property (DataGridControl Class)
EditTriggers Property (Row Class)