Click here to Skip to main content
Click here to Skip to main content
Go to top

Tree List View Built with XSLT and DHTML

, 24 Feb 2002
Rate this:
Please Sign up or sign in to vote.
A tree view and list view hybrid built with XSLT and DHTML

Sample Image

Introduction

I am a Visual C++ guy. So why I am talking about XSLT and DHTML now? Sometimes, I am tired of writing C++ codes. Think about how much code you need to write when you want to sink events in ATL, how much code you need to write when you build or manipulate collections in ATL. It's too much and boring. But with DHTML, there are tons of building blocks you can use. I don't need to build a grid control, I don't need to call GDI functions. And it has flexible layout, various appearances.

This idea comes from two reasons: one is I always wanted to build a tree list view by myself, the other is I am an XSLT learner now. ADOData.xml is the XML file generated by ADO when you persist a recordset as XML. ADOData2Hier.xsl is the XSLT file for transforming XML file into HTML file and does the work of grouping data into hierarchies. You can find the grouping method in XSLT from different sources, there is an article about it in Code Project too. Source codes are short, so just see source code for details.

The platform I mentioned is the platform on which I built this. I think it should be OK if you have IE5+ and XSLT (not XSL). I never used netscape because our company and I only use IE.

The codes are just to show the idea. There are many possible improvements.

  • declare global parameters in XSLT file, in the script call addParameter to decide which fields you want to do the grouping and summation (or other aggregation).
  • any number of levels of grouping, also you can declare global parameters, but this may require more work to do.
  • there is an article "fun with tables" in MSDN, you can integrate code from that article to do some column reordering, column choosing, etc.
  • use HTML, CSS features to make the appearance more colorful.

If somebody makes improvements, don't forget to send me a copy.

http://www.visualplant.com

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Michael Tan
Web Developer
United States United States
No Biography provided

Comments and Discussions

 
QuestionExpand Collapse dont work in Firefox/Netscape Pinmemberdisci15-Feb-07 22:59 
GeneralThanks for sharing! PinmemberDBuckner16-Apr-03 3:57 
Questionwhy use concat in a key? PinmemberVirtualLife30-Mar-03 6:17 
Generalyour download has no content!! PinsussAnonymous6-Sep-02 13:40 
GeneralCode Pinmemberafs25-Mar-02 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 25 Feb 2002
Article Copyright 2002 by Michael Tan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid