Skip to main content

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