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
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>
Thank you for sharing your solution. I believe it will be helpful for the rest of the community.
Regards,
Dimitar
Progress Telerik
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;
}
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"
})))
)