Datagrid not updated during delete, but updated during insert and update

Discussion in 'ASP .Net Datagrid Control' started by Dmitry Korolyov, Sep 22, 2003.

  1. Hello everyone.

    A test webform here, single datagrid bound to one table through dataset, and controls to delete, update and insert data. The code is built upon the samples from Quickstarts. The problem is: when you perform a delete operation, the data (single row) is deleted just fine, however, the datagrid on the webform is not updated. Well actually, it is updated, but a one-step delay occurs. I.e. when you select the record "a" and hit delete, it is deleted but still shown in the datagrid, when you then select record "b" and hit delete, the data grid no longer shows record "a" but still shows record "b", etc.

    Insert an Update actions work fine - ie changes are immediately reflected in the datagrin on a webform. I am using the same dataset update methods for both insert, update and delete webform events, so it's weird why only delete goes fishy. The methods called after each update are:

    mysqldataadapter.Fill(mydataset, "mytable");
    mydatagrid.DataBind()


    Any ideas here?

    --
    Dmitry Korolyov,

    To e-mail me, remove "nospamformorons".
    Dmitry Korolyov, Sep 22, 2003
    #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. Mark
    Replies:
    2
    Views:
    2,224
  2. mosscliffe
    Replies:
    3
    Views:
    9,457
    mosscliffe
    Apr 28, 2006
  3. luckyads
    Replies:
    0
    Views:
    563
    luckyads
    Jan 21, 2009
  4. luckyads
    Replies:
    0
    Views:
    431
    luckyads
    Jan 22, 2009
  5. Tomo Tomo

    DataGrid with edit,insert & delete but with no ViewState !?

    Tomo Tomo, Nov 7, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    138
Loading...

Share This Page