This page has a good example for doing something when a checkbox in a
datagrid is changed:
http://www.geekswithblogs.net/sgreen.../12/14871.aspx
This is basically what it says:
In the aspx page, modify the checkbox tag by adding the OnCheckedChanged
attribute, and setting it to the name of the sub that you just created
above. You'll also need autopostback set to true.
<ItemTemplate>
<asp:CheckBox id="CheckBox1" runat="server" AutoPostBack="True"
OnCheckedChanged="Check_Clicked">asp:CheckBox>
>
Now when the checkbox is clicked, the Check_Clicked event will be
fired. Add the following code to the Check_Clicked procedure:
Protected Sub Check_Clicked(ByVal sender As Object, ByVal e As EventArgs)
Dim ck1 As CheckBox = CType(sender, CheckBox)
Dim dgItem As DataGridItem = CType(ck1.NamingContainer,
DataGridItem)
'now we've got what we need!
Label1.Text = "You selected row " & dgItem.Cells(0).Text
End Sub