Re: Programatically - Listbox
Wayne Lee <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.general |
|---|---|
| Message-ID | <000001c215f3$71530e60$0e631e3e@skywalker> |
Damn, the selected property is readonly on the dropdown...didn't think to check for the listbox! Thanks Chris/merak! Wayne Lee This email has been scanned with Norton AntiVirus 2002 -----Original Message----- From: The DOTNET list will be retired 7/1/02 [mailto:[email protected]] On Behalf Of Chris Anderson Sent: 17 June 2002 12:05 To: [email protected] Subject: Re: [DOTNET] Programatically - Listbox Use the list items Selected property, instead of the ListBox's SelectedIndex property Merak > -----Original Message----- > From: Wayne Lee [mailto:[email protected]] > Sent: 17 June 2002 12:00 > To: [email protected] > Subject: [DOTNET] Programatically - Listbox > > > Hi All, > > I have 4 entries in a listbox, when I query the database i return a > datareader which i then use to loop through. I then want each item in > the listbox to be selected if it exists in the record. > > how can I programatically select more than one item in the listbox? i > can loop through ok and get it to set the selected index property but > this is only a single entry and not a recursive list. > > any ideas please? > > many thanks You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.