By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,278 Members | 2,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,278 IT Pros & Developers. It's quick & easy.

DataGrid DeleteCommand firing instead of CancelCommand

P: n/a
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.
Jul 10 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
"Jason Barnett" wrote:
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.
Jul 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.