Grouping bar
24 May 20193 minutes to read
Initialization
Grouping bar allows you to dynamically alter the report by filter, sort, and remove operations in the pivot grid control. Based on the relational data source and report bound to the pivot grid control, the grouping bar will be automatically populated. You can enable this option in the pivot grid by setting the EnableGroupingBar
property to true.
Client mode
<ej:PivotGrid ID="PivotGrid1" EnableGroupingBar="true" runat="server" ClientIDMode="Static">
<DataSource>
<Rows>
<ej:Field FieldName="Country" FieldCaption="Country" SortOrder="Ascending"></ej:Field>
<ej:Field FieldName="State" FieldCaption="State" SortOrder="Descending"></ej:Field>
</Rows>
<Columns>
<ej:Field FieldName="Product" FieldCaption="Product"></ej:Field>
</Columns>
<Values>
<ej:Field FieldName="Amount" FieldCaption="Amount"></ej:Field>
<ej:Field FieldName="Quantity" FieldCaption="Quantity"></ej:Field>
</Values>
<Filters>
<ej:Field FieldName="Date" FieldCaption="Date">
<FilterItems FilterType="Exclude" />
</ej:Field>
</Filters>
</DataSource>
<ClientSideEvents Load="onLoad" />
</ej:PivotGrid>
Server mode
<ej:PivotGrid ID="PivotGrid1" runat=server url="/RelationalService" EnableGroupingBar="true">
</ej:PivotGrid>
Drag and drop
You can alter the report on fly through the drag and drop operation.
Context menu
You can also alter the report by using the context menu.
Searching values
The search option available in the grouping bar allows you to search a specific value that should be filtered from the list of values in the filter pop-up window.
Filtering values
The filtering option available in the grouping bar allows you to select a specific set of values that should be displayed in the pivot grid control. At least, one value should be present in checked state while filtering, otherwise, the OK button will be disabled.
Sorting values
The sorting option available in the grouping bar allows you to arrange headers in ascending or descending order. This option is applicable for fields available only in the row and column region. By default, headers are sorted in the ascending order. In the sorting indicator, up arrow denotes the ascending order and a down arrow denotes the descending order.
Removing field
The remove option available in the grouping bar allows you to completely remove a specific field from the pivot grid control. The remove operation can be achieved by clicking the remove icon available in each field or by dragging and dropping the field out of the grouping bar region.