| bsp;
myCol = cols.Add("Total", System.Type.GetType("System.Decimal"), "UnitPrice * Quantity")
myCol.ReadOnly = True
myCol.Unique = False
myCol = cols.Add("Total")
With myCol
.DataType = System.Type.GetType("System.Decimal")
.ReadOnly = True
.Expression = "UnitPrice * Quantity"
.Unique = False
End With
myCol = cols.Add("Total", System.Type.GetType("System.Decimal"))
myCol.Expression = "UnitPrice * Quantity"
myCol.ReadOnly = True
myCol.Unique = False
Dim col As DataColumn
For Each col in cols
Console.WriteLine(col.ColumnName)
Console.WriteLine(col.DataType.ToString)
Next
End Sub
上一页 [1] [2] |