This is a migrated thread and some comments may be shown as answers.

Drag and Drop in Rad Diagram

1 Answer 139 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Swati
Top achievements
Rank 1
Swati asked on 07 Aug 2012, 10:52 AM
Hi,

Can we create our own controls like Rectangle, Ellipse and add them to the Rad Diagram for performing all the functionality which are supported by Rad Diagram?

Please send us example. I need to add Rectangle to the Rad Diagram and need to change its color, size... How to do that???

To dynamically get control I used below code:
RadDiagramShape shape=new RadDiagramShape();
            shape.Geometry= ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape);
            raddiag.AddShape(shape);

foreach
 (RadDiagramShape sample in raddiag.Items)
                {
                sample.Background  = newBrush;
                }


And used the foreach loop to get the control and apply color... but  we are not able to get any item in raddiag.Items it is showing null.. what we are missing here???? please let us know...

Keenly waiting for reply...

Regards,
Swati 

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 07 Aug 2012, 02:37 PM
Hello Swati,

I posted a reply to your previous thread here. However, if your scenario is related to a drag/drop operation and the suggested approaches don't work for you, we'd appreciate it if you modify the solution I created to better illustrate your case.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Diagram
Asked by
Swati
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or