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

Refresh Kanban data when using custom Data Adaptor

Hi,

I'm using Blazor WebAssembly with .Net6 (6.0.15) and Syncfusion 21.1.35.

I’m using the Kanban component with a custom data adaptor.


I would like to refresh the data of the Kanban (i.e., call data adaptor read) when a custom event occurred. How can I do that?

I tried RefreshAsync and CallStateHasChangedAsync Kanban methods but ReadAsync wasn’t called.


I attached an example page. When I click on the “Refresh Kanban data” button, I would like ReadAsync method to be called to have the most recent data.


Thanks for your help.


Best regards.


François


Attachment: Kanban_Refresh_fed94ac.zip

6 Replies

VY Vinothkumar Yuvaraj Syncfusion Team April 5, 2023 01:42 PM UTC

Hi Francois,


Your requirement can be achieved by re-rendering the Kanban component when you click the "Refresh Kanban data" button. Please see the following code snippet:


<SfButton @onclick="onClick"/>

@if (ButtonValue)

{

 <SfKanban @ref=_kanbanReference ID="Kanban" TValue="Order" KeyField="ShipCity">

……..

 </SfKanban>

}

 

@code {

    public bool ButtonValue = true;

    #region Button

    private async Task onClick(Microsoft.AspNetCore.Components.Web.MouseEventArgs args)

    {

        this.ButtonValue = false;

        await Task.Delay(10);

        this.ButtonValue = true;

    }

}


For further details, please check the attached sample.


Regards,

Vinothkumar


Attachment: Kanban_10995db.zip


FR François July 27, 2023 07:44 AM UTC

Hi Vinothkumar,

Thanks for your answer.

Howerver the proposed solution causes the Kanban to "flicker" which is not acceptable in my case. Indeed, I would like to refresh the Kanban when new data is available without disrupting people working on it.

The button, which I added to the example, was to simulate an event outside the Kanban. In my case It will be a notification from a server.

I subbmited a bug feedback => https://www.syncfusion.com/feedback/45645/kanban-data-refresh-not-working-when-using-custom-data-adaptor

Please come back to me if you have other solutions to this problem.

Regards,

François



VY Vinothkumar Yuvaraj Syncfusion Team July 28, 2023 03:45 PM UTC

Hi Francois,


We have created a sample based on the information you shared. In this sample, we have rendered the two Kanban components with the same custom adapter. We have modified the card status from "Moscow" to "London" and then pressed the "Refresh Kanban data" button. With that button click, we have refreshed the second Kanban board using the RefreshAsync method. In that case, the second board data is not refreshed from our end. Could you please confirm? is it your requirement or not?


If you're not facing the same issue, could you please share the following information to replicate your problem at our end?

  • Can you please share your exact code in your application, or can you please share a sample that replicates the issue?
  • If possible, please modify the shared sample to include the code that replicates the issue.
  • If possible, please provide the procedure to replicate the issue.


Please take a look at the attached sample and video for your reference.


Regards,

Vinothkumar


Attachment: blazorkanbancrudcustomadaptormaster_(1)_1a3a0e0b_22d421e9.zip


FR François August 1, 2023 02:06 PM UTC

Hi Vinothkumar,

Yes, It's the same issue I'm facing.

Thank you for this more explicit sample.

Regards,

François



VY Vinothkumar Yuvaraj Syncfusion Team August 4, 2023 03:40 PM UTC

Hi Francois,


We have logged the reported issue as a bug on our end, and a fix will be included in our patch release scheduled for the end of August. You can track the status of the issue by using the feedback link below.


https://www.syncfusion.com/feedback/45645/kanban-data-refresh-not-working-when-using-custom-data-adaptor


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


Regards,

Vinothkumar



GD Gokulraj Devarajan Syncfusion Team September 6, 2023 02:05 AM UTC

Hi Francis,

We have fixed the issue in the 22.2.12 weekly patch release. Could you please update the NuGet package to 22.2.12 to solve the issue on your end?


Release Notes: https://blazor.syncfusion.com/documentation/release-notes/22.2.12?type=all#kanban


Regards

Gokulraj Devarajan

Loader.
Live Chat Icon For mobile
Up arrow icon