By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,905 Members | 1,616 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,905 IT Pros & Developers. It's quick & easy.

Windows Form Combobox Bind Problem with valuemember

KalariaNitya
P: 34
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
Share this Question
Share on Google+
3 Replies


shweta123
Expert 100+
P: 692
Hi,

Please refer this Article
Jun 9 '08 #2

KalariaNitya
P: 34
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

P: 9
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

Post your reply

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