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

Multiple DataContext objects

1 Answer 60 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Daniel Woodard
Top achievements
Rank 1
Daniel Woodard asked on 11 Jan 2010, 09:38 PM
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.

1 Answer, 1 is accepted

Sort by
0
Daniel Woodard
Top achievements
Rank 1
answered on 12 Jan 2010, 01:10 AM
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.
Tags
ComboBox
Asked by
Daniel Woodard
Top achievements
Rank 1
Answers by
Daniel Woodard
Top achievements
Rank 1
Share this question
or