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

GridGroupFooterItem - how to determine which group I'm in

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PaulMrozowski
Top achievements
Rank 1
PaulMrozowski asked on 23 Dec 2008, 04:29 PM
 I have a column in my group footer where I need to calculate a percentage. The percentage depends on which group I'm currently in. I've got code in ItemDataBound which checks to see if e.Item is a GridGroupFooterItem and if so, it does the calculation. However, I'm having a hard time trying to figure out which group I'm actually in. GridGroupFooterItem.GroupIndex is supposed to have it as a string, but it seems to start at "0", then go to "2", then "4", etc. This grid only has one level of grouping. I guess I could just calculate it based off of the GroupIndex or maintain my own group count but that seems weird - is there a more direct approach?

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 29 Dec 2008, 08:56 AM
Hi Paul,

You can calculate this information based on the group index. In your case it will go in the following way:

0
2
4
6
8
10
12
14
16
18
...

Thus, guving you a way to determine which group the footer belongs to.
I hope this information helps.

Greetings,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
PaulMrozowski
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or