Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't update in DataGrid

1 view
Skip to first unread message

Boban Dragojlovic

unread,
Oct 9, 2003, 5:35:04 PM10/9/03
to

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?

0 new messages