Hello,
I am using Telerik grid. I have some GridTemplateColumn. Inside those columns there are EditItemTemplate column. Inside that I have <asp:checkbox>. I have intotal 5 checkboxes defined the same way. The condition I want is that out of 5 checkboxes if I click on one of the checkbox it will uncheck other 4 checkboxes. I got the object of the gridtemplatecolumn but I dont know what to do further. Any help will be appreciated
Code:
<
telerik:GridTemplateColumn
HeaderText
=
"Activity - Fit/Exam"
SortExpression
=
"q9a_bit"
UniqueName
=
"q9a_bit"
EditFormColumnIndex
=
"0"
DataField
=
"q9a_bit"
Display
=
"false"
>
<
ItemTemplate
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:CheckBox
ID
=
"id1"
runat
=
"server"
Checked="<%#Bind('q9a_bit') %>"/>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Activity - Refraction"
SortExpression
=
"q9b_bit"
UniqueName
=
"q9b_bit"
EditFormColumnIndex
=
"0"
DataField
=
"q9b_bit"
Display
=
"false"
>
<
ItemTemplate
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:CheckBox
ID
=
"id2"
runat
=
"server"
Checked="<%#Bind('q9b_bit') %>"/>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Activity - Rx Change"
SortExpression
=
"q9c_bit"
UniqueName
=
"q9c_bit"
EditFormColumnIndex
=
"0"
DataField
=
"q9c_bit"
Display
=
"false"
>
<
ItemTemplate
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:CheckBox
ID
=
"id3"
runat
=
"server"
Checked="<%#Bind('q9c_bit') %>"/>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Activity - Purchase Only"
SortExpression
=
"q9d_bit"
UniqueName
=
"q9d_bit"
EditFormColumnIndex
=
"0"
DataField
=
"q9d_bit"
Display
=
"false"
>
<
ItemTemplate
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:CheckBox
ID
=
"id4"
runat
=
"server"
Checked="<%#Bind('q9d_bit') %>"/>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Activity - Purchase Only"
SortExpression
=
"q9e_bit"
UniqueName
=
"q9e_bit"
EditFormColumnIndex
=
"0"
DataField
=
"q9e_bit"
Display
=
"false"
>
<
ItemTemplate
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:CheckBox
ID
=
"id5"
runat
=
"server"
onclick
=
"return check_uncheck ();"
Checked="<%#Bind('q9e_bit') %>"/>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
Javascript:
<script type=
"text/javascript"
>
function
check_uncheck() {
var
grid = $find(
"<%=RadGrid1.ClientID%>"
);
var
tableView = grid.get_masterTableView();
alert(tableView.getCellByColumnUniqueName(tableView.get_dataItems()[0],
"q9a_bit"
));
}
</script>
Regards,
Parth