Homepage AJAX engine framework

Treeview AJAX Control sample page

View Source

Introduction

This AJAX enabled control shows a tree of data. The only thing that you need to implement is a WebService that is called for retrieving the sub nodes of a given node.

Live Sample:

Cities in the USA

Documentation in short:

The AJAX control is using a webservice for retrieving the list of sub-nodes (folders and files) from a given node (the user clicks):

public XmlNode GetSubNodes(string path)

On the web page a AJAX enabled web control is included:

<ajax:TreeView id="TreeView2" runat="server" service="proxies.TreeView.GetSubNodes" title="Cities in the USA" />

TreeView.js This file implements the client side functionality by using a JavaScript behavior that is bound to the html element of the treeview. The implementation handles the mouse clicks and retrieving the additional data when opening new nodes by using a XSLT transformation of the returned xml data structure.

You can find a more detailed documentation in the accompanying book at: http://www.mathertel.de/Ajax/AJAXeBook.aspx


This page is part of the http://www.mathertel.de/AJAXEngine/ project. For updates and discussions see The AJAX Engine blog.