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.

Context Menu issue after loading from database

Thread ID:

Created:

Updated:

Platform:

Replies:

132543 Sep 7,2017 10:49 AM Sep 11,2017 12:16 AM ASP.NET MVC 3
loading
Tags: Diagram
Aravind Ashokkumar
Asked On September 7, 2017 10:49 AM

Hi ,

After setting the various context menu parameters on the server side, I am getting an error.

"Cannot read property 'test' of undefined"


Server side code for adding context menu items is :

                    DiagramProperties model = new DiagramProperties();
                    List<ContextMenuItem> LabelSubItems = new List<ContextMenuItem>();
                    LabelSubItems.Add(new ContextMenuItem() { Name = "alignLabel", Text = "Align Label" });
                    LabelSubItems.Add(new ContextMenuItem() { Name = "updateRowLabel", Text = "Row Label", });
                    model.ContextMenu = new DiagramContextMenu();
                    model.ContextMenu.Items.Add(new ContextMenuItem() { Name = "test", Text = "Label Test" });
                    model.ContextMenu.Items.Add(new ContextMenuItem() { Name = "label", Text = "Label Update", SubItems = LabelSubItems });

                    model.ContextMenuBeforeOpen = "contextMenuBeforeOpen";
                    model.ContextMenuClick = "contextMenuClick";

Could you please let me know what might be the issue?

Regards,
Aravind

Shyam G [Syncfusion]
Replied On September 8, 2017 12:46 PM

Hi Aravind, 
 
We have applied your code example in our sample and we are unable to reproduce the reported issue at our end. Could you please provide us more details such as modify the below sample or share your sample or video to demonstrate the exact use case of the issue. 
 
 
Regards, 
Shyam G 


Aravind Ashokkumar
Replied On September 9, 2017 01:07 PM

Hi Shyam,


I had corrected the issue after adding the following line to the c#html page. 

@Html.EJ().ScriptManager() 


Regards,

Aravind



Shyam G [Syncfusion]
Replied On September 11, 2017 12:16 AM

Hi Aravind, 
We are happy to hear that your problem is resolved. Please let us know if you need further assistance on this. 
Regards, 
Shyam G 


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.

;