ItemTemplate and FooterTemplate in the SfMultiSelect multicolumn component is not being called

The issue you're encountering with the ItemTemplate in SfMultiSelect not being called and also the FooterTemplate even if the list of data source is full with data but in output the list show default list of designation with checkbox but the herderTemplate w, this is the code : <div class="my-1">

    <SfMultiSelect TValue="string[]" TItem="DTO_F2" ShowDropDownIcon="true" Placeholder="@($"Select {propertyName}")"

                   PopupHeight="400px" DataSource="@filterItems" CssClass="e-multi-column" AllowFiltering="true"

                   Mode="VisualMode.CheckBox" ShowSelectAll="true" EnableVirtualization="true"

                   ValueChanged="@(args => SelectedFiltersValues(args, propertyName))">

        <MultiSelectTemplates TItem="DTO_F2" Context="FContext">

            <HeaderTemplate>

                <span class='head'>

                    <span class='name'>Code</span>

                    <span class='city'>Designation</span>

                </span>

            </HeaderTemplate>

            <ItemTemplate>

                <span class='item'>

                    <span class='name'>@(FContext.code)</span>

                    <span class='city'>@(FContext.designation)</span>

                </span>

            </ItemTemplate>

           <FooterTemplate>

                <span class='footer'>Total list Item: @filterItems.Count() </span>

            </FooterTemplate>

        </MultiSelectTemplates>

        <MultiSelectFieldSettings Text="designation" Value="code" />

    </SfMultiSelect>

</div>


4 Replies 1 reply marked as answer

PK Priyanka Karthikeyan Syncfusion Team January 21, 2025 01:12 PM UTC

Hi Mhmd Azd,

 

Thank you for reaching out to us regarding your issue with the SfMultiSelect component. We appreciate you sharing the code snippet, which has been very helpful in our analysis.

 

We have created a sample based on the shared code, and we're pleased to inform you that the templates are rendering properly on our end. You can find this sample at the following link for your reference:

 

Sample: https://blazorplayground.syncfusion.com/LZrIZsrsfwVUfIYM

Documentation Reference:https://blazor.syncfusion.com/documentation/multiselect-dropdown/templates


 

To ensure that your component works as expected, we kindly suggest checking the following points:

 

  1. Please verify that your DataSource property (@filterItems) is correctly populated with data of type DTO_F2.
  2. Ensure that the DTO_F2 class has properties named 'code' and 'designation'.
  3. Confirm that the MultiSelectFieldSettings match the property names in your DTO_F2 class. The Text and Value properties should be correct.

If you're still encountering issues after verifying these points, we would be more than happy to assist you further. In that case, we kindly request:

 

  1. A sample that reproduces the issue you're experiencing.
  2. A video illustration of the problem, if possible.
  3. More information about your component's code-behind file and the DTO_F2 class definition.
  4. Any errors you might see in the browser console that could provide additional clues about the problem.
     

This additional information will greatly help us in diagnosing and resolving the issue more effectively.

 

We're here to help and look forward to assisting you further if needed. Thank you for your patience and cooperation.

 

Regards,

Priyanka K

 

 


Marked as answer

MH Mhmd January 22, 2025 08:02 AM UTC

Hi, 

Thanks for your reply, but i think the problem is the  Virtualization proprty not work with multiselect multicolumns, and that what i need do you have a solution for that please!

Thanks in advance. 

Regards,

Mhmd



PK Priyanka Karthikeyan Syncfusion Team January 23, 2025 11:29 AM UTC

Hi Mhmd Azd,

 

We have identified the reported issue, “The MultiSelect component Template is not working with virtualization,” as a bug on our end. The fix for this issue is scheduled to be included in our patch release planned for the first week of February 2025.


You can track the progress of this fix using the following link:


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”

 

Regards,

Priyanka K



PK Priyanka Karthikeyan Syncfusion Team February 4, 2025 12:20 PM UTC

Hi Mhmd Azd, 

We have included the fix for the issue "The MultiSelect component Template is not working with virtualization" with our package version 28.2.4. So, can you please upgrade your package to the latest to resolve the issue from your end.

Root Cause: While utilizing the template case, we encountered an issue where the itemtemplate value from the multiselectvirtualization Razor was not retrieved correctly. As a result, the itemtemplate was not updated as intended.
 

Regards,

Priyanka K


Loader.
Up arrow icon