Dropdown text width inside a grid

2 posts, 0 answers
  1. Raja
    Raja avatar
    43 posts
    Member since:
    Oct 2013

    Posted 28 Dec 2015 Link to this post

    I have a dropdown inside a grid which currently takes 100% width of the column. Because of number of columns, width of this column is very less compared to the length of each item I have for the dropdown.

    I want to make the options list of the dropdown to display full text in single line with out increasing the width of the column. I am using white-space:nowrap to get the text in online but the options list gets  scroll bar. Is there a way that I can increase its width to 100%?

  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 04 Jan Link to this post

    Hi Raja,

    Apologies for the delayed reply.

    For this scenario I would suggest increasing the DropDownList list width. 
    // get reference to the DropDownList
    var dropdownlist = $("#ddlId").data("kendoDropDownList");
    // set width of the DropDownList
    dropdownlist.list.width(500);
    For your convenience here is a basic dojo.

    Regards,
    Iliana Nikolova
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top