private void FillOrgGroups() { try { lbxOrgGroups.Items.Clear(); DataSet ds = OrgGroup.Items(); DataView dv = new DataView(ds.Tables[0]); dv.Sort = "Name"; lbxOrgGroups.DataSource = dv; lbxOrgGroups.DataTextField = "Name"; lbxOrgGroups.DataValueField = "ID"; lbxOrgGroups.DataBind(); } catch (Exception ex) { SPA.Error.WriteError(ex); if (ShowDebug) { lblErrorMessage.Text = ex.ToString(); } } }
private void FillOrgGroups() { try { DataSet ds = OrgGroup.Items(); DataView dv = new DataView(ds.Tables[0]); dv.Sort = "Name"; ddlOrganizations.DataSource = dv; ddlOrganizations.DataTextField = "Name"; ddlOrganizations.DataValueField = "ID"; ddlOrganizations.DataBind(); ddlOrganizations.Items.Insert(0, new ListItem("-- Select --", "0")); } catch (Exception ex) { SPA.Error.WriteError(ex); if (ShowDebug) { lblErrorMessage.Text = ex.ToString(); } } }