private void MmDataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e) { this.MmDataGrid1.CurrentPageIndex = e.NewPageIndex; this.BindControl(this.MmDataGrid1); }I have the following code in the delete method;
private void MmDataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { // Get the row number to delete int RowToDelete = e.Item.ItemIndex; // Retrieve the previous Class DataSet DataSet tblProductStandard = (DataSet)Session["tblProductStandard"]; // Tell the business object to delete the specified row this.otblProductStandard.Delete(tblProductStandard, RowToDelete); // Rebind the DataGrid this.BindControl(this.MmDataGrid1); }The problem I'm having is that if I am on any page other than the first page and if I delete a record, it is actually deleting the record that is in the corresponding row on page 1. To clarify, if I'm on page 2 and delete the second row, what actually happens is that the second row from the first page is deleted.