Gridview e.OldValues and e.NewValues are nothing

P

Pulkit Sharma

Hi,

I am using a gridview control in asp.net 2.0 and creating some dynamic
template fields in it. Whenever I am trying to get the e.NewValues in the
row_updating event , it is always nothing,

Is this a know issue? If there is a work around please let me know.

Protected Sub gridSystemLookUpValues_RowUpdating(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles
gridSystemLookUpValues.RowUpdating
' e.OldValues and e.NewValues is always nothing here

End Sub


Regards

Pulkit
 
W

Walter Wang [MSFT]

Hi Pulkit,

Since you didn't posted your complete code listing, I'm not sure if this
the same scenario as following thread:

#GridView, DataSource, RowUpdating, e.OldValues and e.NewValues collections
http://www.developersdex.com/asp/message.asp?p=2908&ID=<uvU$WBARGHA.3052
%40TK2MSFTNGP09.phx.gbl%3E


Would you please check if this is the same issue? Please feel free to tell
me more about your code if that thread doesn't help. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Hi,

I'm writing to check the status of this post. Please feel free to let me
know if there's anything else I can help.

Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

GeneB

If I am understanding you correctly, the reason e.NewValues and e.OldValues are not populated is that you are dynamically populating the gridview. The e parameter relies on a design time datasource to populate these values.

In order to make this work, you will have to programmatically grab the values from the edit and create an update.
 
R

Rachna

Hi geneB,

I am actually trying to update the gridview at run time and hence my
GridViewEditEventArgs e goes blank as soon as I hit the update button. I am
able to trap the oldvalues before i start to edit using the static variable
concept but i cannot seem to find out the way to get the new values in the
gridview. Can you please guide me? Any help would be highly appreciated?

cheers!
rachna
 

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,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top