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

Grid & Tree ContextMenu Widths

1 Answer 8 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 04 Dec 2016, 04:39 AM
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

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 05 Dec 2016, 08:07 AM
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.
Tags
FileExplorer
Asked by
Jon
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or