I am fetching data from database and i am showing it in multiple select box but i want to show location 1,3,5 items should be selected by default. How?
Asked
Active
Viewed 522 times
1
-
2This doesn't really make sense... – cjk Jan 12 '11 at 08:23
-
We're assuming you mean "a listbox with multiple selection capabilities". Correct? – Peter Lillevold Jan 12 '11 at 08:26
-
after edit, it's (probably) a dupe: http://stackoverflow.com/questions/831296/programmatically-selecting-items-indexes-in-a-listbox – Tim Barrass Jan 12 '11 at 08:28
-
Are you using WPF, Windows Forms or ASP.Net? – GvS Jan 12 '11 at 08:33
2 Answers
1
Bind the Listbox to the datasource. A google search will probably be helpful.
If you mean "how do I select specific items", then this so question will help.

Community
- 1
- 1

Tim Barrass
- 4,813
- 2
- 29
- 55