Skip to main content
All docs
V26.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.v26.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;
        }    
      }
    } 
    
    See Also