Exemple #1
0
        /// <summary>
        /// 특정 노드에 Focus를 줍니다. Focus를 주려면, 현재 노드가 보여야 하므로, 부모 노드들을 모두 Expand 시킵니다.
        /// </summary>
        /// <param name="node"></param>
        public static void FocusNode(this RadTreeNode node)
        {
            if (node == null)
            {
                return;
            }

            if (node.ParentNode != null && node.ParentNode.Expanded == false)
            {
                node.ExpandParentNodes();
            }

            node.Focus();
        }
Exemple #2
0
 protected void RadFileExplorerAlbum_ExplorerPopulated(object sender, Telerik.Web.UI.RadFileExplorerPopulatedEventArgs e)
 {
     if (e.ControlName == "tree")
     {
         albumPin = Request.QueryString["pin"];
         if (!String.IsNullOrEmpty(albumPin))
         {
             Album album = new Album();
             albumName = album.GetAlbumName(albumPin);
             RadTreeNode node = RadFileExplorerAlbum.TreeView.FindNodeByText(albumName);
             if (node != null)
             {
                 node.Selected = true;
                 node.Focus();
                 node.Expanded = true;
                 RadFileExplorerAlbum.InitialPath = node.FullPath;
             }
         }
     }
 }