RowGrandTotalHeaderCellTemplate

3 posts, 1 answers
  1. Jose
    Jose avatar
    6 posts
    Member since:
    Nov 2013

    Posted 11 Nov 2013 Link to this post

    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. Answer
    Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 14 Nov 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jose
    Jose avatar
    6 posts
    Member since:
    Nov 2013

    Posted 14 Nov 2013 Link to this post

    Through server code works. Thanks!
Back to Top