New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Forcing a client validation when renaming a folder


Product RadFileExplorer for ASP.NET AJAX


Learn how to check whether the folder name contains a space at the end when renaming it via the File Explorer and cancel the event if a space exists. You can further improve and customize the validation mechanism for more complex scenarios.


You can use the following client-side validation that fires and cancels the Folder Rename event if the folder contains a space at the end:

    <telerik:RadFileExplorer OnClientMove="onClientMove" ID="rfeDocuments" runat="server" RenderMode="Classic">
        <Configuration ViewPaths="~/documents" DeletePaths="~/documents" UploadPaths="~/documents" />
        function onClientMove(fileExplorer, args) {
            var isRename = args.get_newPath().search("/") < 0;

            if (isRename && args.get_newPath().endsWith(' ')) {
                alert("The file name could not contain a space at the end! Rename operation aborted.");

You can find more information for the OnClientMode event in the documentation.

In this article