datagridview - How can I total a calculated column in a datatable using VB.NET, in such a way that the total updates whenever the underlying columns change? -


I am developing a request for quote form in VB.NET. It contains header information and a datagrid view that holds line items. DGV is bound to a datat dtRfqLines, where the column value value is calculated to be calculated from the column:

  dtRfqLines.Columns ("PriceTotal"). Expression = "[quantity] * [PriceEach]"  

I get the value in a total column summarized and the result is put in a variable, which is linked to the text box. :

DblRfqTotal = dtRfqLines.Compute ("SUM (PriceTotal)", "")

Now I want this Great Total PriceEach or Quantity values Update one of those, which in turn turns PriceTotal. If I do this then that button works, but is very crappy - I want to update any incident of Datasheet or DGV. The problem is that whichever event I choose is calculated before the total calculation of value, so it is wrong. The incidents that I have tried have been changed for DTV and columns for DTV.

If someone has any idea how can I calculate the value amount completely after updating, I really appreciate it.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -