This is the code i wrote for selecting all check boxes in datagrid bt it doen.t showin any error n also nt running too????????????????

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim i As Integer
If CheckBox1.Checked = True Then
For i = 0 To DataGrid1.Items.Count - 1
Dim chk As CheckBox
chk = DataGrid1.Items(i).FindControl("Select All")
chk.Checked = True
End If

End Sub

Please use code tags. Please don't apply unnecessary formatting to your posts. One question mark will suffice to indicate a question.