Can't update in DataGrid

  • Thread starter Boban Dragojlovic
  • Start date
B

Boban Dragojlovic

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top