New to Telerik UI for WinUI? Download free 30-day trial

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:

  1. 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).
  2. The user can cancel an edit operation over a row by clicking the Cancel button of the editing UI or by pressing the Esc key.
  3. 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 the Enter key.

Inline User Edit Mode

WinUI EditingUI

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(object item, DataGrid owner)—Called when the BeginEdit command is executed.

  • Void CancelEdit()—Called when the CancelEdit command is executed. Make sure that the EditCanceled event handler is called. You can also call it from your editor to cancel the editing.

  • Void CommitEdit()—Called when the CommitEdit command is executed. Make sure that the EditCommitted 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 the CancelEdit() 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 the CommitEdit() implementation.

  • Position (ExternalEditorPosition)—Gets or sets the position at which the custom editor will be visualized. The possible values are { Right, Left }.

In this article
Not finding the help you need?