01.
Dim
dataColumn
As
DataColumn =
New
DataColumn()
02.
dataColumn.ColumnName =
"ยอดเงินปันผล"
03.
dataColumn.DataType = System.Type.
GetType
(
"System.Double"
)
04.
05.
dataTable.Columns.Add(dataColumn)
06.
07.
For
Each
dataRow
As
DataRow
In
dataTable.Rows
08.
Dim
Result
As
Double
09.
Result =
CDbl
(dataRow(2)) *
CDbl
(dataRow(3))
10.
dataRow(4) = Result
11.
Next
12.
13.
DataGridView1.DataSource = dataTable