Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Client-Side Functionality

v
po
po
x
Text
v
v
po
Object
Line style
v
Line width
+
-
popo
Connector
Type
v
Start
v
End
v
Layered




Tree




Page
Size
v
Orientation
v
po
 

This demo illustrates how to access diagram items on the client.

Specify the ClientInstanceName property to define a unique client identifier for the ASP.NET Diagram control (ASPxDiagram). Use this identifier on the client side to access a control instance programmatically.

In this demo, the Init event’s handler searches for a shape ("Greta Sims"), selects it, and scrolls the diagram view area to display the shape. Use the following diagram API to replicate similar behavior:

  • The GetItems method returns a collection of diagram items.
  • The SetSelectedItems method selects the specified items.
  • The ScrollToItem method scrolls the view area to the specified item.

When a user selects or deselects diagram shapes, the SelectionChanged event is fired. Call the GetSelectedItems method in the event handler to obtain an array of selected items and display the text for selected shapes in the side panel.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxDiagramDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxDiagramDemos