e.NewValues returning oldvalues in GridView_rowupdating event

L

loga123

Hi All,

I am using asp.net 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top