hi glenn, it works for me and works well. Here is a test you can try
yourself.
Regards,
Alessandro Zifiglio
http://www.AsyncUI.net
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Function CreateDataSource() As ICollection
Dim dt As New DataTable()
Dim dr As DataRow
dt.Columns.Add(New DataColumn("StringValue1", GetType(String)))
dt.Columns.Add(New DataColumn("StringValue2", GetType(String)))
Dim i As Integer
For i = 0 To 5
dr = dt.NewRow()
dr(0) = "Checkbox " + i.ToString()
dr(1) = "TextBox " + i.ToString()
dt.Rows.Add(dr)
Next i
Dim dv As New DataView(dt)
Return dv
End Function
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
' Load this data only once.
DataGrid1.DataSource = CreateDataSource()
DataGrid1.DataBind()
End If
End Sub 'Page_Load
Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e
As System.EventArgs)
Dim cb1 As CheckBox = CType(sender, CheckBox)
If (cb1 IsNot Nothing) Then
Response.Write(cb1.Checked)
' Lets get a reference to the tableCell holding our checkbox and
then find our textbox control
' which happens to be within the same tablecell.
' another way to achieve a better result is to
' reference cb1.NamingContainer, instead of cb1.Parent
' since that would return a DataGridItem,
' the entire row, and then we can navigate through
' the cells collection.
' this is just in case you want to do something with
' data in the current row holding your checkbox.
' i dont mean to confuse you with the following extra few lines
here.
Dim tc As TableCell = CType(cb1.Parent, TableCell)
Dim tb1 As TextBox = CType(tc.Controls(3), TextBox)
If (tb1 IsNot Nothing) Then
Response.Write(tb1.Text)
End If
End If
End Sub
</script>
<html xmlns="
http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>
DataGrid Example</h3>
<b>Product List</b>
<asp

ataGrid ID="DataGrid1" BorderColor="black" BorderWidth="1"
CellPadding="3"
AutoGenerateColumns="false" runat="server">
<HeaderStyle BackColor="#00aaaa"></HeaderStyle>
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox AutoPostBack="true" ID="CheckBox1"
Text='<%# DataBinder.Eval(Container.DataItem, "StringValue1") %>'
OnCheckedChanged="CheckBox1_CheckedChanged"
runat="server" />
<asp:TextBox ID="TextBox1"
Text='<%#DataBinder.Eval(Container.DataItem, "StringValue2")%>'
runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp

ataGrid>
</div>
</form>
</body>
</html>