[Solved] MultiSelect and selection ?

1 Answer 231 Views
MultiSelect
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Deasun asked on 04 Oct 2022, 02:57 PM

Is there any way to suppress the selection items appearing in the textbox portion of the control?

Example of my issue:

As the more items are selected the text box grows and pushes down. We have some pretty big selections we use sometimes and this makes the UI ugly. Would like it not to do that but still have the items the user selected in the control in the backend.

Code

@* as you type "de", you will only get "Developer" and "Designer" as suggestions instead of the full list *@
<TelerikMultiSelect Data="@Roles" @bind-Value="@TheValues"
                     Filterable="true"
                     Placeholder="Write 'de' to see the filtering" 
                     ClearButton="true"
                     AutoClose="false">
    <MultiSelectSettings>
        <MultiSelectPopupSettings Height="100px" />
    </MultiSelectSettings>
</TelerikMultiSelect>
@*
<ul>
    @foreach (var item in TheValues)
    {
        <li>@item</li>
    }
</ul>
*@
@code{
    List<string> TheValues { get; set; } = new List<string>();
    List<string> Roles { get; set; } = new List<string> {
        "Manager", "Developer", "QA", "Technical Writer", "Support Engineer", "Sales Agent", "Architect", "Designer",
        "Gandalf", "DeadPool", "Batman", "Driver", "Pilot", "Rebel", "Sith", "Jedi"
    };
}

 

Deasun
Top achievements
Rank 1
Iron
commented on 20 Mar 2026, 03:45 PM

Getting back to this: For anyone that is interested this appears to work:

<TelerikMultiSelect Data="@Roles"
                    @bind-Value="@TheValues"
                    AutoClose="false"
                    Placeholder="Write the roles you need">
    
    <ItemTemplate>
        <input type="checkbox"
               id="@( "cb" + context.Replace(" ", "") )"
               class="k-checkbox k-rounded-md k-checkbox-md"
               checked="@GetChecked(context)">
        @context
    </ItemTemplate>
    <TagTemplate>
        <text></text>
    </TagTemplate>
</TelerikMultiSelect>
@* INLINE CSS TO HIDE MULTISELECT TAGS *@
<style>
    /* Completely hide the tag chip list in the MultiSelect input */
    .k-multiselect .k-chip-list {
        display: none !important;
    }
</style>
@foreach (var item in TheValues)
{
    <div>@item</div>
}
@code {
    private List<string> TheValues { get; set; } = new List<string>();
    bool GetChecked(string text)
    {
        return TheValues.Contains(text);
    }
    private List<string> Roles { get; set; } = new List<string> {
        "Manager", "Developer", "QA", "Technical Writer", "Support Engineer", "Sales Agent", "Architect", "Designer"
    };
}
Dimo
Telerik team
commented on 20 Mar 2026, 03:51 PM

@Deasun - there is a built-in feature for that now. Please consider editing your post.

Telerik Blazor MultiSelect Tag Mode

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 07 Oct 2022, 06:49 AM

Hi Deasun,

We have a public feature request for the so-called single tag mode for the MultiSelect. The page provides two different workarounds that are applicable for you -

  • hide the selected items and only display a label with their number
  • make the selected items' container scrollable

You can also vote and follow the feature request to receive status updates.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
MultiSelect
Asked by
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Answers by
Dimo
Telerik team
Share this question
or