Gridview e.OldValues and e.NewValues are nothing

Discussion in 'ASP .Net Web Controls' started by Pulkit Sharma, Jul 24, 2007.

  1. 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
    Pulkit Sharma, Jul 24, 2007
    #1
    1. Advertising

  2. 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 (, 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.
    Walter Wang [MSFT], Jul 24, 2007
    #2
    1. Advertising

  3. 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 (, 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.
    Walter Wang [MSFT], Jul 27, 2007
    #3
  4. Pulkit Sharma

    GeneB Guest

    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.
    GeneB, Aug 31, 2007
    #4
  5. Pulkit Sharma

    Rachna Guest

    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
    Rachna, Nov 19, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Olbert

    GridView: Empty OldValues, NewValues

    Mark Olbert, Jan 19, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    12,355
    jfortier2
    Jul 22, 2006
  2. Replies:
    1
    Views:
    1,043
  3. LamSoft
    Replies:
    0
    Views:
    378
    LamSoft
    Jul 5, 2007
  4. xs8899
    Replies:
    0
    Views:
    795
    xs8899
    May 22, 2009
  5. Ryan
    Replies:
    1
    Views:
    166
Loading...

Share This Page