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

How to add bitmapnode to diagram

Hi ,

the following code provide in help documents

BitmapNode bn = new BitmapNode(@"C:\Documents and Settings\shirleyl.SYNCCHN\Desktop\imgs\icecream.png");
bn.Image.RotateFlip(RotateFlipType.Rotate90FlipY);
DiagramWebControl1.Model.AppendChild(bn);


but i not getting bitmapnode in the diagram.
My target is to get the data from the database and generate the diagram with different bitmap/images(like computer image,transistor image,modium image as likes)


please help me

Thanks

sattar shaikh

3 Replies

NR Nandakumar R Syncfusion Team October 24, 2007 11:46 PM UTC

Hi Sattar,

Thank you for your interest in Syncfusion Essential Studio.

Inorder to load a bitmap node, you need to set the PinPoint and the Size of the node you are going to add. The PinPoint should be inside the bounds of the Diagram Model and the image should not go out of the Diagram Model.

[C#]
protected void Page_Load(object sender, EventArgs e)
{
string path = @"C:\test\F69328\sunset.jpg";

BitmapNode node = new BitmapNode(path);
node.PinPoint = new System.Drawing.PointF(80, 80);
node.Size = new System.Drawing.SizeF(100, 100);
this.DiagramWebControl1.Model.AppendChild(node);
}

Please try this and let me know if this helps.

http://websamples.syncfusion.com/samples/Diagram.Web/5.2.0.25/F69328/main.htm

Regards,
Nanda


UM Umair May 29, 2014 09:53 AM UTC

I want to add images of employees and companies logo from database using bitmap node but the problem is bitmap node is taking only string type in parameter but the images have been saved in biray form. Advise me


UM Umair May 29, 2014 09:54 AM UTC

I want to add images of employees and companies logo from database using bitmap node but the problem is bitmap node is taking only string type in parameter but the images have been saved in binary form. Advise me

Loader.
Live Chat Icon For mobile
Up arrow icon