Help me how to go about doing this...

6 posts, 1 answers
  1. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 27 Apr 2011 Link to this post

    Hi team;

    Before I ask my question, let me explain what my original plan was before deciding to use "File Explorer" and why I had that original plan. Then I'll ask my question and how I can still get the benefit of my original plan and be able to use the FileExplorer.

    I started creating a Database table with hierarchical structure (Parent_ID, Child_ID) to create a complete directory structure in the database. Although these directories never would be created on the server side, but in the end user's mind they would think these are the actual directories on server (sort of virtual directories). Each record of the directory had a few properties (like if upload is allowed, If the directory is private or shared, Max number of files allowed and etc.). The reason I created this table is to have these properties that I could make decision at runtime if everyone can upload files or if the directory is private. Or who owns the directory and etc. But in reality there wasn't any directory.
    Then I had another database table for files. that were connected to directory table as a child table and file record had it's properties that gave me controls of the files. Although, all the files would be stored in one physical directory. Just the two database tables will create a virtual directory to users.
    But I had to write all the codes for uploading, adding new files, deleting, renaming, displaying images and etc.

    Then I saw the FileExplorer which blew me away, because I had to create an exact control that works with my Directory and files tables. The big difference is that, your File Explorer works directly with OS directory and file system. But using your control, I loose all those properties that I had described that I could use at runtime to make decisions on. Here, with your File Explorer, I loose the control that I need to have for my app.

    My question: Now that I have explained my problem, my question is, how can I use your control and still be able to have the features that I was planning to have in my original plan?
    I was thinking of using your File explorer and I would still create the Directory and file tables side by side. The File Explorer would serve the actual work and my tables would serve as decision making metadata.
    But, to do so, I need a series of "Post" action events to store the info in my tables, like the directory name (that was created or renamed or deleted), file name and etc. I only see Events that are "Before" the actions are taken place.

    So, what direction would you suggest?
    Or if I go with my idea, I'm missing those Post Events to sore the data.

    Looking forward to your help!
    Thanks!
    ..Ben
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 28 Apr 2011 Link to this post

    Hi Ben,

    RadFileExplorer can use different FileBrowserContentProviders which allow developers to implement their own logic, functionality, etc. You can find detailed information regarding custom content providers in the following help article:
    Using custom FileBrowserContentProvider

    Also, you can find various different content providers in the CodeLibrary and KnowledgeBase sections of our site. I believe this particular KB will be of great help solving this case.

    Regards,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 28 Apr 2011 Link to this post

    Dobromi, thank you for great links.

    BTW, do you have a sample of a database table that shows hierarchy? My main question is setting up the Primary key.

    Here is my situation. I have one table that represents folders (Directories). This table needs to be formed as Hierarchy.
    Then I have a child table, called files that connects to the folders table via foreign key.

    To get the right sequence, my Folder Primary key made up of (Parent_ID,Folder_ID), then when I try to connect my Files table to Folders via Foreign key, I have to have both Parent_ID and Folder_ID in my Files table.
    If I don't use both fields as Primary key in my Folder (just Folder_ID), then the sequence is not right.

    Any Samples on hierarchy table?
    Thanks!

  5. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 28 Apr 2011 Link to this post

    Follow up on my request for hierarchy sample table.
    I just looked in the App_Data Folder of LiveData, and I see a Nodes and ProductCatgory tables that are setup as hierarchy, but do not include the Parent_ID as part of the Primary keys. Interesting!
    Any thoughts from you?
  6. Answer
    Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 09 May 2011 Link to this post

    Hi Ben,

    The above mentioned tables are not used for the custom filebrowser content provider implemented to RadFileExplorer, the table that stores the information of the folders and the files is Items. However, the Parent_ID field in these tables is not set as primary key because the PK need to be unique.

    For your convenience I did a google search on how to construct hierarchy tables and found the following article / post on the subject that might be useful for your scenario:
    http://msdn.microsoft.com/en-us/library/aa188294%28v=office.10%29.aspx
    http://stackoverflow.com/questions/2120884/designing-a-sql-table-with-hierarchy-sub-categories

    Best wishes,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  7. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 13 May 2011 Link to this post

    Dobromi;

    Thanks!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017