你好我的datagridvw显示表中的所有记录减1。所以我的表有11行,而我的datagridvw显示10. 10是限制吗?
我使用VB 2010作为一个工作项目。我绑定了列:PartNbr,Qty(数量)和Price。我还有另外两列,但我希望它们隐藏起来。这是代码。希望你能帮助天才
Dim cmd As OleDbCommand = New OleDbCommand("SELECT PartNbr, Qty, Price FROM CompBOM WHERE HeaderCounter LIKE '" & frmHeader.txtAutoNumber.Text & "' AND LabelName LIKE '" & mbLabel & "'", conn)
adapter = New OleDbDataAdapter(cmd)
'automatically generates Delete Update Insert Commands for dataadapter object
Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(adapter)
Me.DGView.DataSource = Me.bindingSource
dataSet = New DataSet()
adapter.Fill(dataSet, "CompBOMTable")
DGView.DataSource = dataSet.Tables("CompBOMTable").DefaultView
conn.Close()
End Sub
还有太多其他代码要包含这个就足够了