Prevent Redirect When Collapse

4 posts, 0 answers
  1. Laurence
    Laurence avatar
    5 posts
    Member since:
    Jul 2013

    Posted 11 Jul 2013 Link to this post

    Hi

    I have a radtreeview which is used for a directory structure/file list viewer, and there is a problem when folders are collapsed.

    When I have folder (node) A, with subfolder B (child node), if I expand folder A node in the tree and then click on folder B child node, the files are displayed in my content pane correctly. However, once subfolder B node is selected, if I then collapse folder A (parent folder), the tree node collapses correctly, however the content view (list of files) is also refreshed to those contained in the root node. I want to prevent this redirect, and have the content view unchanged (same behaviour as in windows file explorer). I've had a look around and it seems like the OnClientNodeCollapsing is where I need to make the fix, but here I'm only using the default behaviour. And I don't want to disable the collapse itself in the tree, only the redirect in the content.

    I'd appreciate any help, thanks
  2. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 16 Jul 2013 Link to this post

    Hi,

    I'm not quite sure what default behavior you are refering to. Could you provide a simple example of your code, so that we can have a better understanding of your scenario.
     

    Regards,
    Bozhidar
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Laurence
    Laurence avatar
    5 posts
    Member since:
    Jul 2013

    Posted 16 Jul 2013 Link to this post

    Hi Bozhidar,

    Yes, sorry I maybe didn't explain it very well.

    Let's say I have a treeview with the following structure:

    Root Node
    (-) Main Directory
    (-) sub Directory


    If I expand the main directory node and then select the sub directory node, my page then displays a list of files in the sub Directory, in my list view on the right hand side of the page. However, when I select collapse (-) on the Main Directory node, this list view is refreshed, and displays the files in the Root Node directory.

    It is my opinion that this refresh should not happen, and my list should still display the contents of the sub Directory. This is the case when you execute the same sequence of actions on a directory structure in windows explorer.

    Note, I don't want to disable the collapse action on the node, as the directory tree itself should update (i.e. when Main Directory is collapsed, sub Directory node will be hidden), it's just that the list of files shouldn't be updated.

    Hopefully that's clear, thanks
  5. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 19 Jul 2013 Link to this post

    Hello Laurence,

    What I meant was for you to send back your code, so that we can see just how exactly you refresh the ListView. By default the RadTreeView doesn't have such extended functionality, it just exposes events. And since the behavior is probably triggered by some custom logic in one of these events, we can't be certain what the issue is without the code itself.
     

    Regards,
    Bozhidar
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top