1
我有這個應用程序與列表框。當單擊按鈕時,我的數據庫中的某些內容應該顯示。隨着顯示器列標題!它以「{itemID = SW934,數量= 10 ...」等形式出現。我如何擺脫「{」和列標題?這裏是我當前的代碼:在vb 2010刪除列標題快遞
公共類Form1中
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'MICROLANDDataSet.Orders' table. You can move, or remove it, as needed.
Me.OrdersTableAdapter.Fill(Me.MICROLANDDataSet.Orders)
'TODO: This line of code loads data into the 'MICROLANDDataSet.Inventory' table. You can move, or remove it, as needed.
Me.InventoryTableAdapter.Fill(Me.MICROLANDDataSet.Inventory)
'TODO: This line of code loads data into the 'MICROLANDDataSet.Customers' table. You can move, or remove it, as needed.
Me.CustomersTableAdapter.Fill(Me.MICROLANDDataSet.Customers)
End Sub
Private Sub btnOut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOut.Click
Dim query1 = From OUT In MICROLANDDataSet.Inventory
Where OUT.quantity <= 10
Order By OUT.description Descending
Select OUT.itemID, OUT.quantity, OUT.description
lstOutput.DataSource = query1.ToList
lstOutput.SelectedItem = Nothing
End Sub
末級
謝謝你們。任何幫助是非常歡迎的。
好的,我會試試看。 brb – Shinobi1173 2012-08-04 00:23:11
當你說我可以以任何方式格式化字符串,你是什麼意思? – Shinobi1173 2012-08-04 00:24:52
@ Shinobi1173,我簡單地將三個字段連接在一起。但是,您可以通過在字段之間放置空格來創建更漂亮的輸出。 '選擇Out.itemID&「」&OUT.quantity&「」&Out.description'。 – 2012-08-04 00:30:45