DataGrid DeleteCommand firing instead of CancelCommand

G

Guest

I dropped a DataGrid control onto a Web UserControl (.ascx) and added columns
for Editing and Deleting data. At first, I had everything working; when the
edit button was clicked the row entered edit mode, the update and cancel
buttons worked as expected, and when the delete button clicked the row was
properly deleted.

Now, however, while in edit mode I click on the cancel button and the
DeleteCommand event fires instead of CancelCommand. DeleteCommand also fires
when the delete button is clicked, as it should. Could anyone tell me why
this is happening? I've tried rolling back changes, but I still can't get it
to work.
 
G

Guest

I moved all controls and code to the .aspx page and my problem disappeared.
If anyone has any idea why, I'd appreciate the explanation.
 

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

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top