Max Height and Scrollbar

6 posts, 0 answers
  1. Michael
    Michael avatar
    36 posts
    Member since:
    Sep 2014

    Posted 11 Sep 2018 Link to this post

    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

  2. Michael
    Michael avatar
    36 posts
    Member since:
    Sep 2014

    Posted 12 Sep 2018 in reply to Michael Link to this post

    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>

  3. Dimitar
    Admin
    Dimitar avatar
    683 posts

    Posted 13 Sep 2018 Link to this post

    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.
  4. Christopher
    Christopher avatar
    8 posts
    Member since:
    Nov 2016

    Posted 08 Nov Link to this post

    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;
    }

  5. Christopher
    Christopher avatar
    8 posts
    Member since:
    Nov 2016

    Posted 08 Nov Link to this post

    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"
                            })))
                )

  6. Christopher
    Christopher avatar
    8 posts
    Member since:
    Nov 2016

    Posted 08 Nov Link to this post

    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
Back to Top