Esempio n. 1
0
        protected void tree_VirtualModeNodeCreating(object sender, TreeListVirtualModeNodeCreatingEventArgs e)
        {
            string nodePath = e.NodeObject.ToString();

            e.NodeKeyValue = FileManagerHelper.GetPathKey(nodePath);
            e.IsLeaf       = !Directory.Exists(nodePath) ||
                             (Directory.GetFiles(nodePath).Length < 1 && Directory.GetDirectories(nodePath).Length < 1);
            e.SetNodeValue(FileManagerHelper.FullPathName, nodePath);
            e.SetNodeValue(FileManagerHelper.NameFieldName, Path.GetFileName(nodePath));
        }
Esempio n. 2
0
        void FocusByPath(string name)
        {
            string       key  = FileManagerHelper.GetPathKey(name).ToString();
            TreeListNode node = tree.FindNodeByKeyValue(key);

            if (node == null)
            {
                return;
            }
            node.Focus();
        }