473,382 Members | 1,421 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,382 software developers and data experts.

Windows Form Combobox Bind Problem with valuemember

KalariaNitya
Hello all,

i m stuck in how to bind combobox with valuemember

i have four fields in database like..in table agent_master
id =a00001
firstname = nitya
middlename = v
lastname = kalaria

now i want all record from agent_master

in combobox want to bind record like i.e. nitya v kalaria and it's valummber is it's id a00001

can anybody help me how to do that?

thanking u in advanced...

Cheers..
Jun 9 '08 #1
3 1741
shweta123
692 Expert 512MB
Hi,

Please refer this Article
Jun 9 '08 #2
Hey Shweta,

thanks for ur kind help..

i solved my problem.. below is the partial pasted code

For i = 0 To arrfullname.Count - 1
cmbPolicyHolderName.Items.Add(i)
Next


once again thanks..
Jun 9 '08 #3
Do it Like this.

DataAccess da = new DataAccess();
DataTable dt = da.SelectRecord("SELECT Day.* FROM [Day];");
comboBox1.DataSource = dt;
comboBox1.DisplayMember = "Day_ID";
comboBox1.ValueMember = "Day_Name";
Nov 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tamir Khason | last post by:
Why this does not work??? cb1 - combobox DataProvider.DataProvider.DS_BringRacks() - DataSet cb1.DataSource=DataProvider.DataProvider.DS_BringRacks().Tables; cb1.DisplayMember = "id"; ...
5
by: Greg Dunn | last post by:
I have two tables in a parent-child relationship. Details on the tables are as shown below: Table1 ------- Item_ID (primary key) Item_Owner (foreign key to Table2) Table2 -------
5
by: DS | last post by:
How do I go about binding a "struct" datatype to a comboBox? When I bind it by means of the DataSource, it doesn't give any error, but the comboBox just gets populated with...
1
by: Parveen | last post by:
Is it possible to manually provide (display,value) pairs for a combo box?? The only method I'm aware of is bind the "displaymember" and "valuemember" properties of the combobox to columns in a...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
4
by: c_shah | last post by:
I am a beginner and learning VB.net There are two wasy to bind a combobox or a listbox First approach is to assign a datasource and displaymember Second approach is to iterate through datarow...
3
by: Alan T | last post by:
Can I load the items into combobox with id too? Eg. Apple with id 1 Orange with id 2 Lemon with id 3
1
by: johnb41 | last post by:
I have some data in a hashtable, and i need to bind it to a combobox. I know it's impossible to bind a hashtable to a combobox. I need to "bind" it so the combobox gets a DISPLAYMEMBER and a...
4
by: Jerad Rose | last post by:
I'm baffled by this -- is there not a typed object used for ComboBox Items? Best I can tell, all of the methods for ComboBox that accept an Item are of type Object. Why in the world is a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.