示例#1
0
 protected void tree_CustomCallback(object sender, TreeListCustomCallbackEventArgs e)
 {
     if (e.Argument == "upload_complete")
     {
         TreeListNode node = tree.FocusedNode;
         //string folderName = node == null ? FileManagerHelper.RootFolder : node.GetValue(FileManagerHelper.FullPathName).ToString();
         string folderName   = node == null ? FileManagerHelper.CurrentDataFolder : node.GetValue(FileManagerHelper.FullPathName).ToString();
         string uploadedName = FileManagerHelper.EndUploadFile(folderName);
         if (!string.IsNullOrEmpty(uploadedName))
         {
             if (node != null)
             {
                 node.Expanded = true;
             }
             tree.RefreshVirtualTree();
             FocusByPath(uploadedName);
         }
     }
     if (e.Argument == "select_File")
     {
         object       keyValue     = tree.FocusedNode[tree.KeyFieldName];
         TreeListNode selectedNode = tree.FocusedNode;
         string       FileName     = selectedNode.GetValue("_path").ToString();
         DemoRichEdit.Open(FileName);
     }
 }