Skupiny Google už nepodporují nová předplatná ani příspěvky Usenet. Historický obsah lze zobrazit stále.

Can't update in DataGrid

1 zobrazení
Přeskočit na první nepřečtenou zprávu

Boban Dragojlovic

nepřečteno,
9. 10. 2003 17:35:0409.10.03
komu:

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 nových zpráv