Multiple DataContext objects

2 posts, 0 answers
  1. Daniel Woodard
    Daniel Woodard avatar
    13 posts
    Member since:
    Aug 2005

    Posted 11 Jan 2010 Link to this post

    I have a ChildWindow with several RadComboBox controls.  I am trying to populate these with different items.  I can't figure out how to create multiple datacontext objects so I can assign each combobox their own DataContext.

    I have a singleton that holds my application state -- including all my pick lists, e.g, ApplicationState.Current.CustomerTypes, ApplicationState.Current.Categories and ApplicationState.Current.ProductTypes.

    I want to have one combobox per pick list item on my screen.

    How do I assign (populate) each combobox with a pick list?

    Thanks.

  2. Daniel Woodard
    Daniel Woodard avatar
    13 posts
    Member since:
    Aug 2005

    Posted 11 Jan 2010 Link to this post

    Never mind, I figured it out.  Like an idiot I was assigning the DataContext in code instead of the ItemsSource.  By assigning the ItemsSource it started working fine.
Back to Top