WCF Service

4 posts, 1 answers
  1. Darren
    Darren  avatar
    57 posts
    Member since:
    May 2009

    Posted 30 Jul 2009 Link to this post

    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?
  2. Darren
    Darren  avatar
    57 posts
    Member since:
    May 2009

    Posted 01 Aug 2009 Link to this post

    I set the ItemsSource instead of the DataContext and now it works.  What exactly is the difference here?
  3. Answer
    Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 05 Aug 2009 Link to this post

    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.
  4. Darren
    Darren  avatar
    57 posts
    Member since:
    May 2009

    Posted 05 Aug 2009 Link to this post

    Thanks Miroslav!
Back to Top