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

Static Summary Row

2 Answers 379 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Shaun
Top achievements
Rank 1
Shaun asked on 10 Dec 2012, 11:14 PM
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 Answers, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 13 Dec 2012, 05:04 PM
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.
0
Shaun
Top achievements
Rank 1
answered on 22 Mar 2013, 02:15 AM
Hi Svett,

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

Cheers

Shaun.
Tags
GridView
Asked by
Shaun
Top achievements
Rank 1
Answers by
Svett
Telerik team
Shaun
Top achievements
Rank 1
Share this question
or