# Gridview - delete command - better control of the delete command

**URL:** <https://forum.kirupa.com/t/gridview-delete-command-better-control-of-the-delete-command/202979>\
**Category:** Uncategorized\
**Created:** [October 6, 2006, 9:38am UTC](https://forum.kirupa.com/t/gridview-delete-command-better-control-of-the-delete-command/202979 "2006-10-06T09:38:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![parms](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@parms](https://forum.kirupa.com/u/parms)\
**Post date:** [October 6, 2006, 9:38am UTC](https://forum.kirupa.com/t/gridview-delete-command-better-control-of-the-delete-command/202979/1 "2006-10-06T09:38:35Z")

</div>

Hi there

I want some server side validation to occur when the delete button is clicked. When the button is clicked i will perform a DB query and if it comes back postive then i want the DELETE action to not occur.

The only 2 events that show up for the DELETE command are

1 - GridView1\_RowDeleting

2 - GridView1\_RowDeleted

Both of these perform the BD query but the delete command still persists. Is there a way to stop it occuring.

I cannot seem to do this.
