Hi,
I am a new bee in ASP.NEt.
My coding is as below.I have a problem in checking whether the first checkbox is checked or unchecked and then check /unchecked all the other checkbox in the datagridview.
My problem is how to fire the CheckAll_Click event when the checkbox is checked or unchecked.Does any one has idea on this?what should i put in instead of OnCheckedChanged as does not fire the event ?Code:<script runat="server"> Sub CheckAll_Click(sender As Object, e As EventArgs) Dim i As Integer For i = 0 To dgv1.Rows.Count - 1 CType(dgv1.Rows(i).FindControl("chkAll"), CheckBox).Checked = True Next End Sub </script> <HeaderTemplate> <asp:CheckBox id="chkAllq" runat="server" OnCheckedChanged="CheckAll_Click" > </asp:CheckBox> </HeaderTemplate>




Reply With Quote