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

Value always resetting to index 1 on postback

3 Answers 47 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
sitefinitysteve
Top achievements
Rank 2
Veteran
sitefinitysteve asked on 09 Dec 2008, 06:39 PM
Databound combobox, with autopostback set to true

When I change the value, the serverside event fires (places the selectedvalue into a textbox on the page)...then the combobox resets its value back to index 0 sometime after Pre-render

Any idea why?  There's really no code behind except for the event, and the datasource is in the markup

3 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 10 Dec 2008, 12:57 PM
Hello Steve,

Please verify that each combo item has unique Value property set.

Greetings,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
radBrad
Top achievements
Rank 1
answered on 10 Dec 2008, 04:42 PM
I am having the same problem.
I am pretty sure they all have unique values because I am setting DataValueField = ID (my PrimaryKey)

On Postback, the RadTreeView inside does maintain the selected node.
However, the RadComboBox is defaulting back to in index 1 ("Select One").
0
Veselin Vasilev
Telerik team
answered on 12 Dec 2008, 09:42 AM
Hello radBrad,

If you have a treeview inside combobox, then I assume your combobox has only one item.
Is that the case?

All the best,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
sitefinitysteve
Top achievements
Rank 2
Veteran
Answers by
Veselin Vasilev
Telerik team
radBrad
Top achievements
Rank 1
Share this question
or