Use the GridView.DeleteRow(int) method to programmatically delete the record at the specified index from the data source. This method is commonly used when you need to delete a record from outside of the System.Web.UI.WebControls.GridView control, such as from a different control on the page. Calling this method also raises the GridView.RowDeleted and GridView.RowDeleting events.