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

So I have a SfMultiSelect  and a SfDropDownList where the SfMultiSelect is populated based on ValueChange event of  SfDropDownList.

  1.  SfMultiSelect  howSelectAll is set to true, however the first time the ValueChange event is fired the SelectAll is not included in the popup list, after selecting any item and then go back to select another you can see it there
  2. if an item is selected from  SfDropDownList  that doesn't lead to any items in  SfMultiSelect  that's fine it works but when you go back and select an item that leads to populated  SfMultiSelect  the ItemTemplate of the  SfMultiSelect  doesn't work, the popup list count is correct but there isn't any text there 
  3. the  SfMultiSelect  works fine by itself if populated outside the event
  4. I'm using v 18.3.0.53
please your help
==============================================

<div class="form-group">

    <div>

        <SfDropDownList Enabled="true" @bind-Value="@agent" TItem="Agent" TValue="string" Placeholder="Agent" FloatLabelType="@FloatLabelType.Auto" PopupHeight="auto" DataSource="@agents">

            <DropDownListFieldSettings Text="AgentName" Value="AgentCode"></DropDownListFieldSettings>

            <DropDownListEvents TItem="Agent" TValue="string" ValueChange="OnChange"></DropDownListEvents>

            <DropDownListTemplates TItem="Agent">

                <ItemTemplate>

                    @((context as Agent).AgentCode): @((context as Agent).AgentName)

                </ItemTemplate>

            </DropDownListTemplates>

        </SfDropDownList>

    </div>

</div>


<div class="form-group">

    <SfMultiSelect ShowSelectAll="true" Mode="@VisualMode.CheckBox" ShowDropDownIcon="true" ModelType="typeof(Outlet)" TValue="string[]" CssClass="template" @bind-Value="@SelectedOutlet" FloatLabelType="@FloatLabelType.Auto" Placeholder="Outlet" DataSource="@outlets">

            <MultiSelectTemplates>

                <ItemTemplate Context="OutletContext">

                    @((OutletContext as Outlet).OutletCode): @((OutletContext as Outlet).OutletName)

                </ItemTemplate>

            </MultiSelectTemplates>

            <MultiSelectFieldSettings Text="@nameof(Outlet.OutletName)" Value="@nameof(Outlet.OutletCode)"></MultiSelectFieldSettings>

         </SfMultiSelect>


@code {


    private string[] SelectedOutlet = new string[] { };


    private string agent { get; set; }


    private IEnumerable<Agent> agents;


    protected IEnumerable<Outlet> outlets;


    protected override async Task OnInitializedAsync()

   

    {

        agents = await AgentService.GetAll Agents();           

    }


    public async Task OnChange(Syncfusion.Blazor.DropDowns.ChangeEventArgs<string, Agent> args)

    {

        outlets = await OutletService.GetOutlet(  agent );

    }

}

<style>


    .template.e-popup .e-list-item * {

        display: inline-block !important;

        text-indent: 0px;

    }

</style>