I have a treeview control on a windows form that I want to populate in the form's load event. The problem is that the datatable I am using to populate it contains >20,000 records, and it takes > 1 min to load the form. How can I populate it partially during load and then complete it when the user needs the complete set (i.e. when the user scrolls down)? 8 1821
"Patrick McGuire" <an*******@disc ussions.microso ft.com> schrieb I have a treeview control on a windows form that I want to populate in the form's load event. The problem is that the datatable I am using to populate it contains >20,000 records, and it takes > 1 min to load the form. How can I populate it partially during load and then complete it when the user needs the complete set (i.e. when the user scrolls down)?
Only populate the first and second level. As soon as the user expands a node
from the first level, load the sub nodes of all sub nodes of the expanded
node.
--
Armin http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
A good idea, and I'm already doing that. The situation to which I'm referring, though, is one where there are > 20,000 records on the first tier
I've thought about using, say, "TOP 100", in my SelectCommand's CommandText, but how do I smoothly continue the populating when the user attempts to view more nodes by scrolling down?
----- Armin Zingler wrote: ----
"Only populate the first and second level. As soon as the user expands a nod
from the first level, load the sub nodes of all sub nodes of the expande
node.
A good idea, and I'm already doing that. The situation to which I'm referring, though, is one where there are > 20,000 records on the first tier
I've thought about using, say, "TOP 100", in my SelectCommand's CommandText, but how do I smoothly continue the populating when the user attempts to view more nodes by scrolling down?
"Patrick McGuire" <an*******@disc ussions.microso ft.com> schrieb
----- Armin Zingler wrote: -----
"Only populate the first and second level. As soon as the user expands a node from the first level, load the sub nodes of all sub nodes of the expanded node."
A good idea, and I'm already doing that. The situation to which I'm referring, though, is one where there are > 20,000 records on the first tier.
I've thought about using, say, "TOP 100", in my SelectCommand's CommandText, but how do I smoothly continue the populating when the user attempts to view more nodes by scrolling down?
I don't know how to populate it when scrolling down, sorry. I'd say that
20,000 records is much more than a user can handle. Maybe the code to fill
the control can be optimized?
--
Armin http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
Group the records in some fashion *above* the top tier, perhaps
alphabetically, or by date (grouping by day, week, or month), or by using
some other suitable categorization. Your goal is to find a way reduce the
number of items in the first tier. I agree with Armin that 20,000 records is
too many to be useful, and as you can see, returning that many records
causes UI problems.
At the same time, I suggest you give users better search/filter options, so
they don't get 20,000 records back.
"Armin Zingler" <az*******@free net.de> wrote in message
news:On******** ******@TK2MSFTN GP11.phx.gbl... "Patrick McGuire" <an*******@disc ussions.microso ft.com> schrieb
----- Armin Zingler wrote: -----
"Only populate the first and second level. As soon as the user expands a node from the first level, load the sub nodes of all sub nodes of the expanded node."
A good idea, and I'm already doing that. The situation to which I'm referring, though, is one where there are > 20,000 records on the first tier.
I've thought about using, say, "TOP 100", in my SelectCommand's CommandText, but how do I smoothly continue the populating when the user attempts to view more nodes by scrolling down?
I don't know how to populate it when scrolling down, sorry. I'd say that 20,000 records is much more than a user can handle. Maybe the code to fill the control can be optimized?
-- Armin
http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
how about using a hierarchical grid UI instead of a treeview.
>How can I populate it partially during load and then complete it when the
user needs the complete set (i.e. when the user scrolls down)?
Are you serious? Just read 50 records from the DB, and display the form.
Read the rest (and show an hourglass) when the user does something.
Patrick,
Would you consider an alternative to MS TreeView ?
Our TList control
a) Is much faster even if loading all records
directly into memory
( 20,000 records in under 1 SECOND ! )
b) also has a Virtual Load mechanism that triggers
an event where you can supply the data only as
needed.
Basically you tell TList how many nodes you've
got and then fill in the data when the
user scrolls, expands a branch, etc.
For such a small data set ( just 20,000 records )
I would suggest loading directly into memory.
That way you can use TList's other features for
Printing, File I/O, Search, Sort, etc.
Usually we recommend the Virtual loading only
for really large data sets - 50,000 or more
( TList can handle over a million items )
Drop me a note if this sounds interesting to you
I'd be happy to send additional information and
answer any questions you may have about TList.
* * Please include a copy of this note with your reply
Jeff Bennett Je**@Bennet-Tec.Com
Bennet-Tec Information Systems, Inc
50 Jericho Tpk, Jericho, NY 11753
Phone 516 997 5596, Fax - 5597 WWW.Bennet-Tec.Com
RELIABLE Component Software
and Software Development Services
* TList/Pro * ALLText HT/Pro * MetaDraw *
=============== ======= =============== ======= -----Original Message-----
From "Patrick McGuire"
<an*******@disc ussions.microso ft.com>
I have a treeview control on a windows form that I want to populate in the form's load event. The problem is that the datatable I am using to populate it contains >20,000 records, and it takes > 1 min to load the form. How can I populate it partially during load and then complete it when the user needs the complete set (i.e. when the user scrolls down)? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: imassadpk |
last post by:
Hi all,
Apprecite your help in resolving this tricky issue...
I am trying implementing Recurrsive TreeView in MS. Access 2003 ADP
project. So far, no luck :(
The Problem:
This sample snippet is all written for DAO and doesn't work in ADO
|
by: Janus |
last post by:
Hello.
I need a little advice for populating the treeview control.
I dont want my application to hang while populating the treeview, there is a lot of data what's the best approach?
Maybe something eventbased but how? please help...
Should I avoid populating the treeview control using a thread?
|
by: Henry |
last post by:
I have a dataset dsMain in which I have two tables
The table period has columns like period_id, name, root_org_id....
The table organization has org_id, name, parent_id, hier_path, level,
org_index, and period_id.
There is a one to many relationship between period and organization, but the
organization is actually a hierarchy.
period.root_or_id represents the org_id of the root node of the
organization hierarchy and that organization...
|
by: Mike |
last post by:
Hi all,
I have a dataset that contains following records:
id ref_id level
--------------------------------------
A - 0
A1 A 1
A2 A 1
A3 A 1
|
by: Mike |
last post by:
Hi all,
I have a dataset that contains following records:
id ref_id level
--------------------------------------
A - 0
A1 A 1
A2 A 1
A3 A 1
| |
by: Erland |
last post by:
Hello all,
I have just installed visual studio .net 2005 and started developing
programs in asp.net 2.0. I have a scenerio where I have to populate
treeview child nodes based on the entries being entered in textbox,but
there is this thing I need to consider. Values in treeview nodes should
be populated as nodes, all child nodes in this case, as soon as vales
are being entered in textbox. That is to say, if I enter H in textbox
then H...
|
by: drop |
last post by:
Hi,
I'm currently working with the Treeview control in ASP .Net 2.0. The
tree is filled dynamically based on data contained in a MySQL Database.
Here is the exact behavior I want :
1 - User clicks on a node to expand it.
2 - Add a child node to the node clicked by the user saying the tree is
loading that part. So here, I also need to expand the node clicked by
|
by: Steve Arndt |
last post by:
I'm trying to populate a vb.net treeview using a SQLDataReader at
Treeview1_BeforeExpand.
Basically I have a Treeview with 5 parent nodes and 1 dummy child node per
parent. The first parent node is called Address is the parent I'm trying to
add new children under.
When BeforeExpand is triggered, it removes the dummy child under the Adress
parent node based on e.Node.FirstNode.Remove. Then runs a private sub
called PopulateNode with...
|
by: Joe Cool |
last post by:
Let's say I have a Treeview control on a form. Each leaf node in the
Treeview has a ContextMenuStrip, each with one ToolStripMenuItem, and
all ToolStripMenuItems Click event is handled by a comment event
handler.
How do I determine which Treeview Node signalled the menu event in the
common event handler?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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.
| |