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

Constantly Updating List ... DataGridView or ListView

P: n/a
Hi All,

I want to bind a datagridview or ListView to a List that is constantly
being updated (items are added/removed all the time).

Any ideas what the best way is to do this? I tried binding the collection
directly to the grid but occasionally I'll get cross thread errors
(different threads updating the collection).

Is there a way to get a live view of an array/list easily?

Thanks!
Sep 19 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sep 19, 10:43 am, Spam Catcher <spamhoney...@rogers.comwrote:
Hi All,

I want to bind a datagridview or ListView to a List that is constantly
being updated (items are added/removed all the time).

Any ideas what the best way is to do this? I tried binding the collection
directly to the grid but occasionally I'll get cross thread errors
(different threads updating the collection).

Is there a way to get a live view of an array/list easily?

Thanks!
I've never done it but I understand that you can overload a method in
a .NET class. So you should be able to write your own .Add method for
the List. In your .Add method, invoke the standard.Add method to add
the item, and then re-populate the form control(s).

Sep 19 '07 #2

P: n/a
za***@construction-imaging.com wrote in news:1190222671.964136.214490@
50g2000hsm.googlegroups.com:
I've never done it but I understand that you can overload a method in
a .NET class. So you should be able to write your own .Add method for
the List. In your .Add method, invoke the standard.Add method to add
the item, and then re-populate the form control(s).
Yes, but if the .add is called from a different thread, you'll get a cross
thread error.

Also I don't have access to the DataGridView from inside the collection.
Sep 19 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.