Grid & Tree ContextMenu Widths

2 posts, 0 answers
  1. Jack
    Jack avatar
    128 posts
    Member since:
    May 2003

    Posted 03 Dec 2016 Link to this post

    Hi,

    I've read a few posts about this but nothing works for me yet,

    I need to make these wider.
    Lightweight | Bootstrap Skin, Latest Build | VB

    Please see the attached image. (or this one...)
    https://www.quozr.com/folders/devxel/rfes.jpg

    Thanks,

    Jack
  2. Vessy
    Admin
    Vessy avatar
    1475 posts

    Posted 05 Dec 2016 Link to this post

    Hi Jack,

    Currently the width of the FileExplorer's context menus can be changed only on the client-side after the menus are shown. For example, you can do it the the context menus' onClientShown event handlers:
    <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" RenderMode="Lightweight" Skin="Bootstrap" OnClientLoad="explorerLoad">
        <Configuration ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" />
    </telerik:RadFileExplorer>
    <script>
        function explorerLoad(fileEplorer, args) {
            fileEplorer.get_gridContextMenu().add_shown(menuShown);
            fileEplorer.get_tree().add_contextMenuShown(menuShown);
        }
        function menuShown(contextMenu, args) {
            $telerik.$("#" + "<%= RadFileExplorer1.ClientID%>" + "_gridMenu_detached").css("width", "300px");
            $telerik.$("#" + "<%= RadFileExplorer1.ClientID%>" + "_gridMenu_detached ul").css("width", "300px");
     
            $telerik.$("#" + "<%= RadFileExplorer1.ClientID%>" + "_tree_RadTreeViewContextMenu1_detached").css("width", "300px");
            $telerik.$("#" + "<%= RadFileExplorer1.ClientID%>" + "_tree_RadTreeViewContextMenu1_detached ul").css("width", "300px");
        }
         
    </script>

    More detaile information regarding the client-side API of RadFileExplorer and the handled client events can be found here:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/fileexplorer/client-side-programming/overview

    http://docs.telerik.com/devtools/aspnet-ajax/controls/menu/client-side-programming/events/onclientshown

    http://docs.telerik.com/devtools/aspnet-ajax/controls/treeview/client-side-programming/events/onclientcontextmenushown

    Regards,
    Vessy
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
Back to Top