Edit Operation
The DataGrid supports different user edit modes through its UserEditMode
property.
Inline Editing
When the UserEditMode
is set to Inline
, the user can perform the following operations:
- The user can begin an edit operation over a row by performing a double tap gesture over a cell or by pressing the
F2
key (begins an editing operation over the current row). - The user can cancel an edit operation over a row by clicking the
Cancel
button of the editing UI or by pressing theEsc
key. - The user can commit an edit operation over a row by tapping or clicking another cell, by clicking the
Save
button from the editing UI or by pressing theEnter
key.
Inline User Edit Mode
External Editing
The External user edit mode allows you to create a custom external editor through setting the ExternalEditor
property. ExternalEditor
expects an implementation of the IGridExternalEditor
interface that requires the following members:
Void
BeginEdit
(objectitem
, DataGridowner
)—Called when theBeginEdit
command is executed.Void
CancelEdit()
—Called when theCancelEdit
command is executed. Make sure that theEditCanceled
event handler is called. You can also call it from your editor to cancel the editing.Void
CommitEdit()
—Called when theCommitEdit
command is executed. Make sure that theEditCommitted
event handler is called. You can also call it from your editor to commit the changes.Event EventHandler
EditCanceled
—Used to notify the grid that the editing has been canceled. Make sure that this event handler is called in theCancelEdit()
implementation.Event EventHandler
EditCommitted
—Used to notify the grid that the changes are ready to be committed. Make sure that this event handler is called in theCommitEdit()
implementation.Position
(ExternalEditorPosition
)—Gets or sets the position at which the custom editor will be visualized. The possible values are {Right
,Left
}.