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

Are there plans to allow for custom toolbar buttons and/or context menus in FileExplorer?

3 Answers 95 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jenna Schmidt
Top achievements
Rank 1
Jenna Schmidt asked on 31 Mar 2009, 05:16 PM
Hi,
I was wondering if there is any plan to allow for custom toolbar buttons/commands in a future update.

I am also interested in knowing whether there are any plans to allow for custom context menu items?

I think that these would be great additions to the new control, and hope to see them added soon. Is there any solid plan or date when this might happen?

Thanks,
Jenna

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 01 Apr 2009, 12:31 PM
Hi Jenna,

Such functionality already exists in the RadFileExplorer control and you could use the following approaches in order to achieve the desired result :

  1. Editing the toolbar
    • In the codebehind you can get a reference to the ToolBar of the RadFileExplorer object by using its ToolBar property. This object is an RadToolBar object and you can customize it as showed in this page.
    • on the client side you can get reference to the toolbar by using the following approach :
      function findToolBar() 
          var oToolBar = $find("<%= FileExplorer1.ToolBar.ClientID %>"); 

      and then you could use its client side API.
  2. You can deal with the context menu as follows :
    • On the server side you could use the following approaches in order to get the reference to Context menu  :
      - FileExplorer1.GridContextMenu - Grid's context menu. Returns object of type RadContextmenu
      - FileExplorer1.TreeView.ContextMenus[0] - TreeView's context menu. Returns object of type RadTreeViewContextMenu
    • On the client side you could use the following approach in order to get the reference to the context menus :
      function findContextMenu() 
          // Get reference to the RdTreeView's context menu 
          var oTreeViewContexMenu = $find("<%= FileExplorer1.TreeView.ContextMenus[0].ClientID %>"); 
       
          // Get reference to the RadGrid's context menu 
          var oGridContexMenu = $find("<%= FileExplorer1.GridContextMenu.ClientID %>"); 


I hope this helps.

Regards,
Fiko
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Albert Shenker
Top achievements
Rank 1
Veteran
answered on 01 Jun 2009, 05:14 AM
I am trying to disable the "Delete" context menu item in the File Explorer tree. I am using the following code. If I check the menuItem.get_isEnabled() property, it is set to false, yet I can still click on the context menu item. This code is run in the FileExplorer OnClientLoad Event:

var menu = $find("<%= feItems.TreeView.ContextMenus(0).ClientID %>");  
menu.findItemByText("Delete").disable();  
//menu.get_items().getItem(0).disable(); //this doesnot work either 

alert(menu.get_items().getItem(0).get_isEnabled()) // this returns False, as expected, but the menu item is still clickable.

0
Fiko
Telerik team
answered on 01 Jun 2009, 07:38 AM
Hi Albert,

I believe that this KB will be of help.

Kind regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
FileExplorer
Asked by
Jenna Schmidt
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Share this question
or