File Explorer as a Version Control issues.

3 posts, 0 answers
  1. Jay Leffue
    Jay Leffue avatar
    22 posts
    Member since:
    Nov 2009

    Posted 03 Nov 2010 Link to this post

    So my project now requires version control on documents, not just a file explorer.  I decided I could try to accommodate this by having both a file explorer and a grid, the grid being old versions of what the currently selected file in the explorer.

    We are using a database on our backend and it is implemented and functional with the file explorer.  To be able to do version control I was able to modify the server side code to allow for versioning.  I have two issues, both being with the file explorer that are stopping me from implementation of version control.

    1. I need to be able to communicate from the file explorer to the grid that houses historical files.  When a user clicks a file in the file explorer, I need ajax to load the historical files.  Again, I have the backend set up already to do this.  I do not see any onclick, or onClientClick methods available to use at the fileexplorer.  How can I access these events to trigger the ajax.

    2. The upload that comes with File Explorer is pretty out of the box and I see no way to access it.  Whenever I try to upload a file that already exists I receive:

    "A file with a name same as the target already exists!"

    How can I trump this message and allow inserting into the data.  This is not an overwrite.  Since I had to extend the FileBrowserContentProvider class for my DB implementation I assume that the uploader is calling one of the methods in my custom provider, which in turn is telling the front end that the record exists.  Basically, what server side method that I over wrote does the out of the box uploader call to determine a file already exists?  Whatever method that is I need to apply code to always return that the file does not exist.

    If we can resolve these two issues I will have a working File Explorer/ Grid user control that can do Version Control.

    Thank you in advance for any input or help.
  2. Fiko
    Fiko avatar
    1406 posts

    Posted 10 Nov 2010 Link to this post

    Hi Jay,

    In reference to your questions:
    • You need to use the OnClientItemSelected event of the RadFileExplorer control. This demo shows how to attach and use the events.
    • The GetFile method of the FileBrowserContentProvider is used in order to determine whether a file exists or not. If this method returns null (Nothing in VB.NET), this means that the file does not exists. It safe to override this method always to return null, because RadFileExplorer control calls this method only in order to check whether file exists or not . 

    All the best,
    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. DevCraft R3 2016 release webinar banner
  4. Jay Leffue
    Jay Leffue avatar
    22 posts
    Member since:
    Nov 2009

    Posted 15 Nov 2010 Link to this post

    Thank you.  Odd that GetFile is only for determining if it exists, but implemented and works.  I now have version control using your controls.  Take that sharepoint!
Back to Top