FileExplorer call CustomFileContentProvider method

4 posts, 0 answers
  1. Jon
    Jon avatar
    26 posts
    Member since:
    Apr 2009

    Posted 01 Jul 2009 Link to this post


    Is it possible, from the client side, to call a method of the RadFileExplorer's customfilecontentprovider?

    I want to check for existence of a file, to warn the user before he overwrites an existing file.

    Suggestions?

  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 02 Jul 2009 Link to this post

    Hello Jon,

    You need to use the OnItemCommand event (this event is fired when a file is uploading)  of the RadFileExplorer control to check if the uploaded file already exists. This is the easiest way to achieve the desired result in your scenario.
    For your convenience I have attached a simple demo to the thread.
    I hope this helps.

    Sincerely yours,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Jon
    Jon avatar
    26 posts
    Member since:
    Apr 2009

    Posted 02 Jul 2009 Link to this post

    Fiko,

    Thanks, but I am not using the Upload.. Instead, I have a RadWindow with a FileExplorer plus a Save button, and I want to do this check from the Save button, preferably right from the script that I am already calling when the Save button is pressed.

    From script, I know how to get access to the RadFileExplorer object, so I wonder: Is there a method that I can call, to check file exists, or is there a way to access the content provider used by the FileExplorer so that I can call a method in that content provider?

    Thanks,
    -Jon
  4. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 03 Jul 2009 Link to this post

    Hi Jon,

    I am not quite sure that I understand your scenario. I need to examine your project first and once i have a better view over your case, I will do my best to provide a working solution. You could attach files to support thread and you need to open a new one in order to send your files.

    In reference to your question :
    There is no property or method that returns a reference to the provider used in the RadFileExplorer control, but in your scenario I suppose that the desired result can be easily achieve by using the existing features of the control. For this to be done however, I need to examine your setup.



    Kind regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top