Important alert: (current site time 7/16/2013 2:59:08 AM EDT)
 

winzip icon

cADOTreeView (Initial Beta Release)

Email
Submitted on: 7/16/2003 7:30:38 AM
By: Slider 
Level: Intermediate
User Rating: By 43 Users
Compatibility: VB 6.0
Views: 31361
 
     TreeView control is one of the most overlooked controls by developers for use in database applications to display picklists. This is mainly due to the lack of data binding and time required to code. This wrapper does it for you! It simplifies the display of complex data relationships using ADO and the TreeView control. I've made it as generic and flexible as possible whilst significatly improving loading performance over manually coded methods. Features include:- --- Loading records on an "as-needed" basis when Nodes are expanded (includes optional control over the expanding of Nodes) - significatly reduces load time. --- Simple and complex data relationships with support for:- a). recursive record linking; b). many-2-one data relationships; c). one record can be displayed multiple times - each instance of the same record can be fully customised i.e. different images, colors, etc...; d). unlimited data relationships and nesting levels. --- "A pictures is worth a thousand words!" - color coded ranges; Images as warning indicators; color coded regions, etc... Built-in automatic support for customisation of *ALL* Node display properties on a "Per Record" basis - NO MANUAL CODING REQUIRED! (Does not use the .Tag property of each Node - does anyone want this property automatically filled?) --- User defined sorting - uses the SQL "ORDER BY" clause instead of each Node's .Sort property --- Custom filter criterias --- Persistance of data relationships (with associated icons). This gives several benefits: - a). the defined relationship is portable and can be stored in the registry, as a resource, record in the database, or to disk (in-built function); b). Bind your database to the treeview control with only 3 lines of code when using a persisted data relationship! c). Can copy any part (or all) of data relationships between different instances using the .Contents property; d). any modification to icons or filtering can be persisted allowing progmatic or user customisation between sessions &/or applications, users, etc... o ... Load-on-Demand (using its own wrapper class) is exposed for use with other non-ADO bound TreeView Controls within your application. It's very easy to Use the wrapper - Define a data relationship, point to the Database, and then the wrapper will do the rest. The zip file includes: all source codes, VBADOTree.Dll, Five (6) demonstration applications ranging from simple implementation of the Load-on-demand feature (non-ADO Demo) through to a complex inter-table relationship (9 tables) with recursive data structures, custom filter criterias, non-alphanumeric (custom user-defined) sorting, and conditional node properties. Both the Wrapper DLL and demonstration applications are fully commented. Demonstration applications also include very detailed comments and notes on how the data binding and automatic SQL building actually works. This should make implementation in your own projects very easy.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 18 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
7/16/2003 10:07:48 AMCarles P.V.

Excellent work, neat and perfectly organized code, well commented... It's a pleasure to download this kind of works. Thanks a lot for sharing it with us.
(If this comment was disrespectful, please report it.)

 
7/16/2003 11:56:23 AMPhantom Man

Excellent!
(If this comment was disrespectful, please report it.)

 
7/16/2003 4:57:59 PMAbadani

This is an example to every one on how to create DLL's and how to show examples of use. I agree with Carles P.V. (whose image viewer I use) it is a pleasure to share your code. You da man!!
(If this comment was disrespectful, please report it.)

 
7/16/2003 5:34:07 PMSpodii

Awesome o-possum! =P
(If this comment was disrespectful, please report it.)

 
7/16/2003 9:02:35 PMZhu JinYong

Very excited to read this talent codes!Good and clear stucture!keep up this wonderful work,please.
(If this comment was disrespectful, please report it.)

 
7/16/2003 10:02:09 PMThushan Fernando

excellent stuff... (as usual)...
(If this comment was disrespectful, please report it.)

 
7/17/2003 3:57:03 AMJohn Ripper

Wow!!! 5***
(If this comment was disrespectful, please report it.)

 
7/17/2003 4:19:03 AMLight Templer

Thats what we have PSC for! Thx for sharing and 5 globes from me. Regards - Light Templer
(If this comment was disrespectful, please report it.)

 
7/17/2003 7:15:10 AMSahir

gr8 code!!!!!!1
(If this comment was disrespectful, please report it.)

 
7/17/2003 10:57:15 AMSchwartz

5 stars
(If this comment was disrespectful, please report it.)

 
7/17/2003 11:47:48 AMJosé Alberca

Excellent work!
(If this comment was disrespectful, please report it.)

 
7/17/2003 3:49:00 PM

Great! As soon as the updating feature is included --> once again ***** from me!
(If this comment was disrespectful, please report it.)

 
7/17/2003 7:52:15 PM

Nice code. It is a pity that MS did not make more of their controls data-aware in the first place.

Keep up the good work.
(If this comment was disrespectful, please report it.)

 
7/18/2003 12:16:32 AMJing Polito

GREAT EFFORT ON THIS!!! 20 Stars from me?
(If this comment was disrespectful, please report it.)

 
7/18/2003 2:36:15 AMdeckard

How could almost missed this?
Very very nice stuff.
Thx a lot DUDE!
(If this comment was disrespectful, please report it.)

 
7/18/2003 3:08:46 AMPhilip Zac

Nice Code.........five from me........too
(If this comment was disrespectful, please report it.)

 
7/21/2003 8:23:19 PMZhu JinYong

Very sad to see not so high voting for this excellent post.It was supposed to be at top 3.I am very doubt the trueness for some votes which goes to some authors.some people created votes for himself for advertisment of himself or his company.It could happen in this month.It is obvious,for example,one of top 3(until PSC time 21/7/2003)is suspected.You can see he cheated people with votes mixed similar characters and numbers which did not show any of those names in his comment section and also other authors voting board.I am very sad!!!

(If this comment was disrespectful, please report it.)

 
7/29/2003 5:40:02 AMAvaneesh Dvivedi

A very useful concept. I think we are all going to use it in one of our work. Thanks for sharing. You always come with practical solutions helpful in actual work.
5 from me.
(If this comment was disrespectful, please report it.)

 
7/29/2003 10:37:59 AMSlider

Thanks guys for all your comments ... I'll work to add new features to the project.
(If this comment was disrespectful, please report it.)

 
9/17/2003 12:36:24 AM

It's nice code.
Thank you so much
(If this comment was disrespectful, please report it.)

 
10/24/2003 5:12:29 AM

What a good job,slider
5* for me
Looking forward for your future version
(If this comment was disrespectful, please report it.)

 
12/27/2004 8:50:24 PMPaul Turcksin

This is a masterpiece, and although I'm using the TreeView in conjunction with ADO frequently and despite the abundance of detailed and excellent comments, I will require much more 'study' before I will fully understand and be able o use it. In the mean time 5 from me.
(If this comment was disrespectful, please report it.)

 
9/19/2005 3:49:13 AMpaul315

Great use of the treeview control. What do the Demo.DS files do in demo 4?
(If this comment was disrespectful, please report it.)

 
4/9/2006 9:53:30 PMLai Min Feng

great project..
but i have trouble with hookctrl...
i want to use this to make my own ocx control.. but i couldn't find to get around the hookctrl error..
how can i use this without the hookctrl ?
(If this comment was disrespectful, please report it.)

 
7/24/2006 4:06:23 AMZhu JinYong

Graeme,your zipworld email is not active.Please email me.thanks.
(If this comment was disrespectful, please report it.)

 
1/25/2007 11:19:08 AMWybert

Wow that must be hard work on it , thanks. It's awesome.
(If this comment was disrespectful, please report it.)

 
4/14/2007 3:19:02 AMXivaX

superb..
(If this comment was disrespectful, please report it.)

 
5/14/2007 4:24:51 AMTom Brennfleck

Thanks for the Code one of the best I have seen, I understand most of it but I have a problem with the following.

'## Define Tables to be used with relationships
'
' Layer Country (Co) ........... [Recursive]
' |
' +- Layer City (Ci)
' |
' +- Layer Hotel (H)

I dont want to have the country layer as recursive, I dont seem to be able to do this. I might be missing something maybe someone can help, but turning the recursive flag to false causes the treeview to not display anything.

thanks for your help

regards,

tombr
(If this comment was disrespectful, please report it.)

 
5/14/2007 2:31:35 PMTom Brennfleck

Just figure out what the problem is, it seems that the subclassing is going awry, the cADOTreeView appears not to function when the treeview is in a container other than a form. Can any one help with this.
(If this comment was disrespectful, please report it.)

 
5/23/2007 8:24:06 PMcasgto

can't find the file "vvadotree.dll"
(If this comment was disrespectful, please report it.)

 
2/4/2009 5:57:23 PMDavor

This is a great control!!! But shame that it doesen't function when the treeview is in a container other than a form :-(((
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.