473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Dropdown Problem

Hi all,

I have a problem: i want a full table of a Access DB in a Dropdown list. In the database, there is one table with index, name,
telephonenumber.

I have the OleDB Adapter & Dataset, but now i dont know how i can get this stuff into the dropdown, and i also dont know, if the
dropdown can manage more than 1 element.

Usually anyone can help me.

Thx,
Michael

PS: After this problem, i must know, how i can get the selected telephonenumber into a variable.

Nov 21 '05 #1
2 1074
Hi,

Add a new calculated column to your dataset. Use that column as the
displaymember in the combobox.
Dim dc As DataColumn

'

' Add a new column in clients table which

' is full name.

dc = New DataColumn("DisplayInfo")

dc.DataType = System.Type.GetType("System.String")

dc.Expression = "Index + ' ' + Name + ' ' + telephonenumber"

dsClient.Tables(0).Columns.Add(dc)

Ken

--------------------
"Kreuzer Michael" <ze*******@aon.at> wrote in message
news:2u*************@uni-berlin.de...
Hi all,

I have a problem: i want a full table of a Access DB in a Dropdown list. In
the database, there is one table with index, name,
telephonenumber.

I have the OleDB Adapter & Dataset, but now i dont know how i can get this
stuff into the dropdown, and i also dont know, if the
dropdown can manage more than 1 element.

Usually anyone can help me.

Thx,
Michael

PS: After this problem, i must know, how i can get the selected
telephonenumber into a variable.
Nov 21 '05 #2
Hi,

Add a new calculated column to your dataset. Use that column as the
displaymember in the combobox.
Dim dc As DataColumn

'

' Add a new column in clients table which

' is full name.

dc = New DataColumn("DisplayInfo")

dc.DataType = System.Type.GetType("System.String")

dc.Expression = "Index + ' ' + Name + ' ' + telephonenumber"

dsClient.Tables(0).Columns.Add(dc)

Ken

--------------------
"Kreuzer Michael" <ze*******@aon.at> wrote in message
news:2u*************@uni-berlin.de...
Hi all,

I have a problem: i want a full table of a Access DB in a Dropdown list. In
the database, there is one table with index, name,
telephonenumber.

I have the OleDB Adapter & Dataset, but now i dont know how i can get this
stuff into the dropdown, and i also dont know, if the
dropdown can manage more than 1 element.

Usually anyone can help me.

Thx,
Michael

PS: After this problem, i must know, how i can get the selected
telephonenumber into a variable.
Nov 21 '05 #3

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

Similar topics

1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
1
by: news | last post by:
Hello, I need help with the following problem: An HTML page that have two dropdown list whit different values: 1. Dropdown list 1(tblname1) =values with different location's. After user...
2
by: ahoodless | last post by:
hi i have a problem that I have tried desperately to tackle but cannot seem to complete. basically i am trying to create a form with three dropdown lists, the tricky part is i want the 3rd drop...
0
by: Manish | last post by:
Hi All, I'm having this problem I hope someone can help provide a solution for it :) I've this dropdown list box in a usercontrol which I'm populating from the database (it's viewstate property...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
2
by: Brian | last post by:
Hi, All, I have two dropdown lists in itemtemplate in a datagrid. for example, dropA and dropB. also, for the dropdown, I set < Runat="server" AutoPostBack="True" OnSelectedIndexChanged="some...
3
by: devNorway | last post by:
I have been struggling with a problem for days now, and searched for related problems and solutions but had no luck. I have two dropdown listboxes where the first is populated in page load and...
2
by: William Youngman | last post by:
We are developing an application that presents data to the user in a gridview and we are using the dropdown extender to give the user a SharePoint 2007 type dropdown menu attached to the cells of a...
13
by: Shutey | last post by:
I have a strange issue with dropdowns. Using php4, mySQL5, Apache 2 on a fast XP pro PC, I have a form which requires 5 dropdowns populated with indentical values. I extract the values using SQL...
5
by: abhi3211 | last post by:
i am using java inside java script page. in that page i want to use two dropdown list. in first dropdown list i am getting data from ms-access database. in second dropdown list i want to get data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.