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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

batch save

Thread ID:

Created:

Updated:

Platform:

Replies:

127526 Nov 21,2016 03:31 PM UTC Nov 22,2016 05:08 PM UTC JavaScript 1
loading
Tags: ejTreeGrid
issam
Asked On November 21, 2016 03:31 PM UTC

hi,

i am using the ejtreegrid to display and edit my hierarchical data

also i am aware of the endEdit and actionComplete events that can be used to send data to the server to persist modifications .

what i want if possible is to work locally in the client side, (add nodes/ delete/ update .... etc) and when happy with the results sand all the modifications with  a button for example to the  server (a controller or something) to persist .

the goal is to revert back to the original state if something wrong happen during the edit


any idea on how this could be done is welcome .

thanks .



Jonesherine Stephen [Syncfusion]
Replied On November 22, 2016 05:08 PM UTC

Hi Issam, 
Thanks for contacting Syncfusion support 
We have prepared the work around and passed the updated data source to server side. 
To update the database with modified values we have deleted the existing values in a SQL table and populated the table with modified data source.  
We can save the data base in button click action otherwise we can revert changes by reloading the page without saving. 
Please find the code example for client side action: 
<button onclick="checkdata()" style="margin-top:20px">Submit</button>     
    <script>         
        function checkdata() {             
            var treeObj = $("#TreeGridContainer").data("ejTreeGrid"),              
              records = treeObj.model.dataSource; 
            $.ajax({ 
                type: "POST", 
                url: "TreeGrid/Update", 
                data: JSON.stringify({ Task: records }), 
                contentType: "application/json; charset=utf-8", 
                dataType: "json", 
            }); 
        }         
    </script> 
We have prepared the sample for your reference. Please find the sample from below location 
Disclaimer: We have removed bin and obj folder in the given sample for some security reasons, we must include Syncfusion.EJ and Syncfusion.EJ.MVC dlls to render the TreeGrid control which is available in Essential Studio installed location.   
Please let us know if you require further assistance on this.
Regards, 
Jone sherine P S
  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;