DataBinding Question by Robert
Robert
Tue Oct 28 09:23:04 CST 2003
Suggestion: create a custom object which inherits from
CollectionBase and add each item in the datareader to the
object as a collection.
Suggestion: populate or return a Hastable of values from
the datareader, you can bind the Hashtable straight to the
combo box using it's datavaluefield and datatextfield
properties.
Suggestion: Use a DataView or DataTable and pass it back,
it has less overhead.
I have a few more if you don't like those. These are just
off the top of my head!
- Rob
>-----Original Message-----
>Hi,
>
>Right now in my app I am using databinding for some of my
combo boxes. I
>only uses databinding to display the data to the user.
Here is my question.
>Since, databinding keeps the dataset in memory is it
better just to loop
>through the dataset table and add each item? Or should I
create an array
>list from a datareader object to display the data? I
would use the
>datareader object however I would have to pass the
datareader from the
>database to the business component then to the UI. Any
suggestions?
>
>Thanks
>
>
>.
>