Editing Start Triggers
RadGridView supports few different gestures that trigger the cell edit action. The default gestures are clicking on the current cell, pressing F2 on the keyboard, and starting typing when the current cell is focused.
The edit start actions are defined with the GridViewEditTriggers
enum that is assigned to the EditTriggers
property of the GridView or the column objects. The enum provides the following set of values:
Default
—The default setting which combines theCurrentCellClick
,F2
andTextInput
values.CellClick
—A single click will put the cell into edit mode.CurrentCellClick
—A click on the current cell will put it into edit mode.F2
—Pressing F2 on a cell will put it into edit mode.None
—No action will put the cell in edit mode.TextInput
—Any text input will put the current cell into edit mode.
To change the edit triggers for all cells in the RadGridView
instance, set its EditTriggers
property.
Setting RadGridView EditTriggers property
<telerik:RadGridView EditTriggers="F2"/>
EditTriggers
property of the associated GridViewColumn object.
Setting GridViewColumn EditTriggers property
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn EditTriggers="F2" />
</telerik:RadGridView.Columns>
GridViewEditTriggers
is a flag enum which means that you can combine multiple values, thus allowing multiple triggers.
Setting the EditTriggers property to multiple values in XAML
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn EditTriggers="CurrentCellClick,F2,TextInput" />
</telerik:RadGridView.Columns>
Setting the EditTriggers property to multiple values in code
this.gridView.EditTriggers = GridViewEditTriggers.CellClick | GridViewEditTriggers.F2;
EditTriggers
property to None
.
Disabling editing by using the UI
<telerik:RadGridView EditTriggers="None"/>