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! 2 2092
On Sep 19, 10:43 am, Spam Catcher <spamhoney...@r ogers.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). za***@construct ion-imaging.com wrote in news:1190222671 .964136.214490@
50g2000hsm.goog legroups.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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
checkbox, it should either stop the service or start the service
depending on each respective service's status. I want the listView
to update the status for each service as they are checked. instead
all I can seem to do is clear the listView and I...
|
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 user is able to select a folder
using a folderBrowser control. I want the paths to all files to be added to
the listView control on Form1.
My question lies around what thread should perform the item additions.
Currently, on Form2, I referenced...
|
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 approach I had to have a synclock on the listview the whole
event handler, after some reading I've understood that updating a control
from different threads should use the controls Invoke statement.
Should I use it as well? It's not the...
|
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 that the user
can type in any text and use that text as the filter. I would like to
have this textbox row as the first row of the DataGridView just below
the Header.
I saw someone asking this question one year back but there was no
solution...
|
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 controls,
progressbars controls, images, text, checkboxes,...
it's now more than 2 weeks that i try to understand how ListView works
and what can i do with it...
| |
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: Patients, and Sessions. There is one record in the Patients table
for each patient. The PatientID is the primary key. The sessions table
contains all of the visits that all of the patients have made to the lab.
There is a one-to-many relation between...
|
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 following questions:
1. Can DataReader be bound DIRECTLY to DataGridView?
2. If DataReader cannot be bound directly to DataGridView, how can I load a
DataReader into a DataTable and bind the DataTable to DataGridView? Can the
DataTable be a...
|
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 list! There is
ListView, but that gives me very strange spacing, perhaps because it is
trying to put in icons? There are Flow and Table layout panels, but those
also give me strange spacing. I just want the Windows Form Equivalent of an
HTML...
|
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 allows me to add columns. I typed in the
following
dim colHeader as ListBox.Col (And no column appears).
With DevExpress I am able to add columns definng my own columens, and back a
while ago, I know I was able to use the Microsoft List Box...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |