Hello,
I am trying to show/hide sub totals for certain PivotViewValues.
<SfPivotView TValue="WingTemp" Height="9000">
<PivotViewDataSourceSettings DataSource="@_dataSource" ExpandAll="true">
<PivotViewRows>
<PivotViewRow Name="TargetTime"></PivotViewRow>
<PivotViewRow Name="TargetDelta"></PivotViewRow>
<PivotViewRow Name="OptionType"></PivotViewRow>
</PivotViewRows>
<PivotViewValues>
<PivotViewValue Name="Bid" Caption="Bid" ShowSubTotals="false"></PivotViewValue>
</PivotViewValues>
</PivotViewDataSourceSettings>
<PivotViewEvents TValue="WingTemp" EnginePopulated="OnEnginePopulated"></PivotViewEvents>
</SfPivotView>
Setting the "ShowSubTotals="false"" in the pivot view value item for "Bid" does not result in any change and still shows subtotals for that item group. I can modify the FormattedText for this cell in the OnEnginePopulated event but that is very cumbersome.
Thank y
Hi Leland,
Please find the response below.
|
Setting the "ShowSubTotals="false"" in the pivot view value item for "Bid" does not result in any change and still shows subtotals for that item group. |
We would like to inform you that using the ShowSubTotals property, you can only show or hide sub-totals in rows and columns, not for the values, since sub-totals are always displayed based on row and column headers. Moreover, to hide sub-totals for a specific field in row or column axis, set the property ShowSubTotals property to false in the PivotViewRow and PivotViewColumn tags respectively. Please refer to the screenshot and code example below.
Code-example:
Screenshot:
Meanwhile, we have prepared a sample for your reference.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PivotTable-1530681568
Please refer the below UG document to know more about ShowSubTotals property.
|
|
|
I can modify the FormattedText for this cell in the OnEnginePopulated event but that is very cumbersome. |
Please refer the below forum to know about customizing the pivot cells by using EnginePopulated event. In addition, you can also use the CellTemplate option to achieve the same.
https://forumassist.syncfusion.com/176821
Please let us know if the above details are difference from your query, please let us know the more details with screen shot/video (if possible), so that we can work towards fulfilling your requirement. |
Please let us know if you have any concerns.
Regards,
Angelin Faith Sheeba.