Edit Gridview bound to ArrayList

Last post 10-05-2007 2:35 AM by Trickass. 2 replies.

Sort Posts:

  • Edit Gridview bound to ArrayList

    10-04-2007, 5:27 AM
    • Loading...
    • Trickass
    • Joined on 08-11-2004, 7:07 AM
    • Edegem, Belgium
    • Posts 57

    Hi all

    I've been sweating on this problem for two days now :(

    I want to edit a gridview item, bound to a custom datasource (arraylist), dropdownlists to select the (new) values ...

    But the thing is that, when I try to edit an item, certain things seem to fail in the RowUpdating event:

    - the gvwData.Rows[e.RowIndex].DataItem always retuns NULL (which is probably because the table isn't bound when the event is called
    - the e.NewValues and e.OldValues are completely empty :(

     Any idea's how to solve all of this? Cause it's really starting to annoy me :)

     

    Thanks in advance,

    Nick

  • Re: Edit Gridview bound to ArrayList

    10-04-2007, 5:33 PM
    • Loading...
    • ubaid1900
    • Joined on 05-25-2005, 8:26 PM
    • Posts 141

    Post the code so the folks can have a look. 

  • Re: Edit Gridview bound to ArrayList

    10-05-2007, 2:35 AM
    • Loading...
    • Trickass
    • Joined on 08-11-2004, 7:07 AM
    • Edegem, Belgium
    • Posts 57

    I managed to fix it at last ...

    maybe not the ideal way, but still ...

    I got the old values now by calling the datasource again, and then retrieving the values from there in stead of out of the gridview ...

    The new values were retrieved by row.FindControl ...

     

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter