P
Paul_FFX
I try to use EditCommandColumn of Datagrid control to update a record.
EditCommand works and Update and Cancel button appear. Then a modify
text in one of appeared text boxes. There is a part of my UpdateCommand
code:
Private Sub DataGrid1_UpdateCommand(ByVal source As Object, _
ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) _
Handles DataGrid1.UpdateCommand
Dim txtKeyID As TextBox = CType(e.Item.Cells(1).Controls(0), TextBox)
Dim txtCube As TextBox = CType(e.Item.Cells(2).Controls(0), TextBox)
Me.Label1.Text = txtCube.Text
…
Label control is just for troubleshooting. After I click Update button
Label receives old value, not the one that I just typed in. I try to
force Textbox to post back setting AutoPostBack to true as
txtCube.AutoPostBox = true with no result.
Please help.
EditCommand works and Update and Cancel button appear. Then a modify
text in one of appeared text boxes. There is a part of my UpdateCommand
code:
Private Sub DataGrid1_UpdateCommand(ByVal source As Object, _
ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) _
Handles DataGrid1.UpdateCommand
Dim txtKeyID As TextBox = CType(e.Item.Cells(1).Controls(0), TextBox)
Dim txtCube As TextBox = CType(e.Item.Cells(2).Controls(0), TextBox)
Me.Label1.Text = txtCube.Text
…
Label control is just for troubleshooting. After I click Update button
Label receives old value, not the one that I just typed in. I try to
force Textbox to post back setting AutoPostBack to true as
txtCube.AutoPostBox = true with no result.
Please help.