This is a migrated thread and some comments may be shown as answers.

Cancel TreeView/Grid refresh

4 Answers 94 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jed
Top achievements
Rank 1
Jed asked on 14 Sep 2012, 09:42 PM
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

4 Answers, 1 is accepted

Sort by
0
Jed
Top achievements
Rank 1
answered on 18 Sep 2012, 01:54 PM
Anyone have any ideas?

Thanks,

Jed
0
Vessy
Telerik team
answered on 18 Sep 2012, 02:15 PM
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.
0
Jed
Top achievements
Rank 1
answered on 18 Sep 2012, 04:05 PM

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

0
Vessy
Telerik team
answered on 21 Sep 2012, 10:39 AM
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.
Tags
FileExplorer
Asked by
Jed
Top achievements
Rank 1
Answers by
Jed
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or