how do i get a summary row for a total of all the products sold in datagridview?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jason Duong
    New Member
    • Mar 2012
    • 3

    how do i get a summary row for a total of all the products sold in datagridview?

    Dim Inventory() As String = IO.File.ReadAll Lines("inventor y.txt")

    Dim query = From line In Inventory
    Let data = line.Split(","c )
    Let name = data(0)
    Let cost = FormatCurrency( data(1))
    Let quantitysold = data(2)
    Let EndInv = 45 - data(2)
    Let totalCostperpro duct = FormatCurrency( data(1) * data(2))
    Select name, cost, quantitysold, EndInv, totalCostperpro duct

    dgvInventory.Da taSource = query.ToList
    dgvInventory.Cu rrentCell = Nothing
    dgvInventory.Co lumns("name").H eaderText = "Product Name"
    dgvInventory.Co lumns("cost").H eaderText = "Bin Cost"
    dgvInventory.Co lumns("quantity sold").HeaderTe xt = "Items Sold"
    dgvInventory.Co lumns("EndInv") .HeaderText = "Ending Inventory"
    dgvInventory.Co lumns("totalCos tperproduct").H eaderText = "Total Cost per Item"
Working...