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
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
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
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?
Please take a look at the attached sample and video for your reference.
Regards,
Vinothkumar
Hi Vinothkumar,
Yes, It's the same issue I'm facing.
Thank you for this more explicit sample.
Regards,
François
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.
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
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