DNN File "Explorer"

20 posts, 0 answers
  1. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 19 Oct 2005 Link to this post

    For the last couple weeks I've been working on creating an "Explorer" module for DotNetNuke. It's pretty much to the point I can give you guys a Live Demo to play around with.

    Currently it utilizes the r.a.d.Treeview, r.a.d.Grid and r.a.d.Callback controls. The features are pretty simple at the moment, but over the next couple weeks I'll be adding just about everything I can think should be in such a module.

    Anyways, I'm anxious to hear what you guys think about this. Also, it will be released completely free of charge for all current Telerik customers who already own the 3 controls it uses. I'm also going to extract the core of the module for a non-dnn version for everybody else to use.
  2. Mark Chipman
    Mark Chipman avatar
    219 posts
    Member since:
    Nov 2004

    Posted 19 Oct 2005 Link to this post

    Clicked the "delete" X and got this...

    A critical error has occurred.
    Cast from string "" to type 'Integer' is not valid.


    Also when I click on any of the files I get this message:

    The resource cannot be found.  ... a 404 error obviously...

    Lastly, its not clear what this is for:


    So I really can't give you any true feedback because its not clear to me the purpose of your module.

    -Mark
  3. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 19 Oct 2005 Link to this post

    Hi Mark, I'm sorry about all that... I'm still working on getting the installation script to contain all the necessary files to run correctly. Anyways, Downloading is fixed.

    Also, It seems like the delete function doesn't work correctly with the callback tree items. I'm trying to figure out what's causing this, but for now I've added a check for this error. Sorry for the troubles...
  4. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 19 Oct 2005 Link to this post

    The TextBox is to go directly to a path, however the only catch right now is it's case sensitive, this will be fixed in tomorrows build. Also, in the future it will be able to filter the grid for a certain file or extension.
  5. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 20 Oct 2005 Link to this post

    Hi Oliver,

    The Explorer module seems like a great project, good job! We will eagerly follow its progress.

    The idea to make the module available for non-DNN users is very good, as more users will be able to try it out.

    Regards,
    Lini
    the telerik team
  6. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 20 Oct 2005 Link to this post

    Thanks for the kind feedback, I really appreciate it.

    I've completed separating the controls and dotnetnuke, so it can be run completely outside of DNN now or still as a module. I've also fixed the issue with uploading and downloading. However, I'm still working on getting deleting to work again.
  7. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 24 Oct 2005 Link to this post

    Great, Oliver!

    Keep up the good work! We hope to see the final version soon.

    Sincerely yours,
    Lini
    the telerik team
  8. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 23 Nov 2005 Link to this post

    It sure does look like a great project! Very nice.

    I have a question regarding this, although it is not the same kind of project.
    I also use a r.a.d.treeview and a r.a.d.grid (used the telerik example as starting point) to show folders and files.

    The difference is that I store everything inside SQL Server 2005. So I have one table that contains the folder structure (DocumentGroups) and one table that contains the files (Documents).

    I really like this approach, because I can use the SQL 2005 caching functions and the r.a.d.callback controls to make this a very fast solution...

    Now my question: when a user loads the page with this solution then he/she will see the r.a.d.treeview on the left with the 'directory' structure. Works very nice. But: I want to be able to put a value behind every node that shows how much files are saved for that particular node.

    So then you will see something like this:

        Root Folder (0)
            Documents (4)
                Folder A (2)
                Folder B (2)

    Maybe this is not a question for this forum, but I can't figure out how to do this inside a stored procedure. It has to do something with a recursive lookup, but I find it very difficult to create the right stored procedure. I want to select all the DocumentGroups at once, so that I only have to make one request to the database.

    So, I hope you guys could think with me and maybe we can find a solutions. That would be very nice!

    Thanks anyway,
    Daniel
  9. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 25 Nov 2005 Link to this post

    Hello Daniel,

    You can traverse all tree-nodes in Page_Load by using the GetAllNodes() method of r.a.d.treeview and add the number of child nodes to the parent node's Text using code similar to:

    ...
    protected override Page_Load(object sender, EventArgs e)
    {
         if (!Page.IsPostBack)
         {
             ArrayList allNodes = RadTree1.GetAllNodes();   

             foreach (RadTreeNode node in allNodes)
             {
                 if (node.Nodes.Count > 0)
                     node.Text = node.Text + " (" + node.Nodes.Count.ToString() + ")";
             }
         }
    }
    ...


    Hope this helps.

    Best wishes,
    Nick
    the telerik team
  10. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 25 Nov 2005 Link to this post

    Thanks for the reply.
    Unfortunately this is not exactly what I'm looking for.

    I don't want to count the nodes in the treeview but records that are linked to a node.

    For example: take a look at a windows explorer window. You can see the folder structure and on the right the files that are in a particular folder.
    I have the same kind of view but then I store both my 'DocumentGroups' (the folders) and my 'Documents' (the files) into a SQL database.

    So I want to see on each node how many items are "under" it.
    I find it hard to explain, but maybe I can give a link to an example on the internet: http://communityserver.org/files/40/themes_and_skins/category1025.aspx

    Maybe then you can understand what result I want...

    The difference is that I have 2 tables.

        1) DocumentGroups
        2) Documents

    They are related to eachother. So 1 documentgroup can have 1 one more documents.

    Hope this explains my problem a bit more?
  11. Rumen
    Admin
    Rumen avatar
    1536 posts

    Posted 28 Nov 2005 Link to this post

    Hello Daniel,

    Counting child nodes in a recursive SQL relation can be a bit tricky indeed. We have something similar to that in our load on demand SQL online example - here is our sample SQL:

    tring sql = @"SELECT
                                Nodes.Id AS NodeId, Nodes.Text AS NodeText, COUNT(Children.Id) AS HasChildren
                            FROM
                                Nodes
                            LEFT JOIN
                                Nodes Children
                            ON
                                Nodes.Id = Children.ParentId
                            WHERE
                                Nodes.ParentId = {0}
                            GROUP BY
                                Nodes.Id, Nodes.Text";


    This query gets the count of child nodes for a particular node. Still I believe the easiest way to implement this is to first bind the tree and then using recusrsion to count down the node subtree and update the text of the node there using the server-side API of the treeview rather than SQL.

    Have a nice day,
    Elton
    the telerik team
  12. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 19 Dec 2005 Link to this post

    I just updated the sample on my website, you can see it here.

    I've pretty much got everything functioning for an initial release (hopefully after I wake up tomorrow). Currently everything compiled against ASP.net 1.1, I'm working on getting a NET2 sample going, but I think for this initial release it will be ASP.net 1.1 only.

    Items which I'm currently working on. Deleting a folder, and Emailing file attachments. These toolbar items are currently not fully functional.

    If you have any ideas for a feature I can add into this sample application, I'd love to hear your suggestion!
  13. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 29 Jan 2006 Link to this post

    Sorry for the extreme delay, I just got my Explorer control rebuilt against the latest releases from Telerik. You can see it in action here!

    I'm trying to finish up the last few items and get a beta out tonight. If anyone is around today, and would like to test the package before I post it. Let me know.
  14. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 30 Jan 2006 Link to this post

    Nice work, Oliver!!! We will gladly post the example on our site, once you have the final version released.

    A couple of things we found:
    You had one of our paid versions uploaded in My Pictures -> My Pictures -> Level 3 -> Level 4. We tried to delete the file, but got JS errors. "Move to Trash" did not work either (the page did not refresh at all). For this reason we deleted the folder, which worked great.

    Note, that we were able to upload our files and create new folders without any problems whatsoever. File deletion worked occasionally - we will have to look in our browser settings to see whether the problem is related to some browser settings. The JS error which we got is attached.

    Other than that - the application looks very cool - thank you for your efforts! We will review the code and let you know what we think. What do you think of the idea to add skin support and maybe even drag and drop between treeview and grid?


    Best wishes,
    Robert
    the telerik team
  15. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 30 Jan 2006 Link to this post

    The version on my website is a few builds behind right now. I sent you guys the latest version in a support ticket late lastnight. I'll upload my latest version shortly which hopefully has things issues fixed.

    EDIT: I'm glad the delete folder worked out. I'm noticing the issues with the delete files now. The grid isn't getting an updated viewstate (I think), this was working fine before the latest round of hotfixes. I'm going to triple check my ControlsToUpdate function, I might be excluding it at some point where it really needs to get updated. The delete file function only works when you're in either the root folder, or a direct child. Any LOD folders won't delete the files.

    Adding Skin and Drag and Drop are definitely on my list. However for the first public release I wanted to keep it pretty simple, then I'm planning on adding things like this into the module after I get some feedback.
  16. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 31 Jan 2006 Link to this post

    It is wonderful that you are working on improving the application, Oliver!

    I will check the status of the application you sent us and will come back to you. I will also see whether we will be able to help you with the skinning and the drag&drop. Stay tuned.

    In the meantime, you can update your site to the latest version so that the community looks into it.

    Again, thank you for your work.


    Yours,
    Robert
    the telerik team
  17. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 11 Apr 2006 Link to this post

    Hello,
    Sorry for the few months without any word on my module. I've finally finished (hopefully) everything for a stable release. I've also written a brief overview of the control (which I'm working on expanding as we speak)

    The main reason for the delay, was the latest Q release from Telerik. They fixed tons of bugs which were delaying this control. After getting everything upgraded (mainly the callback 2.0) seemed to fix 99% of my issues.

    You can view the full running sample on my Explorer Website. I've got a couple smaller things to finish up (mainly docs), but hopefully this sucker will get released before the end of the week!

    Let me know what you guys think
  18. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 13 Apr 2006 Link to this post

    Nice work, Oliver, all looks good :-) And the "Processing..." element at the top right is a nice touch.

    Just one question - are you able to display the deleted files in the Trash folder? This seems to be a nice feature to have.

    Thanks for all your work and help!


    Regards,

    Robert
    the telerik team
  19. Oliver Hine
    Oliver Hine avatar
    85 posts
    Member since:
    Oct 2002

    Posted 17 Apr 2006 Link to this post

    Hi Robert,
    Thanks for the comments. The trash folder can be a problem. If the control is being used to access a roaming profile (users documents folder), and if the Trash mode is enabled. Deleted items won't appear in the Trash can on the users desktop because of how windows handles deleting files.

    If you Enable the UseTrash property, it will work exactly like you've mentioned, but my online demo does have that property disabled. I'll enable it later today on the demo after I get the new skins the Telerik team emailed me earlier today!

    Looks like after this, we'll be releasing everything.
  20. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 17 Apr 2006 Link to this post

    Yep, we are almost there :)

    Thank you for your help and work, Oliver! I am sure that someone from our team will keep in touch with you.

    We will try to make the Trash feature work, as it seems to be a nice addition to the project.

    Do not hesitate to contact me back if you have other questions.


    Have a nice week,
    Rob
    the telerik team
Back to Top