Completed
Last Updated: 14 Jan 2025 14:23 by ADMIN
Release 2025 Q1 (Feb)
ADMIN
Ianko
Created on: 05 Dec 2016 09:44
Category: FileExplorer
Type: Bug Report
0
OnClientMove is not raised when moving folder from Tree to Grid
Moving of folder from the tree to the grid works, but event is not raised. Also, there is no other suitable event that handles the situation. 

The following patch will raise the event, but  you should make sure to remove the override once the bug is fixed: 

<telerik:RadFileExplorer RenderMode="Lightweight" runat="server" ID="FileExplorer1" EnableCopy="true"
    OnClientMove="OnClientMove" OnItemCommand="FileExplorer1_ItemCommand" >
    <Configuration ViewPaths="~/Images" UploadPaths="~/Images"
        DeletePaths="~/Images"></Configuration>
</telerik:RadFileExplorer>     
 
<script>
    var origFunction = Telerik.Web.UI.RadFileExplorer.prototype._onTreeNodeDropping;
 
    Telerik.Web.UI.RadFileExplorer.prototype._onTreeNodeDropping = function (sender, args) {
        origFunction.call(this, sender, args);
        var destNode = args.get_destNode();
        if (!destNode) {
            var destElement = args.get_htmlElement();
            if (!destElement) return;
            var gridElement = this.get_grid();
            var grid = gridElement != null ? this._isOverElement(destElement, gridElement.get_id()) : null;
            if (grid) {
                var isCopying = this._enableCopy && args.get_domEvent().ctrlKey;
                var eventName = isCopying ? "copy" : "move";
                var args2 = new Telerik.Web.UI.FileExplorerEventArgs(this.get_tree().get_selectedNode(), this.get_currentDirectory());
                this.raiseEvent(eventName, args2);
            }
        }
    }
 
    function OnClientMove(sender, ev) {
        // Do something
    }
</script>
1 comment
ADMIN
Rumen
Posted on: 14 Jan 2025 13:30

Hi,

We’re closing this item as a solution has already been provided within the report. If you have any further questions or need additional assistance, feel free to reach out or submit a new request.

Regards,
Rumen
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources