Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 936157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:16:06+00:00 2026-05-15T21:16:06+00:00

I am new to the MVVM model, so I would like some advice, the

  • 0

I am new to the MVVM model, so I would like some advice, the solution I’m using right now does not seem to work.

Description:
I have a Viewmodel containing an observablecollection of Customers,
I display these in a grid with “Back” and “Forward” buttons.
The grids datacontext is set to the SelectedCustomer which is a property in my viewmodel.

So far so good…

However, the customers have a statusfield, which is the integer of the statusrow in the database.
In my viewmodel I have this list (observablecollection) populated, but when I try to populate a combobox in the CustomerGrid there is no data displayed. I guess this is because the Datacontext on the grid is the SelectedCustomer property, and the statuslist is in the root viewmodel.

The Question is this, how can my combobox access my statuslist from within the customergrid, or how should I tackle this situation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:16:06+00:00Added an answer on May 15, 2026 at 9:16 pm
    {Binding DataContext.ListOfStatus, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TypeOfParentControl}}}
    

    You can bind to parent’s data context

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to MVVM so please excuse my ignorance. I THINK i'm using it right
I am using MVVM Light toolkit in my WPF application. I would like to
I get some trouble with the binding using MVVM toolkit and would likr to
I'm pretty new to WPF and using the MVVM design pattern. To help learn
I just started developing my brand new windows 8 application last week using mvvm
I'm using MVVM in a WPF app. I'm very new to both. Let me
I am using WPF and MVVM. In my app it would be nice to
I am writing an app using the MVVM (Model-View-ViewModel) pattern and am leveraging the
I'm currently introducing Prism to a new Wpf application, and am using the MVVM
Using MVVM, one type of ViewModels include the Model they represnt as a Field.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.