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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Collection "editedRecords"

Thread ID:





147581 Sep 17,2019 08:39 AM UTC Sep 18,2019 11:17 AM UTC ASP.NET MVC - EJ 2 1
Tags: Gantt Chart
Peter Rosenstein
Asked On September 17, 2019 08:39 AM UTC

Hello Support,


i like to use gannt-chart to update our project database.
I defined a Sync button -> this function should save all updates from the Gannt-Chart to our Database.
I found in the DataStructure the collection "editedRecords" but it was empty after editing the GanttChart.
Do you plan to populate this collection in a next version ?

i also tried the event "EndEdit" but it was not fired wenn i press the save button in the Edit-Dialog.

Do you have an example with best praxis to save the updated Date back to the webserver?

Thank you for your support
with best regards from Austria

Gurunathan A [Syncfusion]
Replied On September 18, 2019 11:17 AM UTC

Hi Peter, 
In Gantt, we have provided support to update the CRUD action updates in Gantt control to server by using DataManager support. By using this support in Gantt, we can pass the updated data source to server on CRUD actions. We can define data source for Gantt as instance of DataManager and by using BatchUrl property of DataManager we can update the data source on CRUD operation. Please find the below code example. 
        public ActionResult BatchSave([FromBody]ICRUDModel<TreeGridProjectData> data) 
            if (data.added != null && data.added.Count() > 0) 
                foreach (var rec in data.added) 
            ////Performing update operation 
            if (data.changed != null && data.changed.Count() > 0) 
                foreach (var rec in data.changed) 
            //Performing delete operation 
            if (data.deleted != null && data.deleted.Count() > 0) 
                foreach (var rec in data.deleted) 
            return Json(new { addedRecords = uAdded, changedRecords = uChanged, deletedRecords = uDeleted}); 
        public TreeGridProjectData Create(TreeGridProjectData value) 
        public TreeGridProjectData Edit(TreeGridProjectData value) 
        public TreeGridProjectData Delete(string value) 
        .DataSource(dataManager => { dataManager.Url("/Home/UrlDatasource") 
        .Adaptor("UrlAdaptor"); }) 
Please find the below sample link. 
Note: In all server-side update, we have passed the data as array of object, because in Gantt when edit any task all parent and dependent task are updated and on delete action, if the task has children all children task also deleted. So, by default we have passed the updated task details as array to server. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon