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

Kanban not updating after edit - UrlAdaptor in VBhtml

I've got a kanban control that i'm trying to allow editing on.

The Kanban populates correctly, from the post to /stock/datasource2

if you double click to edit a card, or drag it to another column, I get the post to /stock/update which does change the datasource.

There's then another post to /stock/datasource2 which DOES retrieve the updated details

however these arent displayed - the card returns to its original position.

If i reload the page, then the card moves to its new location.

Any ideas where I can fix this?



1 Reply

VJ Vinitha Jeyakumar Syncfusion Team February 1, 2023 11:12 AM UTC

Hi Ross,

You need to return the updated data in the update URL method to get updated in data source. Please check the sample attached below for your reference.

Code snippet:
public ActionResult Update(CRUDModel<OrdersDetails> myObject)
        {
            var ord = myObject;
            OrdersDetails val = OrdersDetails.GetAllRecords().Where(or => or.GetType().GetProperty(myObject.KeyColumn).GetValue(or).ToString() == myObject.Key.ToString()).FirstOrDefault();

            if (val != null)
            {
                val.OrderID = ord.Value.OrderID;
                val.EmployeeID = ord.Value.EmployeeID;
                val.CustomerID = ord.Value.CustomerID;
                val.Freight = ord.Value.Freight;
                val.OrderDate = ord.Value.OrderDate;
                val.ShipCity = ord.Value.ShipCity;
                val.ShipAddress = ord.Value.ShipAddress;
                val.ShippedDate = ord.Value.ShippedDate;
            }
            return Json(ord.Value);

        }



Regards,
Vinitha

Loader.
Live Chat Icon For mobile
Up arrow icon