Can't update in DataGrid

Discussion in 'ASP .Net Datagrid Control' started by Boban Dragojlovic, Oct 9, 2003.

  1. I have looked at all the examples and written a datagrid page with update
    features, but the update doesn't work. Basically, it never executes the
    datagrid_UpdateCommand(...) method

    When I click on the 'Edit' button on any row, it does indeed call my
    DataGrid_EditCommand(...) method, and it correctly switches to edit mode on
    the row. It also replaces the 'Edit' button with 'Update' and 'Cancel'
    buttons.

    But when I'm done editing and click the 'Update' button, it just calls the
    DataGrid_EditCommand method again (instead of the DataGrid_UpdateCommand
    method). Additionally, if I click on the 'Cancel' button, it calls the
    DataGrid_DeleteCommand instead of the DataGrid_CancelCommand

    It is behaving as if it is stuck in "positional" mode. On initial display,
    'Edit' is the first button, and 'Delete' is the 2nd button (there is no
    Update and Cancel yet). When I switch into Edit mode, then Edit is replaced
    with Update and Cancel, and now Update is the 1st button (and apparently
    mapping to the original 1st button ... Edit); Cancel is now the 2nd button,
    and apparently mapping to the original 2nd button (Delete).



    Any ideas?
     
    Boban Dragojlovic, Oct 9, 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. matthew schouppe
    Replies:
    3
    Views:
    2,369
    Scott Allen
    Apr 30, 2004
  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:
    509
    Alex D.
    Mar 17, 2006
  3. Andreas Klemt
    Replies:
    0
    Views:
    320
    Andreas Klemt
    Oct 8, 2003
  4. Kostia
    Replies:
    1
    Views:
    274
    Scott Mitchell [MVP]
    Feb 26, 2004
  5. matthew schouppe

    DataGrid ItemStyle is a textbox and doesn't update the datagrid datasource

    matthew schouppe, Apr 29, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    207
    Scott Allen
    Apr 30, 2004
Loading...

Share This Page