Skip to main content
All docs
V24.1

ASPxClientDiagram.GetItems Method

Returns an array of diagram items.

Declaration

GetItems(): DiagramItem[]

Returns

Type Description
DiagramItem[]

An array of items (shapes and connectors).

Remarks

Call the GetItems method to get the full collection of diagram items.

The code sample below demonstrates how to select an item by text and scroll the view area to this item.

<dx:ASPxDiagram ID="Diagram" runat="server" ClientInstanceName="diagram" />
<!-- other code -->
</dx:ASPxDiagram>
var items = diagram.GetItems();
for (var item of items)
  if (item.text == 'Development'){
    diagram.SetSelectedItems([item]);
    diagram.ScrollToItem(item);
    break;
  }
See Also