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