This demo illustrates how to access diagram items on the client.
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.
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).
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxDiagramDemos |