Child component is not rendering
Issue: Child component(Diagram control) is not refreshing
In the child component, I've syncfusion diagram control. It binds well and no issues at the first time but when the data changes on the parent component which is not reflecting/refreshing on the child component. In fact, I've statehaschanged() method too on the parent but still the child component is not refreshing.
Additionally, I used blazor cascading parameter to pass the data changes to child component(diagram control) and syncfusion version 18.3.0.47
Attached the same with thread
Parent component: StockEnquiry.razor
Child component: StockDiagramHistory.razor
Approaches tried in code:
#1 statehaschanged() method in parent component - but still child component hasn't refreshed
#2 I've created method in the child component. Whenever the data changes, I passed to child's component method(internally this function calls OnInitialized method) but no luck
Could you please help.
Many thanks
Seetha.
Attachment: BlazorParentChildFiles_ab17eab8.zip
Attachment: StockEnquiryStockDiagramHistoryfiles_a2e87e14.zip
|
public void Refresh(string Id)
{
Diagram.Clear();
NodeCollection.Add(NewNode("old Diagram","green")
ConnectorCollection.Add(NewConnecctor ("old Diagram","green")
} |
Attachment: StockDiagramHistoryattempttoreconnectserver_d7be8e0.zip
|
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSyncfusionBlazor();
services.AddSingleton<HMIService>();
services.AddSingleton<MQService>();
services.AddServerSideBlazor().AddHubOptions(o =>
{
o.MaximumReceiveMessageSize = 102400000;
});
} |
Attachment: StockEnquirypty_does_not_match_issue_cc6ba94e.zip
Regards,
Attachment: StockDiagramHistorylayoutissue_de186575.zip
|
public void Refresh(List<UnitTrackingHistory> cpDataset)
{
Diagram.Clear();
CPDataset = cpDataset;
if (CPDataset != null)
ConstructDiagramModel();
// to get automatic layout alignment
Diagram. DoLayout();
} |
Attachment: Selected_node_items_are_null_issue_c6283564.zip
- 22 Replies
- 4 Participants
-
SE Seetha
- Jan 7, 2021 11:27 PM UTC
- Feb 2, 2021 01:41 PM UTC