Gridview row information disappearing after selectedIndexChanged

Discussion in 'General Computer Support' started by Ry99, Jul 13, 2009.

  1. Ry99

    Ry99

    Joined:
    Jul 9, 2009
    Messages:
    1
    I have a master/details setup with a GridView and DetailsView both in UpdatePanels. When the DetailsView is edited and updated, I want these changes to be reflected in the GridView, but without rebinding that data (which could change the selectedItem's sort order among other problems it causes) On DetailsView ItemUpdated I have the following:

    ' Update Gridview '
    ProductsGridView.Rows(selectedIndex).Cells(1).Text = e.NewValues("ProductName")
    ProductsGridView.Rows(selectedIndex).Cells(2).Text = e.NewValues("Category")

    This works fine when updating, but when a new item is selected in the Gridview, the updated text disappears. Why is this and how can I keep that info? When it is rebound it is fine if it changes position, put until it gets re-bound I would like that data to persist. Thanks.
     
    Ry99, Jul 13, 2009
    #1
    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. CJ

    Re: Rut Row!

    CJ, Jun 28, 2003, in forum: MCSE
    Replies:
    0
    Views:
    1,984
  2. fredcromer

    Whats best prog to display 'My Pics' in a row??

    fredcromer, Jun 18, 2004, in forum: Computer Support
    Replies:
    9
    Views:
    561
    Juan Pérez
    Jun 19, 2004
  3. Billh

    Two monitors die in a row

    Billh, Jun 10, 2005, in forum: Computer Support
    Replies:
    4
    Views:
    501
    Billh
    Jun 14, 2005
  4. CBoldman
    Replies:
    0
    Views:
    519
    CBoldman
    Nov 10, 2003
  5. Curtin/Dobbs

    Question about KINGS ROW DVD

    Curtin/Dobbs, May 6, 2004, in forum: DVD Video
    Replies:
    0
    Views:
    437
    Curtin/Dobbs
    May 6, 2004
Loading...

Share This Page