This is a migrated thread and some comments may be shown as answers.

RadDataGrid Custom Commands

1 Answer 41 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 22 Jul 2020, 01:18 PM

 

I created a RadDataGrid and a custom edit command as described in the edit commands doc. However the Execute method is never called.

What else do I need to do to fire a commit edit command?

1 Answer, 1 is accepted

Sort by
0
Accepted
Lance | Manager Technical Support
Telerik team
answered on 22 Jul 2020, 02:02 PM

Hello Eric,

This depends on what editing approach is being used, you can find the description of when the commit occurs here - DataGrid Edit Operation

In this case of inline editing, the Commit is invoked when the row is done being edited (i.e. the user leaves the focus of the row).

Demo

In case it is useful, I've attached an example for you, here's a screenshot at runtime to verify that the Execute in invoking as expected:

 

Side Note:

You could also use DataGridUserCommand instead of a custom class and bind it to a Relay or DelegateCommand in the view model. See the DataGrid Commands article Example.

Regards,
Lance | Manager - Technical Support
Progress Telerik

Tags
DataGrid
Asked by
Eric
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or