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

Resize DropDownList

2 Answers 295 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Ramiro
Top achievements
Rank 1
Ramiro asked on 09 May 2012, 02:55 PM
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 Answers, 1 is accepted

Sort by
0
Brahmaiah
Top achievements
Rank 1
answered on 15 May 2012, 09:16 PM

@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');

 

0
fred
Top achievements
Rank 1
answered on 18 Sep 2012, 03:39 PM
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");             
        });         
    })     
)
Tags
DropDownList
Asked by
Ramiro
Top achievements
Rank 1
Answers by
Brahmaiah
Top achievements
Rank 1
fred
Top achievements
Rank 1
Share this question
or