I'd suggest to read this:
DataColumn.Expression Property (System.Data) | Microsoft Learn[
^]
This is a very easy way to create computed column :)
See:
Dim dt As DataTable = New DataTable()
dt.Columns.Add("id", Type.GetType("System.Int32"))
dt.Columns.Add("price", Type.GetType("System.Decimal"))
dt.Columns.Add("tax", Type.GetType("System.Decimal"))
Dim cc = dt.Columns.Add("priceandtax", Type.GetType("System.Decimal"))
cc.Expression = "price + (price * tax)"
dt.Rows.Add(1, 50.0, 0.08)
dt.Rows.Add(2, 50.0, 0.22)
dt.Rows.Add(8, 20, 0.05)
dt.Rows.Add(9, 20, 0.03)
DataGridView1.DataSource = dt