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

adding item to listbox

P: 13

i had 1 prblm of adding item to listbox..

but i succeeded that with the help of datasouce..

but i am not able to modify items in can i do that

my coding are

cmd1=new OleDbCommand("Select Address From Tbl_Address where SI_No=("+textBox1.Text+")",con);
ad=new OleDbDataAdapter(cmd1);
DataSet ds=new DataSet();
DataView dv=ds.Tables["Tbl_Address"].DefaultView;
listBox2.DataSource = dv;
listBox2.DisplayMember = "Address";
Jan 31 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 4,871
Here is an FAQ that may help:
Jan 31 '07 #2

P: 29
write this line where you want make changes in the text box control items
ListBox1.Items[index].Text = "Some other value";
index-> means item index in list box
Jan 31 '07 #3

Post your reply

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