i use this
VB Code:
Public Sub DataGrid_Update(ByVal Source As Object, ByVal E As DataGridCommandEventArgs)
Dim sheets As Integer
sheets = CType(E.Item.FindControl("txtSheets"), TextBox).Text
where i have this in the html of the datagrid
VB Code:
<asp:TemplateColumn HeaderText="Sheets Printed">
<HeaderStyle ForeColor="#FF0000"></HeaderStyle>
<ItemStyle ForeColor="#FF0000"></ItemStyle>
<ItemTemplate>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.SheetsPrinted") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" id="txtsheets" columns="3" Text='<%# DataBinder.Eval(Container, "DataItem.SheetsPrinted") %>'>
</asp:TextBox>
</EditItemTemplate>
I am using a template column but the same basic theory applies to a bound column. Hope it helps.