I have a RadComboBox with an ItemTemplate for checkboxes, like this:
This is part of a "Search" form, and I have a Submit and Clear button on the page. When Clear is clicked, I need to set the index back to the first item in the list. On ComboBoxes that do not use an ItemTemplate, I can just do this (in code behind):<
li
>
<
label
class
=
"labelBlack"
for
=
"ReportType"
>
Report Type</
label
>
<
telerik:RadComboBox
ID
=
"cmbReportType"
Name
=
"ReportType"
runat
=
"server"
DataTextField
=
"Value"
DataValueField
=
"Key"
TabIndex
=
"17"
Width
=
"214"
MarkFirstMatch
=
"true"
AllowCustomText
=
"false"
OnClientLoad
=
"OnReportTypeLoad"
OnClientDropDownClosing
=
"OnReportTypeDropDownClosing"
>
<
ItemTemplate
>
<
asp:CheckBox
runat
=
"server"
ID
=
"chkReportType"
Text='<%# Eval("Value")%>'/>
<
asp:HiddenField
runat
=
"server"
ID
=
"ReportTypeID"
Value='<%# Eval("Key") %>' />
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
li
>
cmbReportType.SelectedIndex = 0; And that works. But it doesn't work when the ItemTemplate is present. I also tried:cmbReportType.Items[0].Selected = true;
Still, no luck. Any thoughts on this?