Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > e.NewValues returning oldvalues in GridView_rowupdating event

Thread Tools

e.NewValues returning oldvalues in GridView_rowupdating event

Posts: n/a
Hi All,

I am using 2.0. I have a gridview with
AutoGenerateEditButton="True" .
I am trying to access newValues in rowupdating event. It gives me
"oldvalues" collection.
I have
a) datakeynames property set
b) I am using template fields in my gridview and have "EVAL" for
ItemTemplate and "BIND" for EditItemTemplate
c) I have datasourceID and updatestatement set.
d) I set DataMember="DefaultView"

I am not sure what am I missing. I have worked before with gridview row
update/delete..but never faced such problem.

I want to validate the user input before my row is updated. I
think...we can do this in rowupdating event before row is updated. I am
not sure why e.newvalues collection is returning the oldvalues.

any help is greatly appreciated.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
GridViewUpdateEventArgs dosen't include OldValues or NewValues Steve Kershaw ASP .Net 0 09-25-2007 05:08 PM
What happen to the DetailView, oldValues and newValues are the same.... LamSoft ASP .Net 0 07-05-2007 10:25 AM
GridView RowUpdating not retrieving newvalues (only oldvalues) ASP .Net 1 12-13-2006 11:07 AM
GridView: Empty OldValues, NewValues Mark Olbert ASP .Net 6 07-22-2006 02:34 AM
e.newvalues looking at the e.oldvalues in gridview_row updating event loga123 ASP .Net 0 06-26-2006 06:43 AM