protected void UpdateSearchGridViewStatusButton_Click(object sender, EventArgs e) { DropDownList BankExportStatusDDL = (DropDownList)SearchBankExportGridView.FooterRow.FindControl("BankExportStatusDropDownList"); foreach (GridViewRow row in this.SearchBankExportGridView.Rows) { if (row.RowType == DataControlRowType.DataRow) { try { if (((CheckBox)row.FindControl("BankExportSelectCheckBox")).Checked) { Bobs.BankExport be = new Bobs.BankExport(Convert.ToInt32(((TextBox)row.FindControl("BankExportKTextBox")).Text)); be.UpdateStatus((Bobs.BankExport.Statuses)Convert.ToInt32(BankExportStatusDDL.SelectedValue)); } } catch { } } } this.LoadGridViewOfSearchBankExport(); }