/// <summary> /// Fills the given drop-down list with the available relationship types. /// </summary> private void DisplayAvailableRelationships() { if (drpRelationship.Items.Count == 0) { // Get the relationships from DB DataSet ds = RelationshipNameInfoProvider.GetAllRelationshipNames(CMSContext.CurrentSite.SiteID, "RelationshipAllowedObjects LIKE '%;##OBJECTS##;%'"); if (!DataHelper.DataSourceIsEmpty(ds)) { foreach (DataRow dr in ds.Tables[0].Rows) { drpRelationship.Items.Add(new ListItem(dr["RelationshipDisplayName"].ToString(), dr["RelationshipNameID"].ToString())); } drpRelationship.Enabled = true; } else { drpRelationship.Items.Add(new ListItem(GetString("General.NoneAvailable"), "")); drpRelationship.Enabled = false; } } }