All docs
V20.2
21.1 (EAP/Beta)
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ASPxClientDiagram.Export Method

Exports the diagram data in JSON format.

Declaration

Export(): string

Returns

Type Description
string

The diagram data in JSON format.

Remarks

The Export method allows you to save information about the diagram's layout, appearance, and shape positions.

The control saves the diagram's data in its own text format. The resulting JSON object contains measurements in twips, regardless of the Units or ViewUnits property values. Do not modify this JSON object because modified data can load incorrectly.

Use the Import(data) method to load this data to the ASPxDiagram control.

<dx:ASPxDiagram ID="ASPxDiagram1" runat="server" ClientInstanceName="diagram" >
</dx:ASPxDiagram>
<dx:ASPxButton ID="btnSave" runat="server" Text="Save" AutoPostBack="False" >
    <ClientSideEvents Click="function(s, e) {diagramData = diagram.Export();}" />
</dx:ASPxButton>
<dx:ASPxButton ID="btnLoad" runat="server" Text="Load" AutoPostBack="False" >
    <ClientSideEvents Click="function(s, e) {diagram.Import(diagramData);}" />
</dx:ASPxButton>

Use the ASPxDiagram.Export and ASPxDiagram.Import methods to save and load the diagram data on the server side.

See Also