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

Empty item not displaying

2 Answers 107 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Sergi
Top achievements
Rank 1
Sergi asked on 10 Jun 2013, 02:49 PM
Hello.

I'm doing a dropdownlist with the MVC helper like this, but the option with empty text is not showing, a red  line is showing instead.

How can I show the empty option so that users can select, yes, no, or empty ( show all ) without having to set a text or value for that option?
            @(Html.Kendo().DropDownList().Name("isPublic")
                   .Items(items =>
                       {
                           items.Add().Text("").Value("");
                           items.Add().Text("Yes").Value("true");
                           items.Add().Text("No").Value("false");
                       }
                   )
               )

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 10 Jun 2013, 04:11 PM
Hi Sergi,

You can use the following CSS rule to expand the empty item:


.k-popup > .k-list > .k-item
{
    min-height: 1.8em;
}


In addition, please avoid posting duplicate forum threads.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sergi
Top achievements
Rank 1
answered on 11 Jun 2013, 07:12 AM
Thanks, sorry about the duplicate post, wasn't sure which forum was the right one for the question
Tags
DropDownList
Asked by
Sergi
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Sergi
Top achievements
Rank 1
Share this question
or