Kanban data refresh and reload issues

Hi,

I am using syncfusion Kanban(Javascript) with DataManager(UrlAdaptor) to get data from backend. I need help to resolve following issues:

  1. I have some custom fields to show on cards. When I drag a card from one column to another, only the keyField's data get updated successfully. But the updated values of other custom fields are not shown on UI.
    On successful drop of card, a request get sent to server-side. Here, I am doing some operations which changes the values of my custom fields. And then save the data. Another request get sent to fetch the data from server-side. Here also the latest data sent in response. But this latest data does not shown on card UI.
  2. On single card drag/drop, whole Kanban data get reloaded. I tried to use flag 'enablePersistence=true' but the issue still exist. I want to reload data of only dropped card instead of whole Kanban data.
  3. There is a delay when dragging and dropping. Card will go back to original position after drop and then goes to new position once data get reloaded.
  4. I have some custom filters. When I apply them by setting 'query' field of Kanban, it sends request on server-side. How can I apply these filters on client-side data without sending request to server-side?


Please help me to resolve these issues.

Ej2 version: 19.4.48


Thanks & Regards,

Abhijit Deshpande


7 Replies

VJ Vinitha Jeyakumar Syncfusion Team November 14, 2022 01:55 PM UTC

Hi Abhijit,


Currently, we are validating your reported query. we will update you the further details on or before 17th November 2022.

Regards,
Vinitha


VJ Vinitha Jeyakumar Syncfusion Team November 18, 2022 03:13 PM UTC

Hi Abhijit,

We have tried to replicate the reported issues at our end. but we couldn't replicate the issue. we have also prepared a sample for your reference.



Please check the sample above and provide us with the exact issue reproducing runnable sample to validate further on our end.

Regards,
Vinitha




AV Abhijit V. Deshpande replied to Vinitha Jeyakumar November 22, 2022 12:26 PM UTC

Hi Vinitha,

Query-1When I drag a card from one column to another 'Location' field is get updated on server-side. This updated value not shown on UI. To replicate this please refer following sample.

Sample : https://stackblitz.com/edit/pmmemy-97nrql?file=index.html

Server side : Please refer attached file 'ScheduleCRUD_72c1a01e .zip'


Query-2On single card drag/drop, two requests get sent to server-side. 1st to save updated card data and 2nd to get whole Kanban data, I want to reload only single(updated) card here. Please refer following screenshot.

Screenshot:


Query-3There is a delay when dragging and dropping. I have added some delay at server-side on update card data. Therefore, card will go back to original position after drop and then goes to new position once data get reloaded as shown below.


Thanks & Regards,
Abhijit Deshpande


Attachment: ScheduleCRUD_72c1a01e.zip


VJ Vinitha Jeyakumar Syncfusion Team November 25, 2022 02:58 PM UTC

Hi Abhijit,

Query 1. "When I drag a card from one column to another 'Location' field is get updated on server-side. This updated value not shown on UI" 

Your reported issue can be resolved by returning only the changed card data instead of whole data in the UpdateData method. please check the code below,

Code snippet;
public JsonResult UpdateData(EditParams param)
        {
            var value = (param.action == "update") ? param.value : param.changed[0];
            var filterData = db.ScheduleEventDatas.Where(c => c.Id == Convert.ToInt32(value.Id));
            ScheduleEventData appointment = new ScheduleEventData();
            if (filterData.Count() > 0)
            {
                appointment = db.ScheduleEventDatas.Single(A => A.Id == Convert.ToInt32(value.Id));

                appointment.Subject = value.Subject;

                // Some custom logic to set location (Ref:Query-1)
                String location = value.Location;
                if ("Open".Equals(value.Subject)){
                    location = "India";
                }
                else if("InProgress".Equals(value.Subject)){
                    location = "UK";
                }
                else if ("Testing".Equals(value.Subject)){
                    location = "Australia";
                }
                else if ("Close".Equals(value.Subject)){
                    location = "US";
                }
                appointment.Location = location;
                appointment.Description = value.Description;

                // Adding some delay (Ref:Query-3)
                System.Threading.Thread.Sleep(2000);
            }
            db.SubmitChanges();

            System.Diagnostics.Debug.WriteLine(" Action to update card data is called");
            return Json(appointment, JsonRequestBehavior.AllowGet);
        }

Query 2. "On single card drag/drop, two requests get sent to server-side. 1st to save updated card data and 2nd to get whole Kanban data"

This is the intended behavior of the Kanban when using URL adaptor, the first request - sent to modified data into server side and save them into database. second request is to get all the data from database.

Query 3. "There is a delay when dragging and dropping. I have added some delay at server-side on update card data"

Currently, we are validating on your requirement. we will update you the further details on or before 29th November 2022.

Regards,
Vinitha




AV Abhijit V. Deshpande replied to Vinitha Jeyakumar November 29, 2022 03:09 PM UTC

Hi Vinitha,


Thanks for your reply.

Query 1. I have tried the solution suggested by you. But the issue still exists. You can replicate the same with the sample code provided by me in our previous discussion. Please provide me a working solution.


Thanks & Regards,
Abhijit Deshpande



VJ Vinitha Jeyakumar Syncfusion Team November 30, 2022 07:32 AM UTC

Hi Abhijit,


We have already considered your reported issue as a bug from our end and the fix also included with our patch release version 20.2.38. So please upgrade your package to the V20.2.38 or latest to resolve the issue from your end.




Regards,
Vinitha


VJ Vinitha Jeyakumar Syncfusion Team December 13, 2022 02:26 PM UTC

Hi Abhijit,


Query 3. "There is a delay when dragging and dropping. I have added some delay at server-side on update card data"

We want to let you know that this is the behavior of the Kanban control with Url adaptor for CRUD operation. When we drag and drop the card, we will use the clone for dragged cards and will only update the card to the dragged location after updating the remote data and until then a spinner will shown indicating the update process.

Regards,
Vinitha

Loader.
Up arrow icon