ASPxClientFileManager.SetCurrentFolderPath(path, onCallback) Method

Sets the current folder’s path.


    path: string,
    onCallback: ASPxClientFileManagerCallback
): void


Name Type Description
path string

A String value that is the relative path to the folder (without the root folder).

onCallback ASPxClientFileManagerCallback

A ASPxClientFileManagerCallback object that is the JavaScript function that receives the callback data as a parameter.


Use the SetCurrentFolderPath method to set the path to the current folder. The onCallback parameter is optional. The function specified via this parameter is called after the current folder is changed.

To set the root folder, call the method with the empty path parameter value.


The code sample below demonstrates how to set the current folder on the client side using the SetCurrentFolderPath method. Note that the Report button selects the first file in the specified folder as well.

  function SelectFirstFile() {

<dx:ASPxButton ID="Root" runat="server" Text="Root" AutoPostBack="False">
  <ClientSideEvents Click="function(s, e) {myFileManager.SetCurrentFolderPath('')}" />

<dx:ASPxButton ID="Reports" runat="server" Text="Reports" AutoPostBack="False">
  <ClientSideEvents Click="function(s, e) {myFileManager.SetCurrentFolderPath('Documents/Reports',SelectFirstFile)}" />

<dx:ASPxButton ID="TestProjects" runat="server" Text="Test Project" AutoPostBack="False">
  <ClientSideEvents Click="function(s, e) {myFileManager.SetCurrentFolderPath('Documents/Projects/Test project')}" />

<dx:ASPxFileManager ID="ASPxFileManager1" runat="server" ClientInstanceName="myFileManager">
   <Settings RootFolder="~\Content\Files" ThumbnailFolder="~\Thumb\" />
See Also