473,471 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Multithreading with TreeView and ListView controls

Hello,

I have an application that uses TreeView and ListView just like Windows
Explorer or Outlook. You click on a tree node and the list is filled up
with corresponding elements.

My list results come from a (remoting) server, and processing is done in
several layers. Now I would like to do this in a multithreaded scenario,
i.e. fetching the list results in the background and then update the
list. I have consulted all the pertinent sources for this on the net,
and it works (relatively) fine so far.

My question is: if the user clicks a different tree node while a fetch
operation is in progress, I would like to stop the worker thread. Or at
least wait for it to be finished, as, for example, SQLReader exceptions
tend to occur when rampantly clicking on nodes. I tried to keep my
separate thread in a static field and return it through something like

internal static Thread ListLoadWorker {
get {
if( _listLoadWorker != null && _listLoadWorker.ThreadState !=
ThreadState.Unstarted ){
_listLoadWorker.Join(50);
}
return _listLoadWorker;
}
/*bla bla*/
}

It just won't come to the point where I could wait for a previous thread
to be finished. What am I missing here?

Best regards, Helge
Aug 18 '05 #1
0 999

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: fgh | last post by:
Hello, two questions please: 1) In a treeview, I want to display folders like it is done in Windows Explorer. Do I have to do this manually or can I set something up in VS.NET 2003? 2) Most...
1
by: paradox | last post by:
I want to have a TreeView that shows an image on some items, but not all. Basically, if a certain condition is true, a caution icon is placed next to the treeview item. The problem is that, by...
4
by: Ben Coats | last post by:
Hey, I'm trying to find code for an Explorer-style Directory ComboBox. (You know, it display "Desktop", "My Computer", all drives, etc., but it has a treeview control inside the combobox so that...
0
by: Helge Lenuweit | last post by:
Hello, I have an application that uses TreeView and ListView just like Windows Explorer or Outlook. You click on a tree node and the list is filled up with corresponding elements. My list...
6
by: Beginner | last post by:
Hi, I'm trying to populate a TreeView from an existing and filled in ListView (lvwBuild). lvwBuild is a basic two column listview which can have any number of rows. I would like the first...
2
by: stacy | last post by:
I am attempting to port an application from a Windows app to an ASP.NET Web App. I notice that the TreeView and ListView controls are not part of the tool box on the WebForm. Can someone tell me...
6
by: Pucca | last post by:
My container with 2 panels containning Treeveiw and Listview controls are chopped off on the top by the toolstripmenu when I dock the these 2 contols in the parent container and the container is...
0
debasisdas
by: debasisdas | last post by:
This sample code displays employee name in the treeview control from the emp table of Scott schema in oracle database. To start with Select Microsoft windows common controls 6.0 (SP6) from...
1
by: =?Utf-8?B?QW5kcmV3?= | last post by:
I am trying to adapt some code that I have where I drag and drop from two treeview controls. Now I want to drag and drop from a listview to a treeview. Whatever I do does not work and I cannot find...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...

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.