ASTreeView 1.1.2 What’s New

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. :D

I release ASTreeView 1.1.2 just now. It can be download from: http://astreeview.googlecode.com/files/astreeview-1.1.2.zip

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://astreeview.googlecode.com/files/astreeview-1.1.2.zip

posted @ Wednesday, October 21, 2009 1:19 PM

Print

Comments on this entry:

# re: ASTreeView 1.1.2 What’s New

Left by Jovan at 10/27/2009 11:59 PM
Gravatar
This control is so great! Great job! I only have one question: the second feature does not work for me: I downloaded version 1.1.2 from the above link, included dll and scripts to my site and added EnableParentNodeExpand="True", but it doesn't work (IE6, IE8, Firefox)! For my site I need following behavior: on click to parent node, I need to expand all child nodes plus to execute some javascript. Is it possible?

Could you please help?

# re: ASTreeView 1.1.2 What’s New

Left by kzb at 10/28/2009 1:50 PM
Gravatar
请教个问题,ASDropDownTreeView使用demo1的方法用Ajaxload后 下拉框下面显示了所有的图标,没有包进DropDown里

# re: ASTreeView 1.1.2 What’s New

Left by jinweijie at 10/28/2009 11:10 PM
Gravatar
@Jovan,

you said expand node does not work? maybe you didn't set the EnableNodeSelect="true" & EnableParentNodeSelection="true"(default it true) ?

this is my configuration in the demo:
<ct:ASTreeView ID="astvMyTree"
runat="server"
BasePath="~/Javascript/astreeview/"
DataTableRootNodeValue="0"
EnableRoot="false"
EnableNodeSelection="true"
EnableCheckbox="false"
EnableDragDrop="false"
EnableTreeLines="true"
EnableNodeIcon="true"
EnableCustomizedNodeIcon="false"
EnableDebugMode="false"
EnableContextMenuAdd="false"
EnableParentNodeExpand="true" />




yes, you can expand the parentnode and execute some javascript at the same time, like this:

this.astvMyTree.OnNodeSelectedScript = "alert(elem.parentNode.getAttribute('treeNodeValue'));";

# re: ASTreeView 1.1.2 What’s New

Left by jinweijie at 10/28/2009 11:10 PM
Gravatar
@kzb,

我得做个实验,我会回你email的

# re: ASTreeView 1.1.2 What’s New

Left by Jovan at 10/29/2009 7:18 PM
Gravatar
I used your default settings and it is working now.
Thanks again!

# re: ASTreeView 1.1.2 What’s New

Left by wj2929 at 10/29/2009 7:44 PM
Gravatar
Id及ParentId类型为Guid,显示不出树,请问如何解决?

# re: ASTreeView 1.1.2 What’s New

Left by jinweijie at 10/30/2009 7:32 AM
Gravatar
@wj2929,

我猜想你可能没有设置RootNodeValue的值,比如,你根节点为Guid.Empty,那么RootNodeValue应该设为Guid.Empty,如果根节点为null,那么RootNodeValue需要设置为null,这样ASTreeView才能根据RootNodeValue去DataTable里筛选第一层节点。

谢谢关注!

# re: ASTreeView 1.1.2 What’s New

Left by jinweijie at 10/30/2009 7:33 AM
Gravatar
@Jovan,

Great, you're welcome~ :)

# re: ASTreeView 1.1.2 What’s New

Left by jinweijie at 10/30/2009 7:33 AM
Gravatar
@kzb,

这个问题是个bug,现在已修复,请下载新版本:

astreeview.googlecode.com/.../astreeview-1.2.1.zip

谢谢

# re: ASTreeView 1.1.2 What’s New

Left by Annie Ong at 11/6/2009 5:37 PM
Gravatar
Hi,

I discovered this free control, and it fits my needs very well. It's really a good control!!Good job.

Anyway, would like to ask if there is anyway to customize the ASTreeViewLinkNode? I will need to store more information than the current supported one (For.eg. nodeType)

Besides, same need will happen in ASTreeViewNodeSelectedEventArgs, as when a treenode is selected, I would need to know the nodeType besides the nodeText, and nodeValue.

Please advice.

Thanks alot!

# re: ASTreeView 1.1.2 What’s New

Left by Rommel at 11/12/2009 5:49 PM
Gravatar
Great Control! Nice Job. :)

Question: is there a way wherein a Node can't have a Sibling? how?

i tried this EnableSibling=false and set the Capacity=0, but it did not work? is there another way to do this?

# re: ASTreeView 1.1.2 What’s New

Left by Rommel at 11/12/2009 8:02 PM
Gravatar
is it possible to have a Node move event?

# re: ASTreeView 1.1.2 What’s New

Left by jinweijie at 11/17/2009 3:21 PM
Gravatar
@Annie,

it's very easy to add additional attributes to astreeviewnodes (bot ASTreeViewNode and ASTreeViewLinkNode), just use the AddtionalAttributes property of the node.

like:

ASTreeViewLinkNode l = new ASTreeViewLinkNode( "Hummer", "Hummer", "http://www.hummer.com", "_self", "Goto Hummer.com", "~/Images/demoIcons/hummer.gif" );
l.AddtionalAttributes.Add( new KeyValuePair<string, string>( "hello-type", "sss" ) );

this.astvMyTree.RootNode.AppendChild( l );


but please not that the following attributes have already been used by ASTreeView:

id
class
openstate
treenodevalue
treenodetype

thanks

Your comment:



 (will not be displayed)


 
 
 
Please add 1 and 2 and type the answer here:
 

Live Comment Preview:

 
View posts by date
«March»
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910