You can actually bind the DataSource of a list control directly to the DataReader. However, I think a cleaner method is to populate an ArrayList or SortedList object and bind the DataSource to it.
>Is it possible to populate a list object (ListBox or ComboBox) from a DataReader?
>
>When using the ComboBox.Items.Add() method, (which is what I intended on using with the data retreived via a DataReader), it appears that you can only add a single column of values. Specifying a column to associate with the DisplayMember and ValueMember properties seems to require that I specify a DataTable or DataView as the DataSource.
>
>I suppose I could transfer the values from the DataReader to a manually-constructed DataSet, but that seems like going 'round the block to get next door <bg>.
>
>Thanks.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only