I have a situation where i have a listview with a itemtemplate, the template contains a set of radiobuttons and a combobox. Based on the checked value of the radiobutton i need to set the datasource on the combobox but not sure how to accomplish this in the best manner.
My listview,
<
telerik:RadListView
runat
=
"server"
ID
=
"lvTimers"
OnNeedDataSource
=
"lvTimers_NeedDataSource"
>
<
ItemTemplate
>
<
div
class
=
"timer col-xs-12"
data-timerid
=
""
>
<
div
class
=
"row"
>
<
div
class
=
"col-xs-3 col-md-2 col-lg-2 center-xs"
>
<
span
class
=
"hours"
>1</
span
>:
<
span
class
=
"minutes"
>21</
span
>:
<
span
class
=
"seconds"
>31</
span
><
br
/>
<
asp:ImageButton
runat
=
"server"
ID
=
"btnStart"
Visible='<%# Eval("StartTime") == null %>' ImageUrl="~/images/web/icons/play.png" CommandArgument='<%# Eval("TimerId") %>' />
<
asp:ImageButton
runat
=
"server"
ID
=
"btnPause"
Visible='<%# Eval("StartTime") != null %>' ImageUrl="~/images/web/icons/pause.png" CommandArgument='<%# Eval("TimerId") %>' />
</
div
>
<
div
class
=
"col-xs-8 col-md-9 col-lg-9"
>
<
asp:RadioButtonList
runat
=
"server"
ID
=
"rbType"
RepeatDirection
=
"Horizontal"
>
<
asp:ListItem
Value
=
"1"
Text
=
"Frånvaro"
></
asp:ListItem
>
<
asp:ListItem
Value
=
"2"
Text
=
"Intern"
></
asp:ListItem
>
<
asp:ListItem
Value
=
"3"
Text
=
"Extern"
></
asp:ListItem
>
<
asp:ListItem
Value
=
"4"
Text
=
"Övrigt"
></
asp:ListItem
>
</
asp:RadioButtonList
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"cmbCustomers"
></
telerik:RadComboBox
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"cmbProjects"
></
telerik:RadComboBox
>
<%# Eval("TimerId") %>
</
div
>
<
div
class
=
"col-xs-1"
>
<
asp:ImageButton
runat
=
"server"
ID
=
"btnDelete"
ImageUrl
=
"~/images/web/icons/delete.png"
CommandArgument='<%# Eval("TimerId") %>' />
<
asp:ImageButton
runat
=
"server"
ID
=
"btnUpdate"
ImageUrl
=
"~/images/web/icons/update.png"
CommandArgument='<%# Eval("TimerId") %>' />
<
asp:ImageButton
runat
=
"server"
ID
=
"btnSave"
ImageUrl
=
"~/images/web/icons/save.png"
CommandArgument='<%# Eval("TimerId") %>' />
</
div
>
</
div
>
</
div
>
</
ItemTemplate
>
</
telerik:RadListView
>
Any helpful soul with any idea how to go about this?