Dear Customer,
Thanks for contacting Support.
We have checked your reported query “how to refresh custom component inside Tab” with shared sample code and you can invoke the OnInitialized method of CustomComponent1 by applying conditional statements based on the checked value of Radio button. Refer the below code for that.
<SfTab LoadOn="ContentLoad.Dynamic"> <TabItems> <TabItem> <ChildContent> <TabHeader Text="tab1"></TabHeader> </ChildContent> <ContentTemplate> @if (IsChecked) // To Refresh Customcomponent1 based on the IsChecked value { <CustomComponent1></CustomComponent1> } else { <CustomComponent1></CustomComponent1> } </ContentTemplate> </TabItem> ... </TabItems> </SfTab> <br /> <SfRadioButton Name="donemRadio" Value="1" @bind-Checked="IsChecked"></SfRadioButton> <SfRadioButton Name="donemRadio" Value="2"></SfRadioButton> @code{ public bool IsChecked { get; set; } = true; } |
Also, you can download this sample using the following link.
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/TabComponent-1997165823
Kindly try with a shared solution and get back to us, If you need further assistance.
Regards
Vengatesh