Completed
Last Updated: 16 Aug 2024 12:18 by ADMIN
Release 2024 Q4 (Nov)
ADMIN
Danail Vasilev
Created on: 25 Jul 2016 16:34
Category: FileExplorer
Type: Bug Report
2
Delete multiple files with context menu from FileExplorer (ExplorerMode="FileTree")
For the time being the following workaround can be used:
		<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Width="230px" Height="430px" DisplayUpFolderItem="true"
			ExplorerMode="FileTree">
		</telerik:RadFileExplorer>
		<script>
			Telerik.Web.UI.RadFileExplorer.prototype._onTreeContextMenuItemClicked = function (sender, args) {
				var treeNode = args.get_node();
				var menuItem = args.get_menuItem().get_value();
				switch (menuItem) {
					case "Rename":
						treeNode.startEdit();
						var nodeInput = treeNode.get_inputElement();
						if (!this._allowFileExtensionRename) {
							var item = this._createItemFromTreeViewNode(treeNode);
							if (!item.isDirectory())
								nodeInput.value = $T.FileExplorerHelper.stripExtension(item);
						}
						this._attachFileNameValidator(nodeInput);
						var treeUL = sender.get_childListElement();
						this._treeKeyDownDelegate = Function.createDelegate(this, this._treeKeyDown);
						if (treeUL) $telerik.addHandler(treeUL, "keydown", this._treeKeyDownDelegate, true);
						break;
					case "NewFolder":
						if (!this._isNodeADirectory(treeNode)) {
							treeNode = treeNode.get_parent();
						}
						var nodeValue = treeNode.get_value();
						this.createNewDirectory(nodeValue);
						break;
					case "Delete":
						var selItems = sender.get_selectedNodes();
						var delItem = new Array();
						for (var i = 0; i < selItems.length; i++) {
							var currItem = this._createItemFromTreeViewNode(selItems[i]);
							delItem.push(currItem);
						}
						this.deleteItem(delItem);
						break;
					case "Upload":
						this._showUploadWindow();
						break;
					case "Copy":
						var selectedItem = null;
						if (!treeNode.get_selected()) {
							selectedItem = this._createItemFromTreeViewNode(treeNode);
						}
						this._copy("tree", selectedItem);
						break;
					case "Paste":
						var pasteItem = this._createItemFromTreeViewNode(treeNode);
						this._paste(pasteItem);
						break;
				}
			}
		</script>
2 comments
ADMIN
Rumen
Posted on: 16 Aug 2024 12:15
The missing feature to delete multiple files in FileTree ExplorerMode will be provided in the upcoming Q4 2024 release, due in November.
DavidS
Posted on: 27 Jul 2016 10:10
Bug is that when FileTree ExplorerMode is used , context menu/Delete will only delete last of a set of selected files.

I'm continually amazed at how ineffective your internal testing and narrow your definition of "normal usage" is.