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. Image for the cookie policy date
close icon

How to use AddInfo attribute on DiagramNode in ascx file

I have a palette of shapes that can be added to the diagram. I want to add type information that can be used in add events. I can set the addinfo property for nodes by iterating over the palette items in the code-behind. I would prefer to set the AddInfo attribute directly in the ascx file but cannot find the proper way of defining it. Can anyone give an example?

<ej:BasicShape Width="80" Height="80" BorderColor="black" BorderWidth="2" Shape="Rectangle" AddInfo="???"></ej:BasicShape>

1 Reply

SG Shyam G Syncfusion Team August 16, 2017 04:58 PM UTC

Hi Nathan, 
 
The addInfo is an object property and could not be added in the design page. So please use this property in the aspx.cs page. Please refer to the code example below. 
 
Code example: 
   BasicShape node = new BasicShape(); 
   node.Name = "node"; 
   //define addInfo property  
   Dictionary<string, object> addInfo = new Dictionary<string, object>(); 
   addInfo.Add("firstnode", "node"); 
   node.AddInfo = addInfo; 
 
Regards, 
Shyam G 


Loader.
Live Chat Icon For mobile
Up arrow icon