We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Please share .contextMenuSettings syntax require below format and add some setting related to removed "Upload" item from Selected files/ folder's ContextMenu

Thread ID:

Created:

Updated:

Platform:

Replies:

127958 Dec 21,2016 05:21 PM UTC Dec 22,2016 12:17 PM UTC ASP.NET MVC 1
loading
Tags: FileExplorer
Abhijeet
Asked On December 21, 2016 05:21 PM UTC


Hi Team,

Please see below format:-

<div class="col-md-10">
            @(Html.EJ().FileExplorer("fileExplorer1")
            .Path("~/content/images/FileExplorer/")
            .AjaxAction(@Url.Content("FileActionDefault"))
            .FileTypes("*.pdf")
            .ClientSideEvents(evt => evt.LayoutChange("onLayoutChange").Select("onSelect").Unselect("onUnselect").BeforeOpen("onBeforeOpen"))
            .AllowMultiSelection(false)
             .contextMenuSettings --- Please code add here
            .IsResponsive(true)
            .ShowToolbar(false)
            // under gridSettings you can customize the grid view functionalities
            .GridSettings(settings =>
                // disables the sorting functionality in grid view
                settings.AllowSorting(true)
                // it displays 3 columns only, like this you can display your desired columns at here
                .Column(column =>
                {
                    column.Add()
                        .Field("name")
                        .HeaderText("Name")
                        .Width("150");
                    column.Add()
                        .Field("dateModified")
                        .HeaderText("Date Modified")
                        .Width("150");
                    column.Add()
                        .Field("size")
                        .HeaderText("Size")
                        .Width("90")
                        .TextAlign(TextAlign.Right)
                        .HeaderTextAlign(TextAlign.Left);
                }
                )
            )
            )

        </div>


Thanks for helping

Karthik Ravichandran [Syncfusion]
Replied On December 22, 2016 12:17 PM UTC

Hi Abhijeet, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your query (“ContextMenuSettings Syntax and add the upload option in file selection”).  You can achieve your requirement using “ContextMenuSettings” property of FileExplorer. Please refer the below code block. 
 
   @{List<String> files = new List<string>() { "Open", "Download", "|" , "Upload" , "|", "Delete", "Rename", "|", "Cut", "Copy", "Paste", "|", 
          "OpenFolderLocation", "Getinfo" }; 
 
 
        @(Html.EJ().FileExplorer("fileExplorer1") 
            .Path("~/content/images/FileExplorer/") 
            .AjaxAction(@Url.Content("FileActionDefault")) 
            .FileTypes("*.pdf") 
            .ClientSideEvents(evt => evt.LayoutChange("onLayoutChange").Select("onSelect").Unselect("onUnselect").BeforeOpen("onBeforeOpen")) 
            .AllowMultiSelection(false) 
            .ContextMenuSettings( 
                settings1 => settings1.Items( 
                item => item.Files(files) 
                )) 
            .IsResponsive(true) 
            .ShowToolbar(false) 
                // under gridSettings you can customize the grid view functionalities 
            .GridSettings(settings => 
                // disables the sorting functionality in grid view 
                settings.AllowSorting(true) 
                    // it displays 3 columns only, like this you can display your desired columns at here 
                .Column(column => 
                { 
                    column.Add() 
                        .Field("name") 
                        .HeaderText("Name") 
                        .Width("150"); 
                    column.Add() 
                        .Field("dateModified") 
                        .HeaderText("Date Modified") 
                        .Width("150"); 
                    column.Add() 
                        .Field("size") 
                        .HeaderText("Size") 
                        .Width("90") 
                        .TextAlign(TextAlign.Right) 
                        .HeaderTextAlign(TextAlign.Left); 
                } 
                ) 
            ) 
        ) 
        } 
 
 
Based on your requirement we have prepared the sample to customize the “Contextmenu” in FileExplorer. You can get it from below link. 
 
To know more details about context menu customization, please refer the below link: 
 
 
Please let us know if you have any concerns. 
 
Regards, 
Karthik R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;