Skip to main content
All docs
V24.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.v24.1.UI.dll

NuGet Package: DevExpress.Win.Charts

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 snippet (auto-collected from DevExpress Examples) contains a reference 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