Cancel TreeView/Grid refresh

5 posts, 0 answers
  1. Jed
    Jed avatar
    16 posts
    Member since:
    Apr 2009

    Posted 14 Sep 2012 Link to this post

    Hi,

      After any item command the treeview and the grid are refreshed. Is there a way to cancel this action? Even if I set e.Cancel = true the refresh still occurs. I would like to be able to do two things. I would like to be able to cancel the refresh of both the treeview and the grid when the e.Cancel is set to true and I would like to put in a check to see if the action was directed toward a directory or not so I can optionally refresh the treeview. I'm assuming I can do this check in the onItemCommand and manually refresh, I'm just not sure how to stop the default behaviour.

    Thanks!

    Jed
  2. Jed
    Jed avatar
    16 posts
    Member since:
    Apr 2009

    Posted 18 Sep 2012 Link to this post

    Anyone have any ideas?

    Thanks,

    Jed
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vessy
    Admin
    Vessy avatar
    1382 posts

    Posted 18 Sep 2012 Link to this post

    Hi Jed,

    The RadFileExplorer uses <asp:UpdatePanel>s in its implementation and the only way to cancel page rendering during ajax request is to do it on the client. More information on the subject is available in the following MSDN article: Canceling an Asynchronous Postback.

    You need to handle the corresponding client-side events in order to prevent the POSTBACK of RadFileExplorer. To be able to provide more-to-the-point answer we will need additional information. Could you, please, explain in more details what exactly do you want to achieve?

    Regards,
    Vesi
    the Telerik team
    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 their blog feed now.
  5. Jed
    Jed avatar
    16 posts
    Member since:
    Apr 2009

    Posted 18 Sep 2012 Link to this post

    Hi Vesi,

     

     Thanks for taking the time to look into my question. I would like to improve the response time with the file explorer. Let me explain a senerio and how I would like to change it. On the left side of the explorer is the tree view showing only directories, on the right side is the grid. I right click a file in the grid and choose rename. I rename the file and click "ok". After I click "ok" the tree view refreshes and then the grid refreshes. What I would like to do in a situation like this is to check to see if the item renamed is a directory. If the item is not a directory then cancel the treeview refresh and only refresh the grid. This would cut the refresh time in half and the user wouldn't be waiting as long. Let me know if you need more information.

    Thanks,

    Jed

  6. Vessy
    Admin
    Vessy avatar
    1382 posts

    Posted 21 Sep 2012 Link to this post

    Hi Jed,

    I am sorry that I have to disappoint you, but the desired scenario could not be achieved with RadFileExplore. Unfortunately, with the current implementation of the control it is not possible to cancel the refresh of the tree/grid upon rename depending on the item type. 

    If you use the mentioned args.set_cancel(true) variant, not only the refresh would be cancel, but also theb renaming itself (the file will remains with its previous name).

    Kind regards,
    Vesi
    the Telerik team
    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 their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017