Hi there.
I have several dropdownlist boxes, and each box is populated serverside
The CreateSelectList function returns a List<SelectListItem>
When the returned List<SelectListItem> got a default value (Selected=true), the dropdownlist is not visible, if there is not selected value, then the dropdownlist is visible.
In firebird developer screen, i can see it sets visibility: hidden when i got a value, and its not there when i dont have a value.
When i have a value for a dropdownlist - html code:
Note the second <span>
And here is the html code when i dont have a value:
Im a missing something obvious?
Right now i will just create a standard combobox in html to get along, but would prefer to use kendo objects.
Thanks in advance
- René
I have several dropdownlist boxes, and each box is populated serverside
<
BR
><
div
style="position:absolute; @(item.GetDataSizePos(true));
margin-top:0px;"><
BR
>
@Html.Kendo().DropDownList().Name(item.le.FieldId).BindTo(CaretakerPortal.App_Start.CaretakerHelpers.CreateSelectList(item.le.DropDownItems,
item.datavalue.IntValue.ToString())).Enable(true).OptionLabel("Vælg fra
listen").HtmlAttributes(new { @style = "width: 100%; height: 100%;" })<
BR
>
</
div
>
When the returned List<SelectListItem> got a default value (Selected=true), the dropdownlist is not visible, if there is not selected value, then the dropdownlist is visible.
In firebird developer screen, i can see it sets visibility: hidden when i got a value, and its not there when i dont have a value.
When i have a value for a dropdownlist - html code:
<
span
class
=
"k-widget k-dropdown k-header"
style="width: 100%;
height:
100%;"
unselectable
=
"on"
role
=
"listbox"
aria-haspopup
=
"true"
aria-expanded
=
"false"
tabindex
=
"0"
aria-owns
=
"aktivitet_aprioritet_listbox"
aria-disabled
=
"false"
aria-readonly
=
"false"
aria-busy
=
"false"
aria-activedescendant
=
"aktivitet_aprioritet_option_selected"
><
BR
><
span
class="k-dropdown-wrap
k-state-default"
unselectable
=
"on"
style="visibility: hidden; color:
rgb(153, 153,
153);"><
input
id
=
"aktivitet_aprioritet"
class
=
"valid"
type
=
"text"
value
=
"A"
style="width:
100%; height: 100%; display:
none;"
name
=
"aktivitet.aprioritet"
data-role
=
"dropdownlist"
><
BR
></
span
>
And here is the html code when i dont have a value:
<
span
class
=
"k-widget k-dropdown k-header"
style="width: 100%;
height:
100%;"
unselectable
=
"on"
role
=
"listbox"
aria-haspopup
=
"true"
aria-expanded
=
"false"
tabindex
=
"0"
aria-owns
=
"aktivitet_ansvarlig_listbox"
aria-disabled
=
"false"
aria-readonly
=
"false"
aria-busy
=
"false"
aria-activedescendant
=
"aktivitet_ansvarlig_option_selected"
><
BR
><
span
class="k-dropdown-wrap
k-state-default"
unselectable
=
"on"
style="color: rgb(153, 153,
153);"><
input
id
=
"aktivitet_ansvarlig"
class
=
"valid"
type
=
"text"
style="width:
100%; height: 100%; display:
none;"
name
=
"aktivitet.ansvarlig"
data-role
=
"dropdownlist"
><
BR
></
span
>
Right now i will just create a standard combobox in html to get along, but would prefer to use kendo objects.
Thanks in advance
- René