Warning - long message.
Many thanks for making the A97 version of the treeview w/o activex
controls available.
I have taken it down a different path and ended up doing almost
everything differently.
It now has, built in, the ability to have 12 levels, not just 3. The
tree's recordsource table (TreeviewRS) is built based on information
in a table that has a field for each level, as follows:
1) Name of Field in table/query to use as text of treeview display
(For example, fClientName)
2) Name of table/query to find field in (1), above (For example,
qryClients)
3) Name of ID-NO unique, non-duplicates index of table in (2) (For
example, tblClients_ID)
4) Name of ID-NO Foreign index that field in (1) relates to for tree
purposes (the key of the immediately higher tree branch) (For example,
fIndustries_FK)
Yes, Virginia, no surrogate keys for my datasources. LongIntegers
only. <g>
Database information can be easily added if you want the tree to get
its information for a particular level from a table that is neither
local nor linked
Everything works fine, EXCEPT expanding and collapsing the individual
branches. I know, I know, that sounds like a lot. LOL
In other words, in its current shape, it provides for 12 levels and as
long as you never want to have the tree collapsed, it works fine.
Truth is that most of the time I work with uncollapsed trees,
especially if I have a partial field search option, such as comes
internal to access forms. (Cntl-F is your friend. Well, it is my
friend anyway.)
I'd like to get expanding and collapsing working, but I fear that I
will be beating my head against a wall because my command of SQL is
woeful. Simple stuff I can do. BOM stuff makes my head spin. I
think this is closer to the latter.
If you have gotten this far, here is what I'm trying to accomplish
(and it wouldn't surprise me to find that by writing this out, a
solution may present itself to me):
I have a single table that has all tree entries in it. That is, I
merge all the records from the various tree-branch sources into a
single file. This single file is used as a Temporary table which has
100% of the potential branches. (tblLevelsTEMP)
The actual treeview uses a different table (TreeviewRS) to populate
the tree. As long as everything in the potential branches file is
also in the treeview source, everything works (I think I'm being
redundant).
So, let's say there is a particular branch that I want to collapse.
Let's say that the branch is a level 3 branch (with 4 branches beneath
it). I want to annotate the tblLevelsTEMP table with information such
that when I re-build TreevewRS it doesn't pick up anything BELOW that
particular branch.
The posted Treeview uses a particularly unique method which relies on
specifically 3 levels and stores information in tables in ways that I
don't want to duplicate. Trust me on this, expanding the existing
structure to 12 levels would be a nightmare.
The table structure of tblLevelsTEMP has, for each branch text:
1) A sort order indicator so that the branch will find its way to the
right location, if it is usable
2) The text to display on the tree if it is used in the treeview
3) An indicator as to what level the tree is on (my example above
would be '3')
4) A unique key within this table
5) The key of the branch immediately above this one (zero if it is a
primary branch)
6) An indicator whether the branches BENEATH this branch should be
displayed or not
7) Item (3) from the above list (not this list). That is, the ID-NO
key of this branch in the table/query from which it came.
OK, with that information, can I create a query that does the
following?
Produce a recordset from tblLevelsTEMP which has all rows from
tblLevelsTEMP other than those rows where Level is higher number than
the level indicated with a "do not use any branches BENEATH this
branch" indicator.
=============== =============== =============== ==========
I'm leaning towards changing the structure somewhat and having the
code which attaches to the mouse-click to collapse or expand a branch 0 1809 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lauren quantrell |
last post by:
So many postings on not to use the treeview control, but nothing
recently. Is it safe to swim there yet with Access 2000-Access 2003?
|
by: SoKool |
last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control.
I intend to use a treeview to generate a dynamic menu by collating data from a Sql Server Table.
Many thanks.
|
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 adding a
ImageList to the TreeView, the ImageIndex property of the items in the
TreeView defaults to 0. I could put a blank icon in the ImageList and
make it the 0 index image, however, this makes an ugly space.
Would I have to create my own...
|
by: Peter |
last post by:
Hello,
We are inserting a side menu to our application using a class that is
writing HTML on all our pages. This is a part of the code as an
example:
writer.Write(" <table WIDTH=""100%"" BORDER=""0"" CELLSPACING=""0""
CELLPADDING=""0"" ID=""Table1""> " & vbNewLine)
writer.Write(" <tr>" & vbNewLine)
writer.Write(" <td>" & vbNewLine)
|
by: L.M |
last post by:
Hello,
I knew how to use the treeview under VB6. After migrating to .NET, well, I'm
lost.
I try to add a new node, either to the same level or as a child to a
selected node in the treeview.
However, either it only add it to the root level or it only add it on level
below, doesn't matter what I select. And in some case, I just get an
exception.
| |
by: Mr.D |
last post by:
How do I save/load the contents of a Treeview to a file?
I have found several good examples written i VB6, but not a single one for
VB.NET.
Please help.
----
Tim
|
by: christof |
last post by:
I've got a really easy problem, please help me:
There are two pages in one I'm creating a TreeView like that:
TreeView dbTree = new TreeView();
TreeNode dbTreeRoot = new TreeNode("Root");
dbTree.Nodes.Add(dbTreeRoot);
..
..
|
by: Tymbow |
last post by:
I'm building a web application that is analogous to the Windows XP file
explorer in function. The left column contains a TreeView, and the right
column a DataGrid populated by selecting TreeView nodes. The TreeView
populates dynamically as there are a significant number of nodes. The
DataGrid displays both the items and the nodes from the TreeView. Using the
explorer analogy this means the TreeView shows folders, and the DataGrid
folders...
|
by: kvicky |
last post by:
I am trying to load child nodes to a TreeNode in a TreeView in a
ASP.net web application.
The Treeview with parent nodes are loaded on a Page_load while doing
if( ! ISPostback ) and then in the Treeview event I am dynamically
trying to load the child nodes to the exisisting TreeView. The problem
is since the TreeView is being loaded on not a Postback, I am unable to
refer to any node in the TreeView event. Can anybody tell me how to...
|
by: Matt MacDonald |
last post by:
Hi All,
I have a form that displays hierarchical categories in a treeview. Ok so
far so good. What I was to do is have users be able to select a node in the
treeview as part of filling out the form. I only want to allow single
selection, so using checkboxes is out of the question. It works as is, but
it makes the form very cumbersome if every time that a user selects a node,
the whole page has to reload. Is there a way to have a node...
|
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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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...
| |