Edit this page

Client-side Programming Overview

The RadDiagram control is built on top of the Kendo UI DataViz Diagram. This means that you can interact with the diagram entirely on the client-side.

Getting the RadDiagram Client-side Object

RadDiagram creates a client-side object, which you can reference via the ClientID of the control and the $find function. Then, you can access the actual object that exposes the API of the Kendo UI diagram through the get_kendoWidget method of RadDiagram's client-side object.

When you have referenced the Kendo UI diagram, you can utilize the full capabilities of its API. For instance, you can create a new shape as shown in Example 1.

Example 1: Creating a diagram shape on the client-side

var diagram = $find("<%=RadDiagram1.ClientID %>").get_kendoWidget();
diagram.addShape();

You can also access the Kendo UI diagram as you would have accessed it if it was created with the Kendo UI API. To do so, you can utilize the ClientID from Example 1.

See Also