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

Edit Operation

This article provides information about the different UserEditModes of the RadDataGrid.

Inline Editing

When the UserEditMode is Inline, the following operations can be performed by a user:

  1. The user can begin an edit operation over a row by performing a double tap gesture over a cell or by hitting 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 hitting the Esc key.
  3. The user can commit an edit operation over a row by tap/click over another cell, by clicking the Save button from the editing UI or by hitting the Enter key.

Figure 1: Inline UserEditMode

EditingUI

External Editing

The External UserEditMode allows you to create a custom external editor. You can do that through setting the ExternalEditor property, which expects an implementation of the IGridExternalEditor interface, that requires the following members:

  • void BeginEdit(object item, RadDataGrid owner): Called when the BeginEdit command is executed.
  • void CancelEdit(): This method is called when the CancelEdit command is executed. Make sure that the EditCanceled event handler is called here. You can also call it from your editor to cancel the editing.
  • void CommitEdit(): This method is called when the CommitEdit command is executed. Make sure that the EditCommitted event handler is called here. 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?