private void LoadGrid() { try { pageSize = Conversion.ParseInt(ddlPageSize.SelectedValue); gvStewardship.PageSize = pageSize; int statusid = Convert.ToInt32(ddlStatus.SelectedItem.Value); pageSize = Convert.ToInt32(ddlPageSize.SelectedValue); gvStewardship.PageSize = pageSize; gvStewardship.DataSource = OrganizationInfo.SearchStewardshipByCriteria(txtLegalName.Text, txtTX_ID.Text, txtPhone.Text, txtEmail.Text, txtContact.Text, LanguageId, Convert.ToInt32(UserInfo.UserRole.Stewardship), statusid, CurPageNum, pageSize, out totalRows); gvStewardship.DataBind(); GridPaging(); Utils.GetLookUpData <DropDownList>(ref ddlOrganizationType, LookUps.OrganizationType, LanguageId); Utils.GetLookUpData <DropDownList>(ref ddlOrganizationTypeForUser, LookUps.OrganizationType, LanguageId); string standardIds = System.Configuration.ConfigurationManager.AppSettings["StewardshipStandardIDs"]; string[] stewardshipIdsArr = standardIds.Split(','); foreach (string s in stewardshipIdsArr) { if (ddlOrganizationType.Items.FindByValue(s) != null) { ddlOrganizationType.Items.Remove(ddlOrganizationType.Items.FindByValue(s)); } if (ddlOrganizationTypeForUser.Items.FindByValue(s) != null) { ddlOrganizationTypeForUser.Items.Remove(ddlOrganizationTypeForUser.Items.FindByValue(s)); } } } catch (Exception ex) { new SqlLog().InsertSqlLog(0, "adminStewardship.LoadGrid", ex); } }