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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:50:52+00:00 2026-05-13T17:50:52+00:00

I have a WPF ListView with several columns bound to a custom collection. The

  • 0

I have a WPF ListView with several columns bound to a custom collection. The question is, how can I add another column which is calculated, not bound. Specifically, this is what I have, which displays fine:

            <ListView Name="ui_rptTransactions">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="Date" 
                                        DisplayMemberBinding="{Binding Path=Date}" />
                        <GridViewColumn Header="Category" 
                                        DisplayMemberBinding="{Binding Path=Category.Name}" />
                        <GridViewColumn Header="Amount" 
                                        DisplayMemberBinding="{Binding Path=Amount}" />
                    </GridView>
                </ListView.View>
            </ListView>

In the next column, I’d like to have a “Balance”, which is calculated as “The last manually confirmed balance” minus “the sum of all preceeding transaction amounts”. The first part of that is available via: theBank.LastActualBalance.Amount public property. (The above ListView is bound to theBank.Transactions, an ObservableCollection.

…but I’m a bit stuck as to how to do that. Any ideas?

Thx in advance!

  • 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-13T17:50:52+00:00Added an answer on May 13, 2026 at 5:50 pm

    Your last column can be a bind just like the rest of the columns. You just have to do the calculation in the code behind.

    I would Bind the last column “Balance” to a dependency which is calculated off of the CollectionChanged event of Transactions. That way whenever a Transaction is made an event is fired that recalculates your Dependency Balance.

    oCollection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(oCollection_CollectionChanged);
    
    private void oCollection_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
    {
        CalculatedBalance();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF ListView that is bound to a collection ( List<T> ).
I have a WPF ListView that contains CheckBox column and other columns of the
I have a WPF ListView control for which I am dynamically creating columns. One
I have a WPF ListView with many items in it. When I select several
I have a WPF ListView with a collection of RadioButtons. I want to set
I have a WPF ListView , where I bind an observable collection, and below
I have following WPF ListView: <ListView Grid.Column=2 Grid.Row=1 Margin=0,53,12,6 Name=lvwProperties ItemsSource={Binding Path=SelectedPropertyItems, Mode=TwoWay} Grid.ColumnSpan=2>
I have a WPF ListView and I bind it to a IEnumerable<T> collection. Everything
I have a WPF ListView which repeats the data vertically. I cannot figure out
I have a WPF ListView to wich I bind my collection. Properties of the

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.