I've got a dropdown created as a select in a template:
<
select
id
=
"groupby"
class
=
"content-box text-left"
>
<
option
value
=
"Default"
><
cfoutput
>#APPLICATION.LC.getValue("GroupByDropdown")#</
cfoutput
></
option
>
<
option
value
=
"Category"
><
cfoutput
>#APPLICATION.LC.getValue("CourseCategoryDropdown")#</
cfoutput
></
option
>
<
option
value
=
"Group"
><
cfoutput
>#APPLICATION.LC.getValue("GroupDropdown")#</
cfoutput
></
option
>
</
select
>
I need to keep it like this in order to be able to use our multi-lingual system for the options (seen above, the "APPLICATION.LC" bits).
I'm trying to set the selected value as shown in the API example (http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#methods-value), but I keep getting a Javascript error.
$(
"#groupby"
).kendoDropDownList();
$(
'#groupby'
).data(
"kendoDropdownList"
).value(
"Group"
);
TypeError: $(...).data(...) is undefined
$('#groupby').data("kendoDropdownList").value(group_by);
I'm guessing that is is because I'm just "kendo-izing" a dropdown, versus filling it via a datasource like in the example.
So, how would I go about setting the selected value with my set up?