/// <summary> /// Ensures right group is selected in the list. /// </summary> private void PreselectGroup() { if (SelectedGroupID >= 0) { // Get dropdownlist and set it up DropDownList drpGroups = groupsSelector.GetValue("CurrentDropDown") as DropDownList; if (drpGroups != null) { try { drpGroups.SelectedValue = SelectedGroupID.ToString(); } catch { } } } }
/// <summary> /// Ensures right group is selected in the list. /// </summary> private void PreselectGroup() { if ((SelectedGroupID < 0) || (groupsSelector == null)) { return; } // Get DropDownList and set it up DropDownList drpGroups = groupsSelector.GetValue("CurrentDropDown") as DropDownList; if (drpGroups == null) { return; } try { drpGroups.SelectedValue = SelectedGroupID.ToString(); } catch { } }