This is a migrated thread and some comments may be shown as answers.

Max Height and Scrollbar

5 Answers 916 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 11 Sep 2018, 03:50 PM

Hi, I'm trying restrain the Multiselect to a max-height and have it show a scroll bar display inside the multiselect if the amount of values selected would exceed the max height of the display area.  Nothing I've tried so far has worked though.  Is this possible?  If so, how can I do that?

 

To be clear I'm not talking about the dropdown list that appears when the user selects items, I'm talking about after the items have been selected in the main box area.

 

Thanks

 

Mike

5 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 12 Sep 2018, 03:34 PM

So apparently I was just having some css issues and my changes weren't taking affect.  For those that are interested, my solution was to simple set a style

<style>
.k-multiselect-wrap {
max-height: 50px !important;
overflow: auto !important;
}

</style>

0
Dimitar
Telerik team
answered on 13 Sep 2018, 11:52 AM
Hi Michael,

Thank you for sharing your solution. I believe it will be helpful for the rest of the community.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Christopher
Top achievements
Rank 1
answered on 08 Nov 2019, 05:36 PM

I'm having an issue.  The selected items are showing up ok in the control, but when I go to select items, a second listbox displays below the multiselect box.  I've attached a small screenshot and here is my CSS:

.k-multiselect-wrap {
    max-height: 300px !important;
    overflow-y: auto !important;
}

0
Christopher
Top achievements
Rank 1
answered on 08 Nov 2019, 05:49 PM

I'm using Telerik for ASP.NET MVC control:

            @(Html.Kendo().MultiSelect()
                .Name(ViewData["ElementName"].ToString())
                .Filter(ViewData["Filter"].ToString())
                .TagMode(TagMode.Multiple)
                .AutoClose(true)
                .HtmlAttributes(ViewData["htmlAttributes"])
                .Events(e => e.Select("MultiSelect_OnSelect"))
                .Placeholder(String.Format(CIMS.LanguagePack.Resources.Labels.PlaceHolder, ViewData["PlaceHolder"]))
                .DataTextField(ViewData["DisplayText"].ToString())
                .DataValueField(ViewData["Value"].ToString())
                .DataSource(ds => ds
                    .Custom()
                    .Transport(t => t
                        .Read(new
                        {
                            url = CIMS.WebAPIHelper.CIMSWebServiceHelper.WebAPIBasePath + ViewData["APIPath"],
                            headers = new
                            { authorization = CIMS.WebAPIHelper.CIMSWebServiceHelper.WebAPIAuth },
                            datatype = "json"
                        })))
            )

0
Christopher
Top achievements
Rank 1
answered on 08 Nov 2019, 06:08 PM
Nevermind.  I was confused for a minute with what the dropdown list was doing there.  That is where you select what you want.  It's supposed to be there.  :D
Tags
MultiSelect
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Dimitar
Telerik team
Christopher
Top achievements
Rank 1
Share this question
or