Resize DropDownList

3 posts, 0 answers
  1. Ramiro
    Ramiro avatar
    1 posts
    Member since:
    May 2012

    Posted 09 May 2012 Link to this post

    Hi! it is my first day with Kendo UI. I'm testing some features and i have got a problem with the DropDownList size. This is a bigger element :S. How to change the size of the element ?. From my css file ? from the css kendo file ? from js ?.

    An image attached.


    Thanks.
  2. Brahmaiah
    Brahmaiah avatar
    3 posts
    Member since:
    Apr 2012

    Posted 15 May 2012 Link to this post

    @Html.DropDownList(

     

    "id", new SelectList(Model.Accounts, "Index", "AccountFriendlyName"), new { id = "accountList", @class = "DropDownListWidth" })

     

    and set the width in Jquerry or CSS.

    $(

     

    '.DropDownListWidth').width('auto');

     

  3. fred
    fred avatar
    2 posts
    Member since:
    Sep 2012

    Posted 18 Sep 2012 Link to this post

    Try this in mvc;

    @(Html.Kendo().DropDownList()         
        .Name("Products")         
        .HtmlAttributes(new { style = "width:85px;text-aligh:left" })         
        .DataTextField("Text")         .DataValueField("Value")         
        .IgnoreCase(true)         
        .DataSource(source =>         
        {             
            source.Read(read =>             
            {                 
                read.Action("GetProducts""Home");             
            });         
        })     
    )
Back to Top