protected void gvCommStructure_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { DropDownList ddlAssetGroup = e.Row.FindControl("ddlAssetGroup") as DropDownList; DataTable dt = new DataTable(); try { dt = advisorBranchBo.GetAdviserAssetGroups(advisorVo.advisorId); ddlAssetGroup.DataSource = dt; ddlAssetGroup.DataTextField = "XALAG_LOBAssetGroup"; ddlAssetGroup.DataValueField = "XALAG_LOBAssetGroupsCode"; ddlAssetGroup.DataBind(); ddlAssetGroup.Items.Insert(0, new ListItem("Select Asset Group", "Select Asset Group")); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AddBranch.ascx:BindGridView()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } } }