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.

ASPxDiagram.ClientInstanceName Property

Specifies the ASPxDiagram's programmatic identifier on the client.

Namespace: DevExpress.Web.ASPxDiagram

Assembly: DevExpress.Web.ASPxDiagram.v20.2.dll

Declaration

[DefaultValue("")]
public string ClientInstanceName { get; set; }
<DefaultValue("")>
Public Property ClientInstanceName As String

Property Value

Type Default Description
String

String.Empty

The control's client identifier.

Remarks

Use the ClientInstanceName property to specify a unique client-side identifier for the ASPxDiagram control. Use this identifier on the client side to access the ASPxClientDiagram object in code.

Example

<script>
    var diagramData;
    function SaveDiagramData(s, e) {
        diagramData = diagram.Export();
    };
    function LoadDiagramData(s, e) {
        diagram.Import(diagramData);
    };
</script>

<dx:ASPxDiagram ID="ASPxDiagram1" runat="server" ClientInstanceName="diagram" />

<dx:ASPxButton ID="btnSave" runat="server" Text="Save" AutoPostBack="False" ClientSideEvents-Click="SaveDiagramData" />
<dx:ASPxButton ID="btnLoad" runat="server" Text="Load" AutoPostBack="False" ClientSideEvents-Click="LoadDiagramData" />

If the ClientInstanceName property is not specified for a control, the control's client identifier is generated automatically and equals the value of the control's ID property. In this case, client-side access to the control is not allowed when the control is in a naming container, for instance, within an ASPxPageControl's page or an ASPxPopupControl's window.

See Also