iam using two checkbox inside the gridview, when i select one of the checkboxes the second box should automatiocally checked
Thanx in advance
Nithya
iam using two checkbox inside the gridview, when i select one of the checkboxes the second box should automatiocally checked
Thanx in advance
Nithya
<asp:TemplateField HeaderText="Read">
<HeaderTemplate>
<asp:Label runat="server" Text="Read"></asp:Label>
</HeaderTemplate>
<itemstyle horizontalalign="Center" />
<ItemTemplate>
<asp:CheckBox ID="chkRead" runat="server" onclick="ChkReadClick(this)"/>
</ItemTemplate>
</asp:TemplateField>
and
<script language="javascript">
function ChkReadClick(obj)
{
var table = document.getElementById("GVFunction");
for (i = 1; i < table.rows.length; i++)
{
var ChkRead = table.rows[i].cells[2].getElementsByTagName("input")[0];
if(ChkRead.name==obj.name)
{
if(ChkRead.checked)
{
var ChkAdd = table.rows[i].cells[3].getElementsByTagName("input")[0];
ChkAdd.checked = true;
}
break;
}
}
}
</script>
Thanks,
Kusno.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.