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

WCF Service

3 Answers 94 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 30 Jul 2009, 10:00 PM
I'm loading data from a WCF Service into a RadCombo box.  I think I am having a problem with the call being asynchronous.  If I load the data imediately without calling the service items appear in the dropdown.  If I call the service there isn't.  I check the Observable Collection and it does have data.  I tried calling UpdateLayout after loading the data but it's still empty.  Is there something I should call on the RadComboBox to make it display the items in the dropdown?

3 Answers, 1 is accepted

Sort by
0
Darren
Top achievements
Rank 1
answered on 01 Aug 2009, 03:11 PM
I set the ItemsSource instead of the DataContext and now it works.  What exactly is the difference here?
0
Accepted
Miroslav
Telerik team
answered on 05 Aug 2009, 06:04 AM
Hi Darren ,

The DataContext of an object is what it will bind to. I.e. when you see {Binding SomeName}, SomeName is a property on the object that is given as a DataContext.

The DataContext is inherited through the visual tree.

The ItemsSource on the other hand is an IEnumerable (often a collection or list) that gives the ItemsControl its items.

Best wishes,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Darren
Top achievements
Rank 1
answered on 05 Aug 2009, 06:13 AM
Thanks Miroslav!
Tags
ComboBox
Asked by
Darren
Top achievements
Rank 1
Answers by
Darren
Top achievements
Rank 1
Miroslav
Telerik team
Share this question
or