add more than one member to listbox

  • Thread starter Thread starter QT
  • Start date Start date
Q

QT

Dear Sirs,

I am using following scripts to add data members to listbox, but I can only
add one fiels. Any idea how can I add more than one data fields to listbox?

Me.cmbGurup.DataSource = dv
Me.cmbGurup.DisplayMember = "Gurup"
 
Dear Sirs,

Like this

Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data Source=" &
VB6.GetPath & "\Rehber.mdb"

Dim sqlStr As String = "SELECT DISTINCT Gurup FROM Rehber Order by Gurup"

Dim conn As OleDbConnection = New OleDbConnection(conStr)

' Create data adapter object

Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)



' Create a dataset object and fill with data using data adapter's Fill
method

Dim ds As DataSet = New DataSet

da.Fill(ds, "Rehber")

' Attach dataset's DefaultView to the datagrid control

Dim dv As DataView = ds.Tables("Rehber").DefaultView



Me.cmbGurup.DataSource = dv

Me.cmbGurup.DisplayMember = "Gurup"
 
QT
Do you know that in the listbox you can only use one column (which can be
presented horizontal).
I advise you to take a look at the listview
Cor
 
Back
Top