Hi Simone,
You can hide subtotal and grand total for relational server mode with respect to the below code snippet.
To hide subtotal:
In the controller file, you can hide subtotals by providing API (ShowSubTotal = false) for the fields which you want to hide the totals.
Code Snippet: [C#]
|
private void BindData()
{
this.pivotClient.PivotReport.PivotRows.Add(new PivotItem { FieldMappingName = "Country", FieldHeader = "Country", TotalHeader = "Total", ShowSubTotal = false });
this.pivotClient.PivotReport.PivotRows.Add(new PivotItem { FieldMappingName = "State", FieldHeader = "State", TotalHeader = "Total", ShowSubTotal = false });
this.pivotClient.PivotReport.PivotRows.Add(new PivotItem { FieldMappingName = "Date", FieldHeader = "Date", TotalHeader = "Total", ShowSubTotal = false });
this.pivotClient.PivotReport.PivotColumns.Add(new PivotItem { FieldMappingName = "Product", FieldHeader = "Product", TotalHeader = "Total", ShowSubTotal = false });
//…
} |
To hide GrandTotal:
You can hide the Grand Total by providing API (enableGrandTotal = false) in the renderSuccess event.
Code Snippet: [cshtml]
|
@Html.EJ().Pivot().PivotClient("PivotClient1").Url(Url.Content("~/api/RelationalClient")). ClientSideEvents(oEve => { oEve.RenderSuccess("renderSuccess") }) |
Code Snippet: [JavaScript]
|
function renderSuccess(args) {
args._pivotGrid.model.enableGrandTotal = false;
} |
Meanwhile, we have prepared a sample for your reference, please find the sample in the below link.
Please find the below documentation link to know more about Grand Total hiding.
Regards,
Scintilla A