Skip to main content
A newer version of this page is available. .
All docs
V21.1

SankeyDiagramControl.SelectedItemsChanging Event

Occurs after a user changes the Sankey selection state and before the SelectedItems collection is changed.

Namespace: DevExpress.XtraCharts.Sankey

Assembly: DevExpress.XtraCharts.v21.1.UI.dll

NuGet Packages: DevExpress.Win.Charts, DevExpress.Win.Design

Declaration

public event SankeySelectedItemsChangingEventHandler SelectedItemsChanging

Event Data

The SelectedItemsChanging event's data class is SankeySelectedItemsChangingEventArgs. The following properties provide information specific to this event:

Property Description
Action Returns an action that is applied to the SelectedItems collection.
Cancel Indicates whether the SelectedItemsChanging event should be canceled.
NewLinks Returns newly selected Sankey links.
NewNodes Returns newly selected Sankey nodes.
OldLinks Returns previously selected Sankey links.
OldNodes Returns previously selected Sankey nodes.

Remarks

Use the e.Cancel property to conditionally cancel the Sankey element selection. The e.NewNodes and e.NewLinks properties contain newly selected nodes and links respectively.

The following example prevents the France node selection:

private void sankeyDiagramControl1_SelectedItemsChanging(object sender, SankeySelectedItemsChangingEventArgs e) {
  foreach (SankeyNode node in e.NewNodes) {
    if (node.Tag == "France") {
        e.Cancel = true;
    }    
  }
} 

The following code snippets (auto-collected from DevExpress Examples) contain references to the SelectedItemsChanging event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also