Is there a way to set selected files onclientload?

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    2 posts
    Member since:
    Sep 2013

    Posted 19 Sep 2013 Link to this post


    I'm using RadFileExplorer to select multiple images, is there a way to preselect files either clientside or serverside?


    Btw. thanks for these excellent tools :)
  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 20 Sep 2013 Link to this post

    Hi Thomas,

    I already answered you support ticket on the subject. For convenience I will post my answer here as well.

    If you want to preselect a single item in RadFileExplorer, you can user its server side property InitialPath to achieve this. Please see the following live demo for more information:

    If you want to select multiple items and do have FileList enabled (ExplorerMode is not set to FileTree) you can use the following JavaScript approach:
    $find("<%=RadFileExplorer1.ClientID %>").get_fileList().selectFileList(["Flower3.jpg","Flower5.jpg","Flower4.jpg"])

    The selectFileList method of the RadFileExplorer's FileList client-object accepts an array of string providing the names of the files to be selected. Please note that first you need to navigate to the folder containing these files, you can do that either using InitialPath property or calling loadFolder(path) client-side method of RadFileExplorer.

    More detailed information regarding RadFileExplorer's client-side and server-side members is available in our online documentation.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top