/// <summary> /// Binds the parent folder list. /// </summary> protected void BindParentFolderList() { this.Root.DataSource = FileTreeItem.LoadAllFoldersDT(SiteId); this.Root.DataTextField = _OutlineKey; this.Root.DataValueField = _PageIdKey; this.Root.DataBind(); if (FolderId != -1) { this.Root.SelectedValue = FolderId.ToString(); } }
/// <summary> /// Binds the folders. /// </summary> private void BindFolders() { //get all folders DataTable folders = FileTreeItem.LoadAllFoldersDT(SiteId); Hashtable avalibleFolders = new Hashtable(); foreach (DataRow folder in folders.Rows) { if ((int)folder["PageId"] != FolderId) { avalibleFolders.Add(folder["PageId"], folder["Outline"]); } } //avalibleFolders.Add("", "[select folder]"); ddlFolders.DataSource = avalibleFolders; ddlFolders.DataTextField = "Value"; ddlFolders.DataValueField = "Key"; }