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

Invoke Batch Edit Grid Item Save Server-Side

1 Answer 533 Views
Grid
This is a migrated thread and some comments may be shown as answers.
EJ
Top achievements
Rank 1
EJ asked on 22 Aug 2014, 11:17 AM
I am very interested in using batch edit, but as most of the logic in our application is server-side, I need a way to server-side call a method on the RadGrid which is in Batch Edit mode upon post back of the page that asks it to save all edited items if any exist.

We have a save button which is OUTSIDE of the radgrid that saves not just the radgrid but also other data in the formview control - so when they click on that save button I want to invoke the save changes in the radgrid which is in batch edit mode.

Also in case they forget to click on the button but click on something else I want to auto-save without any user confirmation upon post back to the save (since I understand that all user changes are lost upon postback when you are in radgrid batch edit mode). How can I invoke "save batch mode if there are any changes" from a page_load method for example.

I see this http://www.telerik.com/support/code-library/prevent-losing-batch-editing-changes-on-paging-or-any-other-postback but I don't want a "are you sure" asked of the user - just an automatic invoking of saving any changed rows in the batch without asking the user any questions or requiring the user to click on any other buttons.

I cannot find this in the docs. It seems as if Telerik only allows invoking the save of radgrids in batch edit from client side javascript - not server side c#.

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 26 Aug 2014, 07:41 AM
Hello,

In this case you can use the saveAllChanges method of client-side API of the batch editing and call it in any place necessary to auto-save the data.
grid.get_batchEditingManager().saveAllChanges()

If you have any further questions we can continue the communication in the support ticket on the same issue in order to avoid duplicate posts.

Regards,
Marin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
EJ
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or