DiagramExtension.Import(String) Method
Imports the diagram data.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Parameters
Name | Type | Description |
---|---|---|
data | String | The diagram data in JSON format. |
Returns
Type | Description |
---|---|
DiagramExtension | The Diagram extension. |
Remarks
The Export(String) 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 Diagram extension.
@Html.DevExpress().Diagram(settings => {
settings.Name = "Diagram";
}).Import(Model).GetHtml()
public partial class FunctionalityController {
public ActionResult SimpleView() {
var content = System.IO.File.ReadAllText(MapPath("~/App_Data/diagram-flow.json"));
return DemoView("SimpleView", "SimpleView", content);
}
}
Use the ASPxClientDiagram.Export and ASPxClientDiagram.Import methods to save and load the diagram data on the client side.
Note
The Diagram 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