By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,590 Members | 663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,590 IT Pros & Developers. It's quick & easy.

Binding a BindingList to a DataGridView

P: n/a
I'm a newbie to c#, so bear with me.
I'm trying to get data into from a DataReader, put it into a
BindingList that is bound into a DataGridView. My code is:

BindingList<string[]bl = new BindingList<string[]>();
BindingSource bs = new BindingSource();
DataGridView dgv = new DataGridView();

load_list()// method that loads the list using the DataReader

bs.DataSource = bl
dgv.DataSource = bs
As I debug, I can see that the values in bl are correct (columns are
"start", "end", "duration"), but the DataGridView shows the following
columns: Length, LongLength, Rank, SyncRoot, IsReadOnly, IsFixedSize,
IsSynchronized. Of course all rows have the same value for each of
the columns.

What am I doing wrong?

Let me know if more code is needed.
Thanks in advance

Nov 20 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.