Datagrid: Old data after update

Discussion in 'ASP .Net' started by marty, Apr 19, 2006.

  1. marty

    marty Guest

    I did some searchs, but can't find the answer to my problems.

    I have a editable DataGrid.
    I do an update of one of the rows.
    Postback "OnUpdateCommand"
    Call Oracle proc to do that actual update, which in turn creates a new
    row (effective dating).
    Call BindGrid which retrieves the rows and binds the data to the grid
    again.

    Old data is showing in the DataGrid still. If I do a Edit then cancel
    the new data shows. If I step through the code (ie: take some time)
    the new data will show.

    I'm running locally. I'm thinking it's something to do with IE caching
    the data, but can't figure it out. ie 6.0.
     
    marty, Apr 19, 2006
    #1
    1. Advertising

  2. marty

    Onwuka Emeka Guest

    Check the procedure that loads data unto the grid when it loads before your
    update make sure it only loads when your page is not posting back i.e

    if (!Page.IsPostBack)
    {
    grid.DataSource = GetDataSource();
    grid.DataBind();
    }

    there is a posibility that the grid re-binds with the old values before the
    OnUpdateCommand executes.


    "marty" <> wrote in message
    news:...
    >I did some searchs, but can't find the answer to my problems.
    >
    > I have a editable DataGrid.
    > I do an update of one of the rows.
    > Postback "OnUpdateCommand"
    > Call Oracle proc to do that actual update, which in turn creates a new
    > row (effective dating).
    > Call BindGrid which retrieves the rows and binds the data to the grid
    > again.
    >
    > Old data is showing in the DataGrid still. If I do a Edit then cancel
    > the new data shows. If I step through the code (ie: take some time)
    > the new data will show.
    >
    > I'm running locally. I'm thinking it's something to do with IE caching
    > the data, but can't figure it out. ie 6.0.
    >
     
    Onwuka Emeka, Apr 19, 2006
    #2
    1. Advertising

  3. marty

    marty Guest

    I verified that already. All of my pages have that if statement. This
    only seems to be happening with IE. Firefox doesn't show the old
    values.
     
    marty, Apr 20, 2006
    #3
    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. Kevin Pedersen
    Replies:
    3
    Views:
    1,806
    Kevin Pedersen
    Nov 28, 2003
  2. =?Utf-8?B?TWljaGFlbA==?=

    How to update datagrid after update

    =?Utf-8?B?TWljaGFlbA==?=, Mar 17, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    522
    Alex D.
    Mar 17, 2006
  3. Jim Hill
    Replies:
    3
    Views:
    424
    Jim Hill
    Feb 12, 2007
  4. *Prot3anThr3ad*

    old repository for old C++ source code

    *Prot3anThr3ad*, Sep 29, 2006, in forum: C++
    Replies:
    6
    Views:
    395
    *Prot3anThr3ad*
    Oct 2, 2006
  5. John Henry
    Replies:
    24
    Views:
    1,040
    alex23
    May 30, 2008
Loading...

Share This Page