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

Hide some (but not all) group footers

3 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael Yereniuk
Top achievements
Rank 1
Michael Yereniuk asked on 03 Jun 2008, 11:06 PM
I have two group levels in my grid which I get by adding:

            Me.RadGridView1.MasterTableView.GroupByExpressions.Add("ClientName [Client] Group By ClientID ASC") 
            Me.RadGridView1.MasterTableView.GroupByExpressions.Add("JobName [Job] Group By JobID ASC") 

I have group footers enabled and I am calculating one of my columns avg total by using the aggregate (avg).  There are two problems here:

1) I am getting a calculated group footer for both clients and jobs. I would like to hide the client group footer so that only the job footer(s) are displayed
2) Even if I wanted to display the 2nd group footer, the total that it gives me is incorrect. It should be an average of all of the job calculated group totals, but instead, on further investigation I see that it is taking an average of only the last record in each job, and doing an average (weird!).

That last point may or may not be a bug, as I am just learning how to use this control.. Either way, I would like to only display the one group total footer.

Can anyone help?

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 06 Jun 2008, 12:41 PM
Hello Michael,

Attached to this message, you will find a sample application, which handles a functionality close to the one that you mentioned.
I hope this helps.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
gemr1423
Top achievements
Rank 2
answered on 29 Oct 2013, 10:28 PM
In the example, if I have a GroupFooterTemplate and I want in a group show some data and other data in the other group. How do I identify which group corresponds to each footer?
0
Kostadin
Telerik team
answered on 01 Nov 2013, 12:08 PM
Hi,

There is a several way which could serve your needs. A possible solution is to use the GroupIndex of the corresponding footer item.
footerItem.GroupIndex
Another approach is to compare the cell value by using the column's UniqueName.
footerItem["ColumnUniqueName"].Text
You could also get the GroupHeader items and use the aforementioned method to get the needed information from them.

Regards,
Kostadin
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.
Tags
Grid
Asked by
Michael Yereniuk
Top achievements
Rank 1
Answers by
Yavor
Telerik team
gemr1423
Top achievements
Rank 2
Kostadin
Telerik team
Share this question
or