Web Site

 Text Node

Keep ASTreeView free, keep ASTreeView update. Please make a donation to support the development.
  • English
  • 中文
Common Assembly Version: 1.5.9.0

  • Google
  • Move your mouse(js demo)
    • Big Text
  • Images:
    • hello astreeview demo!
  • Clock:
  • ASTreeView
  • Block Element Line 1

    Block Element Line 2






ASTreeView supports text node. That means you may set the node with html or text as you want, even javascript can be the node content. Please note that you cannot use context menu for the text node. For drag and drop, please EnableNodeIcon="true", EnableDragDropOnIcon="true" , meanwhile, please add an additional attribute isTreeNodeChild='true' if there's html element in the node content. Please refer sample 16 for detail. You can also mix text node and link node in one tree.
CONSOLE
aspx code
<ct:ASTreeView ID="astvMyTree" 
        runat="server"
        BasePath="~/Scripts/astreeview/"
        DataTableRootNodeValue="0"
        EnableRoot="false" 
        EnableNodeSelection="false" 
        EnableCheckbox="true" 
        EnableDragDrop="true" 
        EnableTreeLines="true"
        EnableNodeIcon="true"
        EnableCustomizedNodeIcon="false"
        EnableContextMenu="true"
        EnableDebugMode="false"
        EnableContextMenuAdd="false"
        OnNodeDragAndDropCompletingScript="dndCompletingHandler( elem )"
        OnNodeDragAndDropStartScript="dndStartHandler( elem )"
        EnableMultiLineEdit="false"
        EnableEscapeInput="false"
        EnableDragDropOnIcon="true" />
cs code
this.astvMyTree.RootNode
    .AppendChild( new ASTreeViewTextNode( "<span isTreeNodeChild='true' style='color:#124AC8;font-weight:bold;'>G</span><span isTreeNodeChild='true' style='color:#EF5344;font-weight:bold;'>o</span><span isTreeNodeChild='true' style='color:#D7A703;font-weight:bold;'>o</span><span isTreeNodeChild='true' style='color:#2E4F90;font-weight:bold;'>g</span><span isTreeNodeChild='true' style='color:#406A3F;font-weight:bold;'>l</span><span isTreeNodeChild='true' style='color:#C31402;font-weight:bold;'>e</span>" )
                        .AppendChild( new ASTreeViewLinkNode( "LinkNode 1", "ln1", "http://www.ask.com", "frm", "Goto ask.com", "~/Images/demoIcons/hummer.gif" ) )
                        .AppendChild( new ASTreeViewLinkNode( "LinkNode 2", "ln2", "http://www.picasa.com", "frm", "Goto picasa.com", "~/Images/demoIcons/cadillac.gif" ) )
                        .AppendChild( new ASTreeViewTextNode( "<span style='color:blue;' isTreeNodeChild='true'>link1:</span><a isTreeNodeChild='true' style='color:blue;font-weight:bold;' href='http://www.google.com' target='frm'>Google</a>&nbsp;&nbsp;<span isTreeNodeChild='true' style='color:#BEAC12;'>link2:</span><a isTreeNodeChild='true' style='color:#BEAC12;font-weight:bold;' href='http://www.google.com/chrome' target='frm'>Chrome</a>" ) )
    )
    .AppendChild( new ASTreeViewTextNode( "<span isTreeNodeChild='true' style='color:#4BBE12;cursor:pointer;' id='sOverMe' onmouseover='document.getElementById(\"sOverMe\").style.color=\"red\";' onmouseout='document.getElementById(\"sOverMe\").style.color=\"#4BBE12\";'>Move your mouse(js demo)</span>" )
                        .AppendChild( new ASTreeViewTextNode( "<span style='font-size:18px;' isTreeNodeChild='true'>Big Text</span>") )
    )
    .AppendChild( new ASTreeViewTextNode( "<span isTreeNodeChild='true'>Images:</span><img src='../images/demoIcons/ast.gif' /> <img src='../images/demoIcons/hummer.gif' /> <img src='../images/demoIcons/saab.gif' />" )
                        .AppendChild( new ASTreeViewTextNode( "<marquee isTreeNodeChild='true' style='width:100px;display:inline-block;'>hello astreeview demo!</marquee>" ) )
    )
    .AppendChild( new ASTreeViewTextNode( "Clock:<span id='sClock'></span><script>window.setInterval('var cur_date = new Date();var cur_hour = cur_date.getHours();var cur_min = cur_date.getMinutes();var cur_sec = cur_date.getSeconds();document.getElementById(\"sClock\").innerHTML = cur_hour + \":\" + cur_min + \":\" +cur_sec;',1000);</script>" )/*.AppendChild( n )*/ )
    .AppendChild( new ASTreeViewTextNode( "<font style='color:blue;font-weight:bold;font-style:italic;' isTreeNodeChild='true'>ASTreeView</font>" ) )
    .AppendChild( new ASTreeViewTextNode( "<div isTreeNodeChild='true' style='width:200px;height:100px;border:1px solid green;margin-top:0px\\9;margin-left:0px\\9;+margin-top:-18px;+margin-left:48px;_margin-top:-18px;_margin-left:48px;'><p>Block Element Line 1</p><p>Block Element Line 2</p></div>" ) 
    );
 


Dear friend,

    ASTreeView license has been updated, please visit the License & Pricing page for detial. Thank you.