RadFileExplorer file upload comformation

Thread is closed for posting
3 posts, 0 answers
  1. Tarun Juneja
    Tarun Juneja avatar
    3 posts
    Member since:
    Sep 2009

    Posted 30 Jun 2010 Link to this post

    Hi Guys,

    I am using RadFileExplorer and want to display a confirmation message for all the duplicate files which already exists on the server.

    How i can achieve this.

    I am using custom DB file storage.

    Below is my control declaration.........

     

    <

     

    telerik:RadFileExplorer ID="RadFileExplorer" Skin="Windows7" Configuration-MaxUploadFileSize="10485760" DisplayUpFolderItem="false" runat="server" OnClientFileOpen="OnClientFileOpen" OnClientItemSelected="OnClientItemSelected" OnItemCommand="RadFileExplorer_ItemCommand">

     

     

     <Configuration ViewPaths="~/Dummy" UploadPaths="~/Dummy" DeletePaths="~/Dummy" />

     

     

    </telerik:RadFileExplorer>

    or if someone can tell me any way by which i can display a confirmation message saying "some of your file were not uploaded".

    Thank you

    Tarun Juneja

     

     

     

     

     

     

  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 05 Jul 2010 Link to this post

    Hi Tarun,

    In your case you can use one of these approaches:
    • The RadFileExplorer control has this feature built in. You just need to override the GetFile method inside the custom FileBrowserContentProvider control. This method is used internally by the RadFileExplorer control i norder to check whether a file already exists (on the Database server in your case). If the file exists, then a JavaScript message is shown to the client. You can change the text of the message by overriding the FileExists key's value in the RadEditor.Dialogs.resx file.
    • You can use the RadFileExplorer's OnItemCommand and manually check whether the file exists. Then you can directly show message to the client using ScriptManager.RegisterStartupScript method.
    • You can register JavaScript alert directly inside the FileBrowserContentProvider.StoreFile method. In this case you need to get reference to the page that hosts the RadFileExplorer control and pass this Page object to the ScriptManager.RegisterStartupScript method:
      Page _page = Context.CurrentHandler as Page;// get reference to the page
      string script = string.Format("alert('{0}');", "message text");// The JavaScript code
      ScriptManager.RegisterStartupScript(_page, _page.GetType(), "KEY", script, true);// Register the code
    I hope this helps.

    Kind regards,
    Fiko
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tarun Juneja
    Tarun Juneja avatar
    3 posts
    Member since:
    Sep 2009

    Posted 10 Aug 2010 Link to this post

    Yes, This solves my issue.

    Thank you
Back to Top