All docs
V20.2
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.Import(data) Method

Imports the diagram data.

Declaration

Import(
    data: string
): void

Parameters

Name Type Description
data 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.

Use the Import 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.

NOTE

The ASPxDiagram stores an opened diagram's data in its own text format. Do not modify the data the Export method returns because a modified document can be loaded incorrectly.

See Also