Fixed the delete method for the gridview.