Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim i As Integer
For i = 1 To 7 '7 columns with checkboxes
GridView1.Columns(i + 1).Visible = not chkHideColumns.Checked
Next
End Sub
Protected Sub chkA_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Dim chk As CheckBox = sender
ActionWhenCheckboxWasClicked(GridView1.DataKeys(chk.Attributes("Row")).Value, chk.Checked)
End Sub
|