C
Chris Mahoney
Hi
I have a DataGrid, with Edit links in each row. The Edit button works, the
user can change the values. But I can't get updating to work.
<asp:datagrid id="Content" runat="server" OnUpdateCommand="Content_Update"
OnCancelCommand="Content_Cancel" OnEditCommand="Content_Edit">
<Columns>
<asp:EditCommandColumn EditText="Edit" UpdateText="Update"
CancelText="Cancel" />
</Columns>
</asp:datagrid>
Sub Content_Update(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs)
Dim txt1 As String = CType(e.Item.Cells(2).Controls(0), TextBox).Text
Dim txt2 As String = CType(e.Item.Cells(3).Controls(0), TextBox).Text
etc.
My problem is that txt1 and txt2 end up with the original values, not the
new ones that have been entered by the user. I've looked for a PostBack
function but there doesn't seem to be one. How can I get the updated values?
Thanks
Chris
I have a DataGrid, with Edit links in each row. The Edit button works, the
user can change the values. But I can't get updating to work.
<asp:datagrid id="Content" runat="server" OnUpdateCommand="Content_Update"
OnCancelCommand="Content_Cancel" OnEditCommand="Content_Edit">
<Columns>
<asp:EditCommandColumn EditText="Edit" UpdateText="Update"
CancelText="Cancel" />
</Columns>
</asp:datagrid>
Sub Content_Update(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs)
Dim txt1 As String = CType(e.Item.Cells(2).Controls(0), TextBox).Text
Dim txt2 As String = CType(e.Item.Cells(3).Controls(0), TextBox).Text
etc.
My problem is that txt1 and txt2 end up with the original values, not the
new ones that have been entered by the user. I've looked for a PostBack
function but there doesn't seem to be one. How can I get the updated values?
Thanks
Chris