Hi
Here is one way. I have used a DataTable named 'dt' for the data and the two last columns have expressions which will automatically calculate the sum of appropriate columns. The sample data are just random numbers, but manual input will be auto calculated too.
This is a stand alone example - just use a new project to try it out.
Public Class Form1
Dim dt As New DataTable("freddy")
Private Sub Form1_Load(senderAsObject, eAsEventArgs) Handles MyBase.Load
With dt
.Columns.Add("ID", GetType(Integer))
.Columns.Add("A1-QTY", GetType(Integer))
.Columns.Add("B1-QTY", GetType(Integer))
.Columns.Add("A2-QTY", GetType(Integer))
.Columns.Add("B2-QTY", GetType(Integer))
.Columns.Add("TOTAL A-QTY", GetType(Integer), "[A1-QTY] + [A2-QTY]")
.Columns.Add("TOTAL B-QTY", GetType(Integer), "[B1-QTY] + [B2-QTY]")
'sample data
Dim r As New Random
For i As Integer = 1 To 10
.Rows.Add(i, r.Next(100) + 1, r.Next(100) + 1, r.Next(100) + 1, r.Next(100) + 1)
Next
End With
DataGridView1.DataSource = dt
End Sub
End Class