FlexPivotSlicer supports binding with a data source to display sorted, selected and filtered data. A data source can be assigned to the FlexPivotSlicer through the designer as well as code.
This section highlights how to bind the FlexPivotSlicer control to a data source at design time.
Follow these steps to bind a FlexPivotSlicer to a data source:
For binding FlexPivotSlicer control with a data source programmatically, you need to create an instance of the C1FlexPivotSlicer class, and then set the Field property of the FlexPivotSlicer control. Note that the Field must be added to one of the following collections: RowFields, ColumnFields, ValueFields, or FilterFields.
The following code shows how you can add and configure the FlexPivotSlicer control to filter the FlexPivotGrid or FlexPivotChart data by the field ‘Country’.
You can also add multiple FlexPivotSlicer controls and bind them to the desired fields to filter the FlexPivotGrid or FlexPivotChart data by multiple fields simultaneously.
The following GIF depicts a scenario where multiple FlexPivotSlicer controls can be configured to display the sales of food products in different countries for the last quarter (October, November, and December) within the pivot grid/pivot chart.