Hi,

I have two columns in two different DataGridViews that I would like to Sum up to arrive at the value that is to show up in my WORKORDERTOTAL textbox, what I have now does not work at all. How do I best calculate this sort of expression ?

2) Others have to display other values but What I notice is that I need to actually click on the textboxes for the computation to show up. Is there a better way to handle this please?

Code:
       txtQtyTotal.Text = (DS.Tables("LineItems").Compute("Sum(QUANTITYRECORDED)", "QUANTITYRECORDED <= 10000000")).ToString
        txtTotals.Text = (DS.Tables("LineItems").Compute("Sum(TOTALCOST)", "TOTALCOST <= 10000000")).ToString

        txtWORKORDERTOTAL.Text = (DS.Tables("LineItems").Compute("Sum(TOTALCOST)", "TOTALCOST <= 10000000")).ToString
        txtWORKORDERTOTAL.Text += (DS.Tables("PackedLineItems").Compute("Sum(TOTALCOST)", "TOTALCOST <= 10000000")).ToString

thanks in Advance

Reaction