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.
Unfortunately, activation email could not send to your email. Please try again.

Only custom items in ContextMenu

Thread ID:

Created:

Updated:

Platform:

Replies:

121467 Dec 17,2015 06:31 AM Dec 18,2015 05:38 AM ASP.NET Web Forms 1
loading
Tags: Grid
Jorge Pampin
Asked On December 17, 2015 06:31 AM

Hello,

I have this code:

Grid.ContextMenuSettings = new Syncfusion.JavaScript.Models.ContextSettings();
Grid.ContextMenuSettings.EnableContextMenu = true;
Grid.ContextMenuSettings.ContextMenuItems = new List<string>();
Grid.ContextMenuSettings.CustomContextMenuItem.Add('Custom item');

But the ContextMenu shows the default items and custom items, and I want only the custom items, how to do this?

Thanks!

Saravanan Arunachalam [Syncfusion]
Replied On December 18, 2015 05:38 AM

Hi Jorge,

Thanks for contacting Syncfusion support.

If you need to show only the custom menu items, we suggest you to add empty string in the contextMenuItem List of Grid control. Please refer to the below code example and online documentation link.


        protected void Page_Load(object sender, EventArgs e)

        {

             . . .

            Grid.ContextMenuSettings.ContextMenuItems = new List<string>();

            //Add empty string in the ContextMenuItems List to show only custom items

            Grid.ContextMenuSettings.ContextMenuItems.Add("");

            . . .

           

         }



http://help.syncfusion.com/js/grid/contextmenu#custom-context-menu

Regards,

Saravanan A.


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.

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.

;