Dim tb As DataTable = New DataTable() tb = ds.Tables(0) Dim dr As DataRow = tb.NewRow dr(1) = ds.Tables(0).Rows(0).Item(0).ToString dr(2) = ds.Tables(0).Rows(0).Item(1).ToString dr(3) = ds.Tables(0).Rows(0).Item(2).ToString tb.Rows.Add(dr) Dim dw As DataView = New DataView(tb) DataGrid1.DataSource = dw DataGrid1.DataBind()
tb = ds.Tables(0)
Dim dr As DataRow = tb.NewRow dr(1) = ds.Tables(0).Rows(0).Item(0).ToString
dr(2) = ds.Tables(0).Rows(0).Item(1).ToString
dr(3) = ds.Tables(0).Rows(0).Item(2).ToString tb.Rows.Add(dr)
Dim dw As DataView = New DataView(tb) DataGrid1.DataSource = dw
DataGrid1.DataBind()
Grid控件