SfButton @onclick="@OnClicked">Open Modal Dialog</SfButton>
<SfDialog @bind-Visible="@IsVisible" Width="250px" IsModal="true">
<DialogEvents OnOverlayClick="OnOverlayclick">
</DialogEvents>
<DialogTemplates>
<Content>
<div class="control_wrapper">
<SfMultiSelect TValue="string[]" @ref=" mulObj" Placeholder="e.g. Australia" Mode="VisualMode.CheckBox" DataSource="@Country" Value="@SelectedCountries" ShowDropDownIcon="true">
<MultiSelectFieldSettings Value="Code" Text="Name"></MultiSelectFieldSettings>
</SfMultiSelect>
</div>
</Content>
</DialogTemplates>
<DialogEvents Opened="@open"></DialogEvents>
</SfDialog>
@code {
private bool IsVisible { get; set; } = true;
SfMultiSelect<string[]> mulObj;
private void open()
{
mulObj.Refresh();
}
...
} |
|
Hi,
Thank you for the example above, it is just what I'm looking for. But it's not working for version 20.x.
The example is written for version 18.x.
Can you please update the example above to work with SyncFusion.Blazor 20.x?
I Tried, but did not find a way to make it work with the latest version of SyncFusion.Blazor
Kind Regards
Svein Berger
Hi Svein,
We suggest to use RefreshDataAsync() method which is used to refresh the popup list items.
This method is available in latest Nuget version(20.2.43). we have attached the APL documentation and code snippet for your reference.
@code { private bool IsVisible { get; set; } = true; SfMultiSelect<string[],Countries> mulObj; private void open() { mulObj.RefreshDataAsync(); }
|
API documentation : https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.SfMultiSelect-2.html#Syncfusion_Blazor_DropDowns_SfMultiSelect_2_RefreshDataAsync
Regards,
Mohanraj M