Wired_Nerve
Top achievements
Rank 2
Wired_Nerve
asked on 06 Feb 2015, 10:05 PM
I have a dropdown list that is populated via ajax call.
Depending on what the user is allowed to do the dropdownlist might only have 1 item in it.
I need to add a empty option first, then append the ajax results.
I do this all the time in asp.net webform applications, how does one configure a kendoui dropdownlist to display the empty row but not allow it to be selectable?
Depending on what the user is allowed to do the dropdownlist might only have 1 item in it.
I need to add a empty option first, then append the ajax results.
I do this all the time in asp.net webform applications, how does one configure a kendoui dropdownlist to display the empty row but not allow it to be selectable?
4 Answers, 1 is accepted
0
Wired_Nerve
Top achievements
Rank 2
answered on 06 Feb 2015, 10:21 PM
<
div
class
=
"selectdiv"
>
<
select
data-role
=
"dropdownlist"
data-option-label
=
"{FundingSource:'Select...',FundingSourceUID:''}"
data-value-primitive
=
"true"
id
=
"fundingsouce"
data-value-field
=
"FundingSourceUID"
data-text-field
=
"FundingSource"
data-bind
=
" source: fundingsoucedta"
></
select
>
<
div
class
=
"fundingsouce"
></
div
>
</
div
>
0
Wired_Nerve
Top achievements
Rank 2
answered on 07 Feb 2015, 05:08 PM
A quick note here. The dropdown list in the scenario that is causing me issues is when there is only one option for the user to select. Basically, I click on the dropdown list and see only one option... I click on it, and the change event does not fire...
0
Hi,
I tried to replicate the issue locally, but to no avail. Could you review the test Dojo demo and let me know if I am missing something? It will be very helpful if you can modify it in order to reproduce the issue.
Regards,
Georgi Krustev
Telerik
I tried to replicate the issue locally, but to no avail. Could you review the test Dojo demo and let me know if I am missing something? It will be very helpful if you can modify it in order to reproduce the issue.
Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Wired_Nerve
Top achievements
Rank 2
answered on 10 Feb 2015, 12:58 PM
I ended up adding a empty record to the dataset that is coming from the server and setting its value to -1.
Then in my code if the user selects that "blank" record I just prevent that selection. I don't have time as of right now to dig deep into the dropdown control to figure out the exact problem.
Then in my code if the user selects that "blank" record I just prevent that selection. I don't have time as of right now to dig deep into the dropdown control to figure out the exact problem.