protected override void OnPreRender(EventArgs e) { if (DisplayMode.ToUpperInvariant() == "ENGLISH") { if (_englishCombo.Items.FindItemByValue(_originalValue) != null) { _englishCombo.Items.FindItemByValue(_originalValue).Selected = true; } } else { if (_nativeCombo.Items.FindItemByValue(_originalValue) != null) { _nativeCombo.Items.FindItemByValue(_originalValue).Selected = true; } } _modeRadioButtonList.Items.FindByValue(DisplayMode).Selected = true; foreach (RadComboBoxItem item in _englishCombo.Items) { item.ImageUrl = string.Format(FlagImageUrlFormatString, item.Value); } foreach (RadComboBoxItem item in _nativeCombo.Items) { item.ImageUrl = string.Format(FlagImageUrlFormatString, item.Value); } _englishCombo.AutoPostBack = AutoPostBack; _englishCombo.CausesValidation = CausesValidation; _englishCombo.Visible = (DisplayMode.ToUpperInvariant() == "ENGLISH"); _nativeCombo.AutoPostBack = AutoPostBack; _nativeCombo.CausesValidation = CausesValidation; _nativeCombo.Visible = (DisplayMode.ToUpperInvariant() == "NATIVE"); _modeRadioButtonList.Visible = ShowModeButtons; _englishCombo.Width = Width; _nativeCombo.Width = Width; base.OnPreRender(e); }