Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

While loading the data source and assign the value in the OnInitializedAsync, then value is not displayed in the component.


Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/MultiSelect_OninitilizedAsync838718201


<SfMultiSelect TValue="int[]" TItem="Countries" @bind-Value="val" Mode="@VisualMode.CheckBox" Placeholder="All Dealer(s) and All Location(s)..." DataSource="@DataSource" ShowSelectAll="true" Width="20em" EnableSelectionOrder="true" FilterBarPlaceholder="Search Dealers and Locations" EnableGroupCheckBox="true" ShowDropDownIcon="true" PopupHeight="500px" CssClass="field">


    <MultiSelectEvents TValue="int[]" TItem="Countries" ValueChange="@((args) => DealerLocationDropDownChanged(args, "msDealersandLocations"))"></MultiSelectEvents>


    <MultiSelectFieldSettings GroupBy="Dealername" Value="Code" Text="Name"></MultiSelectFieldSettings>


</SfMultiSelect>

@code {



    public int[] val { get; set; }


    public CountryService DataService;

    public List<Countries> DataSource = new List<Countries>();

        protected override async Task OnInitializedAsync()

    {

        DataSource = await ownservice.GetDataAsync();

        this.val = await ownservice.GetPreSelectDataAsync();

    }

    public void DealerLocationDropDownChanged(MultiSelectChangeEventArgs<int[]> args, string name)

    {


    }

}