This is a migrated thread and some comments may be shown as answers.

[Solved] SelectedValue not working

1 Answer 210 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Lina
Top achievements
Rank 1
Lina asked on 20 Mar 2008, 07:44 PM
I am populating a combobox in the Page_Init function and then retrieving the user's last selected value from db.  I set this to the combobox like this:

((

RadComboBox)this.FindControl(controlName)).SelectedValue = controlValue; 

In debug mode I can see that SelectedValue, SelectedItem and SelectedIndex are all set correctly and stay correctly set in the Page_Load method.

Despite this, always, the first item is displayed in the textbox area of the combobox. 

Any idea what I am missing here?

Thanks,
Lina

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 24 Mar 2008, 02:26 PM
Hello Lina,

This is not the typical behaviour of RadComboBox, but it is hard to tell what causes it without first seeing the rest of the code.

Could you post the HTML markup of the control as well as any code that uses it in the code-behind?

Sincerely yours,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
Lina
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or