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

Cancel row edit template but retain values

3 Answers 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 30 May 2016, 01:22 PM

I want to use the Grid Inline editing that presents an Update and Cancel button but I want to intercept the Update request so that I can call the Update event in the controller when a custom "Save" button is clicked.

Right now I can tap into the Update event and call grid.cancelRow() and call e.preventDefault() but in doing so when the grid cancels the edit returns the data to it's original state.  I know this is desirable for the normal scenario but in this scenario I want the update button to close the edit template in the row and leave the updated values in place and to leave the record marked as dirty.

Optimally it would leave the red triangle modified indicators in the modified cells.

 

Any suggestions would be appreciated.

3 Answers, 1 is accepted

Sort by
0
Accepted
Maria Ilieva
Telerik team
answered on 01 Jun 2016, 12:34 PM
Hello,

I am not exactly sure what do you want to achieve, but you can use the save event of the grid (fired when the focus is moved outside of the cell being edited and before the cell is closed), here you can get the entered data and save it in hidden field and after that call e.preventDefault().

Regards,
Maria Ilieva
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Reid
Top achievements
Rank 2
answered on 01 Jun 2016, 04:44 PM
We have since changed tactics and the spec someone so the question is moot.  One thing I have learned with Kendo is that you can rarely wander outside the product design out of the box and get good results.
0
Maria Ilieva
Telerik team
answered on 03 Jun 2016, 12:04 PM
Hello,

I'm sorry to hear that you find the Kendo controls difficult to customize. We appreciate your feedback and we are open for any suggestions and feature requests.
Do not hesitate to contact us back in case further assistance is needed.

Regards,
Maria Ilieva
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Reid
Top achievements
Rank 2
Share this question
or