protected void MiscellaneousExpensesGridView_RowCommand(object sender, GridViewCommandEventArgs e) { String fiscalYear = (String)Session["FiscalYear"]; int index = Convert.ToInt32(e.CommandArgument); if (e.CommandName == "RemoveMiscExpense") { StoredProcedures sp = new StoredProcedures(); String expenseType = MiscellaneousExpensesGridView.Rows[index].Cells[0].Text; String accountNumber = MiscellaneousExpensesGridView.Rows[index].Cells[1].Text; sp.DeleteMiscellaneousExpense(fiscalYear, expenseType, accountNumber); PopulateMiscellaneous(); //PopulateGridView(); //InstractionalCompensationPanel.Visible = false; //RatesApplyButton.Visible = false; } }