Hi All
I wonder if anyone can help provide a little guidance...
I have created a listbox that is populated using data from a SQL Server table. I have another table which is used for the selectedvalue property of my ListBox.
I seem to be having a problem with applying the selectedvalue as my code doesn't seem to let me apply more than one selected value though my listbox's ListSelectionMode is set to Multiple.
I think the problem is more to do with my logic applying the selected values for the listbox...
Say that I have already populated my listbox and have collected the data for the selectedvalue items, which are stored within a dataset called GenreTable... the code below is where I try to apply it to the selectedvalue property...
Code:
Dim i As Integer
For i = 0 To GenreTable.Tables("reporttbl").Rows.Count - 1
ListGenre.SelectedValue = GenreTable.Tables("reporttbl").Rows(i)("genreID").ToString()
Next
What it is doing is only applying the selected value of the last row item within my dataset.
Many thanks in advance
Rit