Web Site

 Expand Node To Depth

Keep ASTreeView free, keep ASTreeView update. Please make a donation to support the development.
  • English
  • 中文
Common Assembly Version: 1.5.9.0
Expand to depth:
This demo shows how to expand node on both server-side and client-side, and expand the treeview to specified depth.
CONSOLE
cs code
            this.btnExpandAllClient.Attributes.Add( "onclick", this.astvMyTree.GetExpandAllScript() + "return false;" );
            this.btnCollapseAllClient.Attributes.Add( "onclick", this.astvMyTree.GetCollapseAllScript() + "return false;" );
            
        protected void btnExpandToDepth_Click( object sender, EventArgs e )
        {
            int depth = -1;
            try
            {
                depth = int.Parse( this.txtDepth.Text );
            }
            catch { }

            this.astvMyTree.ExpandToDepth( depth );
        }

        protected void asbExpandAllServer_Click( object sender, EventArgs e )
        {
            this.astvMyTree.ExpandAll();
        }

        protected void asbCollapseAllServer_Click( object sender, EventArgs e )
        {
            this.astvMyTree.CollapseAll();
        } 
 


Dear friend,

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