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.

Standard Controls inside of nodes on a Diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

96002 Aug 15,2010 01:05 AM Aug 21,2010 02:44 AM ASP.NET Web Forms (Classic) 3
loading
Tags: DiagramWebControl
Andre van Staden
Asked On August 15, 2010 01:05 AM

Hi,

We would like to make the diagram objects more interactive, thus enabling the user to click on say a button hosted in a node.

Is this possible and if so, from what class do we have to derive the node object to allow interaction with the contents hosted in a node object.

Currently every thing we try with the node system just gives us the standard controls where we have but a label to change.

Thanks
Andre

Pandi Murugan A [Syncfusion]
Replied On August 18, 2010 09:49 AM

Hi Andre,

Thank you for your interest in Syncfusion Product.

We suggest you to use ControlNode class to add controls in your diagram to make your diagram more interactive.You have to set the ControlNode's ActiveStyle property as one of Click,DoubleClik,None,ClickPassThrough and SelectedClick ActiveStyle's values.Please refer the following code snippet that demonstrate how to add ControlNodes to diagram.

C#

private void Form1_Load(object sender, EventArgs e)
{
this.InsertButton();
this.InsertListBox();
this.InsertCheckBox();
}
private void InsertListBox()
{
lst = new ListBox();
lst.Items.Add("Sunday");
lst.Items.Add("Monday");
lst.SelectedIndex = 0;
lst.SelectedIndexChanged += new EventHandler
(lst_SelectedIndexChanged);
ControlNode ctrlnode = new ControlNode(lst, new RectangleF
(50, 110, 100,30));
ctrlnode.ActivateStyle = ActivateStyle.Click;
this.diagram1.Model.AppendChild(ctrlnode);
}
void lst_SelectedIndexChanged(object sender, EventArgs e)
{
label2.Text = lst.SelectedItem.ToString();
}


We have created a sample for your reference.Please refer the following sample.

Forum-1808050942.zip

Please let me know if you have any concerns.

Regards,
Pandi Murugan A

Andre van Staden
Replied On August 18, 2010 11:30 PM

Thanks a million,

Your support is simply outstanding.

Regards
Andre

Pandi Murugan A [Syncfusion]
Replied On August 21, 2010 02:44 AM

Hi Andre,

Thanks a million for your feedback.

Please let me know if you have any other concerns.

Regards,
Pandi Murugan 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.

;