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

4 posts, 0 answers
  1. Jenna Schmidt
    Jenna Schmidt avatar
    2 posts
    Member since:
    May 2005

    Posted 31 Mar 2009 Link to this post

    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
  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 01 Apr 2009 Link to this post

    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.
  3. Albert Shenker
    Albert Shenker avatar
    588 posts
    Member since:
    Mar 2004

    Posted 01 Jun 2009 Link to this post

    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.

  4. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 01 Jun 2009 Link to this post

    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.
Back to Top