473,383 Members | 1,859 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,383 software developers and data experts.

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
Nov 22 '05 #1
0 748

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...
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...
3
by: Ian | last post by:
Hi, I've been trying to create a listview and treeview with icons. You would think it's a pretty straight forward task. API documentation states you simply assign an ImageList - that's been...
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...
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: 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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.