ChartControl.ReplaceSelectedItems(Object[]) Method
Changes the selection, replacing the currently selected items with the specified selected items.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.UI.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
items | Object[] | The newly selected items. |
Remarks
The array should contain data items when the chart (series are generated automatically) or series is bound to data, or series points when data points are added manually.
Example
The following example shows how to select chart bars according to selected grid rows.
private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) {
var selectedObjects = gridView1.GetSelectedRows().Select(row => gridView1.GetRow(row)).ToArray();
chartControl1.ReplaceSelectedItems(selectedObjects);
}
See Also