We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Save multiple grids data in one shot

Hi,

I have multiple syncfusion grids on a page. Each grid supports its own add/edit/delete functionality but individually they don't have save button. We have single common Save button at the end of the page which will be saving data for all the grids along with the other page fields.

Please guide on how to send all the grid data (i.e. addedRecords, deletedRecords and updatedRecords) in one shot for diff grids to server using one Save button of page?

FYI: I am using Asp.Net MVC, Syncfusion grid with excel like editing via JSON mode.

Thanks.


6 Replies

MJ Mohit Jain July 20, 2012 10:40 AM UTC

Any way to do it?



MS Mohanraj S Syncfusion Team August 23, 2012 12:52 PM UTC

Hi Mohit,

Thanks for using Syncfusion products.

Your requirement to Save multiple grids data in one shot can be achieved through client side jquery script . Please refer the following code snippet.

[Jquery]

<script type="text/javascript">

function SaveRequest()
{
var grid1 = $find("Grid1");
var grid2 = $find("Multi");
grid1.sendSaveRequest();
grid2.sendSaveRequest();
}

</script>

Please refer to the below link to download the sample application.

MultipleUpdate.zip

Please let me know if you have any concern.

Regards,
Mohanraj



CM Chris Miller June 3, 2014 05:00 PM UTC

Is there a way to do this with a single request so that the save can be a single transaction?


SI Silambarasan I Syncfusion Team June 9, 2014 05:39 AM UTC

Hi Chris,

 

Thanks for your update.

 

As per our implementation, it is not feasible to send single request (eg: SaveRequest, RefreshRequest,..) for Multiple Grid because we are not able to maintain single object for multiple grid to do features like (Paging, Sorting, ..) from single client-side request (eg: SaveRequest, RefreshRequest,..). So it is not feasible.

 

Please let us know if you need any further assistance.

 

Regards,

 

Silambarasan I



FO Fouad Ousdi February 11, 2015 09:51 AM UTC

Hi,
I have a similar issue but i am on inlineTemplateForm and i want to send changes on one shoot to a rest server (via ajax)

Thanks


AM Abdul Matin M Syncfusion Team February 12, 2015 07:04 AM UTC

Hi Fouad,

Thanks for your interest in Syncfusion products.

We have analysed your requirement and we would like to let you know that we have modified the sample attached in one of the previous update from Excel-Like edit to Inline Template Form editing. To do save action on single button click for all the grids, please refer the below code snippet.

[JavaScript]

function SaveRequest() {

        var grid1 = $find("FirstGrid");

        var grid2 = $find("SecondGrid");

        grid1.sendSaveRequest();

        grid2.sendSaveRequest();

    }

We have also attached the modified sample for your reference and the same can be downloaded from the link below.

Sample: SingleSaveMultiGrid-Sample.zip

Please use the above sample and get back to us if you have any other queries.

As already said based on our current implementation, it is not feasible to send single request (e.g.: SaveRequest, RefreshRequest...) for Multiple Grid because we are not able to maintain single object for multiple grid to do features like (Paging, Sorting...) from single client-side request (e.g.: SaveRequest, RefreshRequest...).

Please let us know if you need any further assistance.

Regards,

Abdul Matin M



Loader.
Live Chat Icon For mobile
Up arrow icon