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

  • SEARCH
  • Home
  • 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 5940275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:56:45+00:00 2026-05-22T15:56:45+00:00

Hopefully I can make this clear. I have a DataGrid <DataGrid Grid.Row=6 Grid.Column=1 AutoGenerateColumns=False

  • 0

Hopefully I can make this clear. I have a DataGrid

<DataGrid Grid.Row="6" Grid.Column="1"
            AutoGenerateColumns="False"
            CanUserAddRows="False"
            CanUserDeleteRows="False"
            ItemsSource="{Binding projectEntriesForEmployee}">

bound to an

    public ObservableCollection<ProjectEntry> projectEntriesForEmployee { 
        get { return (ObservableCollection<ProjectEntry>)GetValue(projectEntriesForEmployeeProperty); }
        set { SetValue(projectEntriesForEmployeeProperty, value); }
    }
    public DependencyProperty projectEntriesForEmployeeProperty = DependencyProperty.Register("projectEntriesForEmployee", typeof(ObservableCollection<ProjectEntry>), typeof(MainWindowVC));

If I set projectEntriesForEmployee before I load my UserControl (which I did to debug), my rows show properly in the DataGrid. If however, projectEntriesForEmployee is null when the UserControl loads, when I set projectEntriesForEmployee to a valid ObservableCollection with items in the list (based on an event), no rows show on the DataGrid. What could be going on?

Edit:
I’ve tried

CollectionViewSource.GetDefaultView(projectEntriesForEmployee).Refresh();

but no joy.

  • 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-22T15:56:45+00:00Added an answer on May 22, 2026 at 3:56 pm

    Sorry everyone. I’ve answered my own question, as it turns out that the problem was the Dependency Property Owner Type. I had it as MainWindowVC. It should have been TimeEntryVC. As soon as I changed that, I commented out the resetting the ItemsSource in the Controller class, and everything worked as it should. So @Tim, you’re right that the Binding system takes care of things; I just told it to look for the property in the wrong class. Thanks all regardless, as I understand better what’s going on behind the scenes now than I did before.

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

Sidebar

Related Questions

This one is fairly complex, hopefully I can make this clear enough for somebody
Hopefully this will be clear enough. I have a 2d map made of tiles,
Hopefully this question is not to confusing, but I can help clear it up
Hopefully someone can help here, it's incredibly frustrating! I have a couple of iOS
This is a weird one, but hopefully someone can give me an idea here.
Sorry for the unhelpful title, but hopefully I can explain this well enough. Lets
Hopefully I can explain what I am trying to accomplish. I have no problem
hopefully some WPF ninja can explain to me why if I have a tab
Hopefully I can articulate my question well enough to get some clear and usable
Hopefully this will be a straightforward solution but I can't seem to solve it

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.