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

SelectedValue in listbox

P: n/a
Hi!
I have two ListBoxes, lbFood and lbClothes, bound to two different ArrayLists of Stores. DisplayMember = "Name" and ValueMember = "Id".
I would like to select a rows in the lists using ids from a SqlDataReader but so far I have only managed to set SelectedValue = null....

Any Ideas?

Thanks!

/K

Short version of Store:
public class Store()
{
private string name;
private int id;
private string address;
...
public Name
{
get{ return name;}
set{name = value;}
}
public int Id
{
get{ return id; }
set{ id = value; }
}
public string Address
{
...
}

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.