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 6906109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:16:04+00:00 2026-05-27T08:16:04+00:00

I am working on a WPF application. For some reason, the values in my

  • 0

I am working on a WPF application. For some reason, the values in my view model are not showing

MyViewModel.cs

public class MyViewModel : ViewModel
{
  private ObservableCollection<Item> items = Item.GetAll();
  public ObservableCollection<Item> Items
  {
    get { return items; }
    set { items = value; }
  }
}

public class Item
{
  public int ID { get; set; }

  public List<int> Tally = new List<int>();

  public int Total { get; set; }

  public Item(int id)
  {
    this.ID = id;
    for (int i = 0; i < 7; i++)
      this.Tally.Add(0);
  }

  public static ObservableCollection<Item> GetAll()
  {
    ObservableCollection<Item> items = new ObservableCollection<Item>();
    for (int i = 0; i <= 10; i++)
    {
      items.Add(new Item(i));
    }
    return items;
  }
}

MyPage.xaml

<telerik:RadGridView x:Name="myGridView" Grid.Row="1" AutoGenerateColumns="False" 
  ItemsSource="{Binding Path=Items}">
  <telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding Path=ID}" IsReadOnly="True" />
    <telerik:GridViewDataColumn Header="Monday" DataMemberBinding="{Binding Path=Tally[0], Mode=OneWay}" IsReadOnly="True" Width="1*" />
    <telerik:GridViewDataColumn Header="Tuesday" DataMemberBinding="{Binding Path=Tally[1], Mode=OneWay}" IsReadOnly="True" Width="1*" />
    <telerik:GridViewDataColumn Header="Wednesday" DataMemberBinding="{Binding Path=Tally[2], Mode=OneWay}" IsReadOnly="True" Width="1*" />
    <telerik:GridViewDataColumn Header="Thursday" DataMemberBinding="{Binding Path=Tally[3], Mode=OneWay}" IsReadOnly="True" Width="1*" />
    <telerik:GridViewDataColumn Header="Friday" DataMemberBinding="{Binding Path=Tally[4], Mode=OneWay}" IsReadOnly="True" Width="1*" />
    <telerik:GridViewDataColumn Header="Total" DataMemberBinding="{Binding Path=Total, Mode=OneWay}" />
  </telerik:RadGridView.Columns>
</telerik:RadGridView>

An entry for each Item appears in the grid as expected. However, only the first and last columns have values. The values in the Monday-Friday columns (the columns that reference the Tally List) are not appearing. I’m not sure what I’m doing wrong. Can somebody please tell me?

Thank you!

  • 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-27T08:16:05+00:00Added an answer on May 27, 2026 at 8:16 am

    Tally is a field, needs to be a public property.

    (I also hope that you are aware of INPC if you want to make runtime changes)

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

Sidebar

Related Questions

I'm working on a WPF application and is using the Model-View-ViewModel pattern. The application
I have created some tests in my WPF application. Right now I am working
I've been working on a Composite WPF application and just read some good guidelines
I'm working on a WPF application that sometimes exhibits odd problems and appears to
I am working on a WPF application which has a treeview that represents an
I'm working on a WPF application, and I'm structuring it using the MVVM pattern.
I'm working on a WPF application which should be utilizable with two monitors. In
I am working on a wpf application. Here I need to use System.Windows.Forms.FolderBrowserDialog in
I'm building a WPF application and working with the MVVM pattern. I have 4
I'm working on a WPF MVVM application and I've got a TextBox on my

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.