Posted 16 Jan 2014
Link to this post
I have a RadComboBox that gets its data set in the FrameWorkInitialize method like this:
string firstFilterName = adaptationFilters.FilterCategoryName;
var firstFilterGroup = adaptationFilters.FilterCategoryChoices.Select(afc => new ComboBoxItem(firstFilterName, afc)).ToList();
firstFilterGroup.Insert(0, new ComboBoxItem(firstFilterName, firstFilterName));
_filterDropDown1.DataSource = firstFilterGroup;
_filterDropDown1.SelectedIndex = 0;
(where ComboBoxItem is an internal class that has an object, value and a string, text)
Everything looks good until I pick a value. Well, the SelectedIndexChanged event also fires like it should, but after the postback, item 0 is selected again. This happen both with ViewStateMode enabled and without.
What am I doing wrong?