Static Summary Row

3 posts, 0 answers
  1. Shaun
    Shaun avatar
    39 posts
    Member since:
    Sep 2012

    Posted 10 Dec 2012 Link to this post

    Hi,

    Is it possible to have a static / fixed position summary Row at the end of a grid.

    By this I mean a Summary Row that is outside of the scroll area, so if I have 1000 rows the user will see, say the first 20 rows and can scroll up or down to see the other rows but the summary row is always visible, something like freezing the top row in Excel. 

    What I want to see is the sum of a "volume"column at all times, I need to consider any filters that have been applied as well as only sum rows that have been checked.

    Another option would be for me to add my own summary panel below the grid but then I would need to be able to get the position of the Volume column after resize or datadinding with Best fit so I can set the left value of say a label so that it is aligned with the Volume column. I tried to use CurrentCell to get the x coordinate, but I'm guessing that relies on the cell being selected.

    Hope this makes sense and thanks in advance for your help..... Great controls by the way.

    Cheers
    Shaun.




  2. Svett
    Admin
    Svett avatar
    728 posts

    Posted 13 Dec 2012 Link to this post

    Hello Shaun,

    You should pin the SummaryRow to achieve the desired scenario. You can do that by using the following code snippet:

    this.radGridView1.SummaryRowsBottom.Add(new GridViewSummaryRowItem(new GridViewSummaryItem[]{
        new GridViewSummaryItem("ID", "{0}", GridAggregateFunction.Sum)}));
    this.radGridView1.MasterTemplate.ShowTotals = true;
    this.radGridView1.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Bottom;
    Kind regards,
    Svett
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. Shaun
    Shaun avatar
    39 posts
    Member since:
    Sep 2012

    Posted 21 Mar 2013 Link to this post

    Hi Svett,

    Sorry for the delay in getting back to you, your solution works perfectly.

    Cheers

    Shaun.
Back to Top