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

Is there event row edit ending?

1 Answer 106 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jens Hobbie
Top achievements
Rank 1
Jens Hobbie asked on 21 Oct 2011, 02:05 PM

Hello,

We have a problem with RadGridView. I could not find event that is raised before edit is canceled (row is deleted in this case). In RowEditEnded event, action is already done and I could not revert it.
Is there a way to handle event when row leaves edit mode on double presses the Esc key?

My scenario is:

-          Insert new row in RadGridView.

-          Insert data in some cell.

-          Press Esc to cancel edit of that cell.

-          If Esc is pressed twice, added row disappears.

I want to prevent user from losing data accidentally. I want to ask user to confirm canceling and only after his confirmation row can leave edit mode (can be removed in this case). If he doesn’t confirm cancel, row stays in edit mode.

Thank in advance on any help. :)

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Oct 2011, 02:08 PM
Hello,

 You can implement IEditableObject (look for CancelEdit in this case) for your data item to achieve your goal. 

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Jens Hobbie
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or