ASTreeView 1.1.2 What’s New

By | October 21, 2009

I registered a domain for ASTreeView: www.astreeview.com

This domain will be only used for ASTreeView, updates, demos, blogs. It can be regarded as the official site. 😀

online sample: http://www.astreeview.com

added two new features:

1. Extending ContextMenu
Now it is possible to add your customized ContextMenu Items to the menu. A screenshot:

image

Online demo: http://www.astreeview.com/astreeviewdemo/ASTreeViewDemo3.aspx

     To add your customized menu, it’s easy:

/// <summary>
/// initial controls, bind you events etc. here
/// </summary>
private void InitializeComponent()
{
    this.astvMyTree.ContextMenu.MenuItems.Add( new ASContextMenuItem(
        "Custom Menu 1", "alert('current value:' + "
        + this.astvMyTree.ContextMenuClientID
        + ".getSelectedItem().parentNode.getAttribute('treeNodeValue')"
        + ");return false;", "otherevent" ) );

    this.astvMyTree.ContextMenu.MenuItems.Add( new ASContextMenuItem(
        "Custom Menu 2", "alert('current text:' + "
        + this.astvMyTree.ContextMenuClientID
        + ".getSelectedItem().innerHTML"
        + ");return false;", "otherevent" ) );
}

You can replace the “alert” with your own javascript function.

     The code is also included in the new sample package.

2. Expand node by click node text.

    In version 1.1.2, the end user can open the folder by clicking on the node text. It is useful when only the leaf nodes are clickable, for example, bookmarks.

image

To enable this feature, just set the “EnableParentNodeExpand” property of ASTreeView.

Downlaod ASTreeView 1.1.2:http://www.astreeview.com/astreeviewdemo/Download.aspx