Re: Programatically - Listbox
Chris Anderson <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.general |
|---|---|
| Message-ID | <316FA43F497FD411AD4000A0CC53D8123504B3@NOVASVR1> |
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.