Ok, you're trying to select each item in the list based on the dataset. Now
I've got you.
Very similar. First you will certainly have a problem if the text doesn't
match exactly. Strings matching is case sensitive remember. So make certain
that your data and the entries in the list box are exactly the same. Or use
a .ToLower to make certain.
Next your real problem is that you're using SelectedIndex. That keeps
changing the selected index to a single item. It automatically deselects any
other. You have to set each item to selected seperately like this:
foreach(string i in lang)
{
for(int j=0;j<lstLang.R ows;j++)
{
if(lstLang.Item s[j].Text==i)
{
lstLang.Items[j].Selected = True;
}
}
}
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<ar*********@gm ail.com> wrote in message
news:11******** *************@i 40g2000cwc.goog legroups.com...
I guess its me who is unable to make u understand.....
Well the databse field tells u the language list (Comma Seprated) which
needs to be selected. So I have to get the values from the databse
itself.....