Results 1 to 2 of 2

Thread: Calculated Column

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    53

    Calculated Column

    I have a dataGridView That has 2 columns:
    PartCost and partQuantity
    I would like to have a calculated column that shows the totla cost by multiplying the first 2 columns. What is the best way to do this so this calculated column is filled when the rest of the table is filled?
    Thanks

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Calculated Column

    Use a datatable, add 3 columns to it. The 1st column is for price, the 2nd for qty, and the 3rd for total cost. Set the 3rd column's expression = column0 * column1 and then bind that table to your datagridview.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width