给datatable中添加新列并赋值的方法 Dim dtblREPORT As DataTable dtblREPORT = SelectREPORT() '执行的某次查询 Dim a AsNew Data.DataColumn a.ColumnName ="新加的列"'新加列的headerName dtblREPORT.Columns.Add(a) For u AsInteger=0To dtblREPORT.Rows.Count -1 dtblREPORT.Rows(i).Item("1") ="1"'为新加列赋值 Next
给datatable中添加新列并赋值的方法 Dim dtblREPORT As DataTable dtblREPORT = SelectREPORT() 执行的某次查询 Dim a As New Data.DataColumn a.ColumnName = "新加的列" 新加列的headerName dtblRE