ASPxClientDiagram.Export Method
In This Article
Exports the diagram data in JSON format.
#Declaration
TypeScript
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