473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Constantly Updating List ... DataGridView or ListView

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
2 2067
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: willow1480 | last post by:
I am developing a small little Service Control Application. I am using a listview control with checkboxes and getting the list of services I want to control from a text file. When you check a...
0
by: Art Guerra | last post by:
Any tips or information would be most appreciated! Here is my scenario simplified: I have a main application form (Form1) and on that form is a listView control. On a separate form (Form2), the...
2
by: Kejpa | last post by:
Hi, I've got a number of objects that each have it's own thread. When the value changes I raise an event. Now, I want to handle the event in a form and show the value in a listview. With my first...
6
by: Satya | last post by:
Hi, I am using a DataGridView to display a large amount of data and so need to use filters for displaying certain data. For this I want to provide a textbox for each column of the DataGridView so...
1
by: --== Alain ==-- | last post by:
Hi, I would like to know why a lot of people wants to work with ListView control when DataGridView control already do the same thing ? for example, in my case i would like to display spin...
0
by: =?Utf-8?B?SmltIFdhbHNo?= | last post by:
I am a .NET newbie, specifically WinForms. I have a simple Winform for which I have a "How To" question: My WinForm app will display data from a FoxPro database, two tables in particular:...
3
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm trying to add a datagridview control to a Windows Form to display read-only information in visual basic 2005. My understanding is that datareader will be faster for this purpose. I have the...
4
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
Hi, I have just started building an application which is windows form based, rather than web based, and I am having troubles with layout. I can't find any control which gives me just a simple text...
2
by: Greg | last post by:
I have a listbox control that displays it's data using the DataSource, DisplayMember and ValueMember properties. I've worked a thrid party control (DevExpress) that a similar ListBox control that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.