False settings place the checkbox control variable in the itemtemplate of the girdview, and then set the autopostback of the checkbox to true. You want to write the related program variable in the checkedchanged event of the checkbox.
* The aspx program example is as follows:
< Edititemtemplate >
< ASP: checkbox ID = "Checkbox1" Runat = "Server" Autopostback = "True" Checked = '<% # BIND ("discontinued") % > '
Oncheckedchanged = "checkbox#checkedchanged"/>
</ Edititemtemplate >
Generally, the checkedchanged event in the checkbox requires that it is the PostBack initiated by the checkbox of the item column. You can compile the following program to obtain the gridviewrow and rowindex that control the cursor.
1 Protected Sub Checkbox#checkedchanged ( Byval Sender As Object , Byval E As System. eventargs)
2 Dim Ocheckbox As Checkbox
3 Dim Ogridviewrow As Gridviewrow
4 Dim Irowindex As Integer
5
6 Ocheckbox = Ctype (Sender, checkbox)
7
8 ' Obtain the attention gridviewrow of the control worker.
9 Ogridviewrow = Ctype (Ocheckbox. bindingcontainer, gridviewrow)
10
11 ' Obtain the index of the current gridviewrow
12 Irowindex = Ogridviewrow. rowindex
13 End sub