I think he's after more than just Price X Quantity
goni07
Your datatable should have:
UnitPrice
Quantity
as columns
Then it should have TWO MORE columns:
LineTotal
whose EXPRESSION property is set to "([unitPrice] * [Quantity]) - ([unitPrice] * [Quantity] * [Discount])"
if discount is a percentage.. if it's not, i leave you to work out how to apply it
OrderTotal
whose EXPRESSION property is set to "SUM([LineTotal])"
Now every row in the table will show the SAME value in the OrderTotal column
Bind that column to your total text box. No matter what row is in the Current position of the binding source, the total shows the same value
Changing any UnitPrice or Quantity updates all columns automatically
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.