[Quote=引用 3 楼 youshuai168 的回复:]
你结贴数太少
Dim dt As DataTable = CType(Me.DataGridView1.DataSource, DataTable)
Dim dr As DataRow = dt.NewRow()
dr(0) = 你所要给的字段值1
dr(1)=你所给字段2
dr(2)=...
依次往下
你结贴数太少
Dim dt As DataTable = CType(Me.DataGridView1.DataSource, DataTable)
Dim dr As DataRow = dt.NewRow()
dr(0) = 你所要给的字段值1
dr(1)=你所给字段2
dr(2)=...
依次往下
'重新设置DataGridView的数据源
Me.DataGridView1.DataSource = Nothing
'Set New Data Source
Me.DataGridView1.DataSource = dt
Dim MyCommandBuilder As New SqlCommandBuilder
MyCommandBuilder = New SqlCommandBuilder(myAdpt)
myAdpt.Update(myDataSet, "表名")
myDataSet.AcceptChanges()
DataGridView1.Update()