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

RadComboBox binding to ObservableCollection<string>

2 Answers 301 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
arthurd
Top achievements
Rank 1
arthurd asked on 12 Aug 2010, 04:57 AM
Can RadComboBox bind directly  to ObservableCollection<string> ?

I don't know what to use for DisplayMemberPath.

I have no problems using it in normal way with ObservableCollection<ObjectX> for example where ObjectX has public string property like DisplayText then I would set DisplayMemberPath="DisplayText" and all is well.

But I just need simple string list and would like to avoid making extra class if not necessary.

Thanks.

2 Answers, 1 is accepted

Sort by
0
arthurd
Top achievements
Rank 1
answered on 12 Aug 2010, 05:02 AM
Now I feel dumb. I thought I tried this before but I guess I did not. When binding to ObservableCollection<string> just leave out the DisplayMemberPath all together and the control does the right thing.
0
Konstantina
Telerik team
answered on 12 Aug 2010, 10:02 AM
Hi arthurd,

We are glad that you have resolved the issue by yourself.

For more information about RadComboBox you can refer to our online documentation: http://www.telerik.com/help/silverlight/radcombobox-populating-with-data-overview.html

If you have any other inquiries please feel free to contact us again.

Best wishes,
Konstantina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
arthurd
Top achievements
Rank 1
Answers by
arthurd
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or