This is a migrated thread and some comments may be shown as answers.

RowGrandTotalHeaderCellTemplate

2 Answers 37 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Jose
Top achievements
Rank 1
Jose asked on 11 Nov 2013, 02:23 PM

Hi:



I have a Pivot Grid with vertical scrolling and RowGrandTotalHeaderCellTemplate set to some text for every aggregate field. It is set to some text because I did not wanted the aggregate function displayed such as SUM or AVE, etc … I have noticed that the vertical scrolling causes problems on the RowGrandTotalHeaderCellTemplate. The set text of the last aggregate field’s RowGrandTotalHeaderCellTemplate is repeated on all the other aggregated fields’ RowGrandTotalHeaderCellTemplate. These are some of the set properties:

 

<telerik:RadPivotGrid ID="Name" runat="server" AggregatesLevel="5" ShowDataHeaderZone="False" AggregatesPosition="Rows" Height="700px"

OnNeedDataSource="Name_NeedDataSource" OnCellDataBound="Name_CellDataBound" OnItemCommand="Name_ItemCommand">

                   

<PagerStyle ChangePageSizeButtonToolTip="Change Page Size" PageSizeControlType="RadComboBox"></PagerStyle>

<ClientSettings>

<Scrolling AllowVerticalScroll="True" ScrollHeight="700px"/>

</ClientSettings>

 

<TotalsSettings ColumnGrandTotalsPosition="None" ColumnsSubTotalsPosition="None" RowsSubTotalsPosition="None" />

5 filters fields

1 column fields

5 rows fields

 

9 aggregated fields

 

Is there way I can correct this behavior?



I am using ASP.NET 4.5, Windows 8, Internet Explorer 10.0.9200.16721, Telerik v.2013.2.717.45, C#.

The provided help will be appreciated.

 

Thanks!

Jose

2 Answers, 1 is accepted

Sort by
0
Accepted
Antonio Stoilkov
Telerik team
answered on 14 Nov 2013, 08:49 AM
Hello Jose,

You could resolve your issue by manually replacing the cell text in the CellDataBound event. The idea is to check the current e.Cell.Text and replace it if needed as shown in the example below.
protected void RadPivotGrid1_CellDataBound(object sender, Telerik.Web.UI.PivotGridCellDataBoundEventArgs e)
{
    if (e.Cell.Text == "Sum of Price")
    {
        e.Cell.Text = "Your custom text";
    }
}

Note that the described issue is not common. In order to investigate the problem and provide a fix for it you could assemble a sample runnable project showing the unwanted behavior so we could debug it on our end. You could upload it on a public sharing site and paste the link or open a formal support ticket and upload it there.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Jose
Top achievements
Rank 1
answered on 14 Nov 2013, 02:12 PM
Through server code works. Thanks!
Tags
PivotGrid
Asked by
Jose
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Jose
Top achievements
Rank 1
Share this question
or