I would like to remove the X button from the Multiselect Dropdown

Is it possible to remove the X button from the Multiselect Dropdown?

Image_9888_1696231893808


1 Reply

KP Kokila Poovendran Syncfusion Team October 16, 2023 07:52 AM UTC

Hi Nandor Kalmanchey.


Greetings from Syncfusion support!


We have validated your requirement and have prepared the sample below. You can achieve this functionality by using the "ShowClearButton" property. Kindly refer to the code snippet below:


@using Syncfusion.Blazor.DropDowns

 

<SfMultiSelect TValue="string[]" TItem="Games" Placeholder="Favorite Sports" DataSource="@LocalData" ShowClearButton=false>

    <MultiSelectFieldSettings Text="Text" Value="ID"></MultiSelectFieldSettings>

</SfMultiSelect>

 

@code {

 

    public class Games

    {

        public string ID { getset; }

        public string Text { getset; }

    }

    List<Games> LocalData = new List<Games> {

    new Games() { ID= "Game1", Text= "American Football" },

    new Games() { ID= "Game2", Text= "Badminton" },

    new Games() { ID= "Game3", Text= "Basketball" },

    new Games() { ID= "Game4", Text= "Cricket" },

    new Games() { ID= "Game5", Text= "Football" },

    new Games() { ID= "Game6", Text= "Golf" },

    new Games() { ID= "Game7", Text= "Hockey" },

    new Games() { ID= "Game8", Text= "Rugby"},

    new Games() { ID= "Game9", Text= "Snooker" },

    new Games() { ID= "Game10", Text= "Tennis"},

    };

}



Here, we have set the "ShowClearButton" property to "false" in order to hide the clear button. Kindly refer to the code snippet and incorporate these changes into your application. If you encounter any further issues, please don't hesitate to let us know.


APISyncfusion.Blazor.DropDowns.SfMultiSelect ShowClearButton Property.


We hope this solution meets your needs. If you require any further assistance, feel free to reach out.


Loader.
Up arrow icon