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

Persisting Data To The Server: Crud Method Not Run

I followed your example and this is my setup:

.DataSource(ds => ds.URL("GetData").CrudURL("Crud").Adaptor(AdaptorType.UrlAdaptor))
.Columns(col =>
col.HeaderText("To Do").Key("ToDo").ShowAddButton(true).Add();
col.HeaderText("In Progress").Key("InProgress").Add();
.ContextMenuSettings(menu => menu.Enable(true))
.Fields(field =>
.EditSettings(edit =>
.EditItems(e =>
Then on the server-side:
public ActionResult Crud(List added, List changed, List deleted)

The GetData works great; however I just cannot seem to get the Crud action to be hit when i add a new card or edit a card. I did nto try deleting but I suspect it won;t delete either. However, when I move a card the Crud method gets hit.

I have a feeling it's a config problem of some sort or i am missing a step somewhere because the method is run when I move the card.
Appreciate your help and thank you in advance.

4 Replies

BS Buvana Sathasivam Syncfusion Team August 14, 2017 08:48 AM UTC

Dear Customer,   
Thanks for using Syncfusion product.   
We had prepared Kanban control sample with CRUD operations using ejDataManagerURL property is used to load data into Kanban and CrudURL property is used to get post action for processing adding/editing/deleting/updating data’s. You can use the below solution to perform CRUD actions. Please refer to the below code example and sample.       
       .DataSource(ds =>         
   // To load data using  “GetData” method.        
 // added, changed, and deleted data’s can get in the CrudURL post action.        
.CrudURL("Crud").Adaptor(AdaptorType.UrlAdaptor))  //Define the DataManger.          
private NORTHWNDEntities db = new NORTHWNDEntities();    
public ActionResult GetData(Syncfusion.JavaScript.DataManager value)    //To render all Kanban cards.                       {                                                                         
                      var DataSource = db.Tasks.ToList();    
           DataResult result1 = new DataResult();    
           DataOperations operation = new DataOperations();    
           result1.result = DataSource;    
           result1.count = DataSource.AsQueryable().Count();    
           if (value.Skip > 0)    
               result1.result = operation.PerformSkip(result1.result, value.Skip);    
           if (value.Take > 0)    
               result1.result = operation.PerformTake(result1.result, value.Take);    
          if (value.Select != null && value.Select.Count >0)    
               return Json(result1.result, JsonRequestBehavior.AllowGet);    
           return Json(result1, JsonRequestBehavior.AllowGet);        
        //Edit multiple cards for priority drag and drop    
        public ActionResult Crud(List<Task> changed, List<Task> added,List<Task> deleted)   // Called Crud method when adding, updating and deleting operation performed   
            //Performing insert operation    
            if (added != null && added.Count() > 0)         
                foreach (var temp in added)    
            //Performing update operation    
            if (changed != null && changed.Count() > 0)    
                foreach (var temp in changed)    
                    Task old = db.Tasks.Where(o => o.Id == temp.Id).SingleOrDefault();    
                    if (old != null)    
            //Performing delete operation    
            if (deleted != null && deleted.Count() > 0)    
                foreach (var temp in deleted)    
                    db.Tasks.Remove(db.Tasks.Where(o => o.Id == temp.Id).SingleOrDefault());    
            var data = db.Tasks.ToList();    
            return Json(data, JsonRequestBehavior.AllowGet);    
Please refer to the below sample and UG documentation:       
Please check the sample and let us know if we have misunderstood any of your requirement.  If so, provide more details (like controller page) regarding your requirement so that we can check and provide an appropriate solution.     
Buvana S.    

SY syntax August 16, 2017 04:36 AM UTC


Thank you for the reply. i am doing all that and I just double checked. 

When I move the card, or delete it, I see the busy icon on the screen - and it hits my Crud ActionResult breakpoint.

But whenever I add or update, the screen just flashes and goes back to how it was. The breakpopint in my Crud ActionResult is not hit.

Since the control hits the Action when the card is moved or deleted, I believe everything is correct however, for some reason, add and edit methods after clicking save on the dialog is not hit. Unfortunately, the edit dialog does not allow me to debug anything so all I see is screen resetting itself. 

Have you ever seen this behavior?

SY syntax August 16, 2017 05:49 AM UTC

OK, have some more data after some digging in.

I created a client Side Event;

.ClientSideEvents(eve => eve.ActionComplete("complete"))

then on my javascript;


    function complete(args) {




When I click "Edit Card", beginEdit is fired as expected. However, when I make a change on the edit card, and hit save, then cancel is the request type and I think this is the root of all of my problems. Something is not tied correctly. 

So, what can I do? Shall I get the latest? - I have 2017.2, and I know that 2017.3 is out. Or would defining a dialog template help? 

BS Buvana Sathasivam Syncfusion Team August 16, 2017 05:09 PM UTC

Dear Customer, 

Thanks for your update. 
The "cancel" request has been triggered first and then CRUD operation was performed when we click the dialog save button. The data values have been added into a data source while CRUD action performed.  After that “save” request has been triggered.  Please find the below video. 
We were unable to reproduce your reported issue. we can’t deduce the cause of the issue. So, please share more details about the issue (like controller level codes or console script error or simple sample or reproduce your issue on the attached sample) and send it to us so that we can work on solving the issue.   

Buvana S. 

Live Chat Icon For mobile
Up arrow icon