protected void btnThemeMacOS_Click( object sender, EventArgs e )
        {
            ASTreeViewTheme macOS = new ASTreeViewTheme();
            macOS.BasePath = "~/javascript/astreeview/themes/macOS/";
            macOS.CssFile = "macOS.css";
            this.astvMyTree.Theme = macOS;
            this.astvMyTree.EnableTreeLines = false;
            this.astvMyTree.EnableRightToLeftRender = false;

            this.divConsole.InnerHtml += ( string.Format( ">>{0}</br>", "MacOS theme." ) );
        }
        protected void btnThemeVista_Click( object sender, EventArgs e )
        {
            ASTreeViewTheme vista = new ASTreeViewTheme();
            vista.BasePath = "~/javascript/astreeview/themes/vista/";
            vista.CssFile = "vista.css";
            this.astvMyTree.Theme = vista;
            this.astvMyTree.EnableTreeLines = false;
            this.astvMyTree.EnableRightToLeftRender = false;

            this.divConsole.InnerHtml += ( string.Format( ">>{0}</br>", "Vista theme." ) );
        }
        protected void btnRightLeft_Click( object sender, EventArgs e )
        {
            ASTreeViewTheme rightLeft = new ASTreeViewTheme();
            rightLeft.BasePath = "~/javascript/astreeview/themes/right-left/";
            rightLeft.CssFile = "right-left.css";
            this.astvMyTree.Theme = rightLeft;
            this.astvMyTree.EnableTreeLines = true;
            this.astvMyTree.EnableRightToLeftRender = true;

            this.divConsole.InnerHtml += ( string.Format( ">>{0}</br>", "Right to left theme." ) );
        }
        protected void btnThemeDefault_Click( object sender, EventArgs e )
        {
            ASTreeViewTheme defaultTheme = new ASTreeViewTheme();
            defaultTheme.BasePath = "~/javascript/astreeview/themes/default/";
            defaultTheme.CssFile = "right-left.css";
            this.astvMyTree.Theme = defaultTheme;
            this.astvMyTree.EnableTreeLines = true;
            this.astvMyTree.EnableRightToLeftRender = false;

            this.divConsole.InnerHtml += ( string.Format( ">>{0}</br>", "Default theme." ) );
        }
        protected void btnThemeDefault_Click(object sender, EventArgs e)
        {
            ASTreeViewTheme defaultTheme = new ASTreeViewTheme();

            defaultTheme.BasePath                   = "~/Scripts/astreeview/themes/default/";
            defaultTheme.CssFile                    = "right-left.css";
            this.astvMyTree.Theme                   = defaultTheme;
            this.astvMyTree.EnableTreeLines         = true;
            this.astvMyTree.EnableRightToLeftRender = false;

            this.divConsole.InnerHtml += (string.Format(">>{0}</br>", "Default theme."));
        }
        protected void btnThemeVista_Click(object sender, EventArgs e)
        {
            ASTreeViewTheme vista = new ASTreeViewTheme();

            vista.BasePath                          = "~/Scripts/astreeview/themes/vista/";
            vista.CssFile                           = "vista.css";
            this.astvMyTree.Theme                   = vista;
            this.astvMyTree.EnableTreeLines         = false;
            this.astvMyTree.EnableRightToLeftRender = false;

            this.divConsole.InnerHtml += (string.Format(">>{0}</br>", "Vista theme."));
        }
        protected void btnThemeMacOS_Click(object sender, EventArgs e)
        {
            ASTreeViewTheme macOS = new ASTreeViewTheme();

            macOS.BasePath                          = "~/Scripts/astreeview/themes/macOS/";
            macOS.CssFile                           = "macOS.css";
            this.astvMyTree.Theme                   = macOS;
            this.astvMyTree.EnableTreeLines         = false;
            this.astvMyTree.EnableRightToLeftRender = false;

            this.divConsole.InnerHtml += (string.Format(">>{0}</br>", "MacOS theme."));
        }
        protected void btnRightLeft_Click(object sender, EventArgs e)
        {
            ASTreeViewTheme rightLeft = new ASTreeViewTheme();

            rightLeft.BasePath                      = "~/Scripts/astreeview/themes/right-left/";
            rightLeft.CssFile                       = "right-left.css";
            this.astvMyTree.Theme                   = rightLeft;
            this.astvMyTree.EnableTreeLines         = true;
            this.astvMyTree.EnableRightToLeftRender = true;

            this.divConsole.InnerHtml += (string.Format(">>{0}</br>", "Right to left theme."));
        }
Exemple #9
0
        /// <summary>
        /// Page load logic
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GenerateTreeByLevel(10);

                ASTreeViewTheme macOS = new ASTreeViewTheme();
                macOS.BasePath                          = "~/Scripts/astreeview/themes/macOS/";
                macOS.CssFile                           = "macOS.css";
                this.astvMyTree.Theme                   = macOS;
                this.astvMyTree.EnableTreeLines         = false;
                this.astvMyTree.EnableRightToLeftRender = false;
            }
        }
        /// <summary>
        /// Page load logic
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load( object sender, EventArgs e )
        {
            if( !IsPostBack )
            {
                GenerateTreeByLevel( 10 );

                ASTreeViewTheme macOS = new ASTreeViewTheme();
                macOS.BasePath = "~/javascript/astreeview/themes/macOS/";
                macOS.CssFile = "macOS.css";
                this.astvMyTree.Theme = macOS;
                this.astvMyTree.EnableTreeLines = false;
                this.astvMyTree.EnableRightToLeftRender = false;
            }
        }
Exemple #11
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);


            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));
            HtmlGenericControl css = new HtmlGenericControl("link");

            css.Attributes.Add("rel", "stylesheet");
            css.Attributes.Add("type", "text/css");
            css.Attributes.Add("href", ResolveUrl("~/Scripts/astreeview/astreeview.css"));
            Page.Header.Controls.Add(css);
            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));

            css = new HtmlGenericControl("link");
            css.Attributes.Add("rel", "stylesheet");
            css.Attributes.Add("type", "text/css");
            css.Attributes.Add("href", ResolveUrl("~/Scripts/astreeview/contextmenu.css"));
            Page.Header.Controls.Add(css);
            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));

            css = new HtmlGenericControl("link");
            css.Attributes.Add("rel", "stylesheet");
            css.Attributes.Add("type", "text/css");
            css.Attributes.Add("href", ResolveUrl("~/Scripts/astreeview/themes/macOS/macOS.css"));
            Page.Header.Controls.Add(css);

            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));
            HtmlGenericControl javascriptControl = new HtmlGenericControl("script");

            javascriptControl.Attributes.Add("type", "text/Javascript");
            javascriptControl.Attributes.Add("src", Page.ResolveUrl("~/Scripts/astreeview/astreeview.min.js"));
            Page.Header.Controls.Add(javascriptControl);
            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));

            javascriptControl = new HtmlGenericControl("script");
            javascriptControl.Attributes.Add("type", "text/Javascript");
            javascriptControl.Attributes.Add("src", Page.ResolveUrl("~/Scripts/astreeview/contextmenu.min.js"));
            Page.Header.Controls.Add(javascriptControl);
            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));

            ASTreeViewTheme macOS = new ASTreeViewTheme();

            macOS.BasePath                          = "~/Scripts/astreeview/themes/macOS/";
            macOS.CssFile                           = "macOS.css";
            this.astvMyTree.Theme                   = macOS;
            this.astvMyTree.EnableTreeLines         = false;
            this.astvMyTree.EnableRightToLeftRender = false;
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);


            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));
            HtmlGenericControl css = new HtmlGenericControl("link");
            css.Attributes.Add("rel", "stylesheet");
            css.Attributes.Add("type", "text/css");
            css.Attributes.Add("href", ResolveUrl("~/Scripts/astreeview/astreeview.css"));
            Page.Header.Controls.Add(css);
            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));

            css = new HtmlGenericControl("link");
            css.Attributes.Add("rel", "stylesheet");
            css.Attributes.Add("type", "text/css");
            css.Attributes.Add("href", ResolveUrl("~/Scripts/astreeview/contextmenu.css"));
            Page.Header.Controls.Add(css);
            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));

            css = new HtmlGenericControl("link");
            css.Attributes.Add("rel", "stylesheet");
            css.Attributes.Add("type", "text/css");
            css.Attributes.Add("href", ResolveUrl("~/Scripts/astreeview/themes/macOS/macOS.css"));
            Page.Header.Controls.Add(css);

            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));
            HtmlGenericControl javascriptControl = new HtmlGenericControl("script");
            javascriptControl.Attributes.Add("type", "text/Javascript");
            javascriptControl.Attributes.Add("src", Page.ResolveUrl("~/Scripts/astreeview/astreeview.min.js"));
            Page.Header.Controls.Add(javascriptControl);
            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));

            javascriptControl = new HtmlGenericControl("script");
            javascriptControl.Attributes.Add("type", "text/Javascript");
            javascriptControl.Attributes.Add("src", Page.ResolveUrl("~/Scripts/astreeview/contextmenu.min.js"));
            Page.Header.Controls.Add(javascriptControl);
            Page.Header.Controls.Add(new LiteralControl(Environment.NewLine));

            ASTreeViewTheme macOS = new ASTreeViewTheme();
            macOS.BasePath = "~/Scripts/astreeview/themes/macOS/";
            macOS.CssFile = "macOS.css";
            this.astvMyTree.Theme = macOS;
            this.astvMyTree.EnableTreeLines = false;
            this.astvMyTree.EnableRightToLeftRender = false;
        }
        private void GenerateTree()
        {
            ASTreeViewTheme defaultTheme = new ASTreeViewTheme();

            defaultTheme.BasePath = "~/Scripts/astreeview/themes/default/";
            defaultTheme.CssFile  = "right-left.css";
            this.astvMyTree.Theme = defaultTheme;

            XmlDocument doc = new XmlDocument();

            doc.Load(Server.MapPath("~/ASTreeViewDemo4_Sample_Data.xml"));

            ASTreeViewXMLDescriptor descripter = new ASTreeViewXMLDescriptor();

            this.astvMyTree.DataSourceDescriptor = descripter;
            this.astvMyTree.DataSource           = doc;
            this.astvMyTree.DataBind();
        }
Exemple #14
0
        public void GenerateTree()
        {
            ASTreeViewTheme macOS = new ASTreeViewTheme();

            macOS.BasePath                          = "../../Plugin/AsTreeView/astreeview/themes/macOS/";
            macOS.CssFile                           = "macOS.css";
            this.astvMyTree.Theme                   = macOS;
            this.astvMyTree.EnableTreeLines         = false;
            this.astvMyTree.EnableRightToLeftRender = false;

            System.Data.DataSet navList = this.GetModelsDataSet("", 0, -1);


            ASTreeViewDataTableColumnDescriptor descripter = new ASTreeViewDataTableColumnDescriptor("ItemID"
                                                                                                     , "Ikey"
                                                                                                     , "ParentIkey");

            this.astvMyTree.DataSourceDescriptor = descripter;
            this.astvMyTree.DataSource           = navList.Tables[0];
            this.astvMyTree.DataBind();
        }
        private void GenerateTree()
        {
            ASTreeViewTheme defaultTheme = new ASTreeViewTheme();
            defaultTheme.BasePath = "~/Scripts/astreeview/themes/default/";
            defaultTheme.CssFile = "right-left.css";
            this.astvMyTree.Theme = defaultTheme;
            
            XmlDocument doc = new XmlDocument();
            doc.Load( Server.MapPath( "~/ASTreeViewDemo4_Sample_Data.xml" ) );

            ASTreeViewXMLDescriptor descripter = new ASTreeViewXMLDescriptor();

            this.astvMyTree.DataSourceDescriptor = descripter;
            this.astvMyTree.DataSource = doc;
            this.astvMyTree.DataBind();

        }