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

Combobox Binding using ObjectDataSource. Value + Text

2 Answers 111 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
andy
Top achievements
Rank 1
andy asked on 15 Dec 2008, 05:18 PM
Hi,

I have browsed tru the documentation but i cant find an example on this.
We have RadComboboxitem.Text different from RadComboxitem.Value. If i am using a ObjectDataSource to populate my ComboBox, how do i populate both the Text and Value? Can i use a genericListOf or a HashTable instead of collection/Arraylist so i can store a Pair of value.



Thanks,
Rgds,
Andy

2 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 18 Dec 2008, 02:43 PM
Hello andy,

You need to set the DataTextField and DataValueField properties of the combobox.
We will update our documentation to reflect that.

Sincerely yours,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
andy
Top achievements
Rank 1
answered on 18 Dec 2008, 03:02 PM
Thanks alot!
although I had discarded the usage of datasource, and had changed to use item_requested (For OnDemand) or page_init to load my combobox. :)
Tags
ComboBox
Asked by
andy
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
andy
Top achievements
Rank 1
Share this question
or