473,473 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

add more than one member to listbox

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"
Nov 20 '05 #1
4 2951
Hi QT,

How are you setting up dv ?

Regards,
Fergus
Nov 20 '05 #2
QT
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"

"Fergus Cooney" <fi******@tesco.net> wrote in message
news:u7*************@tk2msftngp13.phx.gbl...
Hi QT,

How are you setting up dv ?

Regards,
Fergus

Nov 20 '05 #3
Cor
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
Nov 20 '05 #4
QT
thank you

"Cor" <no*@non.com> wrote in message
news:3f***********************@reader21.wxs.nl...
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

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've...
17
by: amber | last post by:
Hello. Can someone tell me what I may be doing wrong here? I'm using the code (lboxRP is a listbox): Dim newRPindex As Integer newRPindex = Me.lboxRP.FindString(RP)...
1
by: Tim | last post by:
Hi, I'm very new to .NET and am programming in C#. I have a web application where i have two list boxes. Its kind of like a shopping card where you can add items from one 'locations' list box to...
6
by: Richard | last post by:
Dim index As Integer = lbSysteem.FindStringExact(strSysteem) basicly i want to return the value but as the examples show on the MSDN library, nothings wrong with the code? if FindStringExact...
5
by: Paul | last post by:
Hi I have a listbox and have the selection mode set to multiple in the property box. I am trying to set multiple selected values in code but it only seems to use the last one....
0
by: Namespace | last post by:
Hi I am having trouble selecting more than one value as selected in a listbox through code. The property "ListSelectionMode.Multiple" is set. There is no problem selecting manually (CTRL +...
0
by: Matthew | last post by:
I have a listbox that I would like to retrieve the value of the item in the list. However, the following does not work because apparently ListBox1.SelectedItem doesn't have a text attribute. ...
2
by: Rick | last post by:
First of all, is there a group more specific to WPF? I have a WPF form and I want to bind to a local member variable from the xaml. the code behind is like this: Partial Public Class...
4
by: danmath06 | last post by:
If I have an Object and a string wich is the name of a member of the object, how can I access the member. I'm trying to do something similar to the DisplayMember property the ListBox has. I'm...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.