Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid Edit does not use entered values

Status
Not open for further replies.

TerryDad2

Programmer
Jul 10, 2002
29
0
0
US
I am working on retrieving the entered values for a DataGrid row using the EditCommandColumn. Functionally, all the events work well (onEdit, onCancel, and onUpdate). The problem I am having is getting the updated values the client enteres. The code is only using the existing values. I have been following the discussion at and using the line:
dim NGenerator as string = CType(e.Item.Cells(2).Controls(0),TextBox).Text 'updated generator
to get the new value, but this has only been returning the old value. I then go on to use NGenerator in an update statement that executes without a problem updating the old values to the old values and the clients changes are gone.

I am not sure what I am missing.

Terry
 
Finally tracked it down. And it is a simple error. I had forgotten to include the not page.ispostback on the page load and the data was being re-bound before it got to reading the text boxes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top