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

Know group.Key in a AggregateFuncion

7 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Salvador
Top achievements
Rank 1
Salvador asked on 13 Nov 2012, 07:29 AM
I like to know waht group.key call to the aggregate function.
It's possible?

Thanks.

7 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 13 Nov 2012, 03:32 PM
Hi,

I am not sure what your question is. Would you please explain better what is the result you would like to achieve?

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Salvador
Top achievements
Rank 1
answered on 13 Nov 2012, 04:46 PM
Well, when i group, the system go to the AggregateFunction.
This is the function for example.

    public static class AgregateFunction
    {      public static String F_Entregados<TSource>(IEnumerable<TSource> source)
        {
              HERE, I WANT TO KNOW WHAT GROUP COLUMS "FIRE" THE FUNCTION
              FOR EXAMPLE     COMPANY -> STATE

              AND OTHER QUESTION IS THAT, I HAVE IN  source   ALL DATA IN THE GROUP (COMPANY -> STATE)

              CAN I ACCES HERE TO ALL THE DATA WITHOUT GROUP??

         }
    }


0
Dimitrina
Telerik team
answered on 14 Nov 2012, 03:00 PM
Hello,

Unfortunately such an information about the Groups is not available with the AggregateFunction method when it is invoked. What do you mean by : "CAN I ACCES HERE TO ALL THE DATA WITHOUT GROUP??", do you mean all the Data bound to the GridView?

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Salvador
Top achievements
Rank 1
answered on 14 Nov 2012, 03:14 PM

 public  static String F_Confirmados<TSource>(IEnumerable<TSource> source)

In source only come the data that is in the group, but not all of the dadagridview. 
I want to acces to all.

0
Dimitrina
Telerik team
answered on 14 Nov 2012, 04:07 PM
Hi,

You could access the data bound to the GridView through the RadGridView.ItemsSouce collection or from the bound collection directly.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Salvador
Top achievements
Rank 1
answered on 14 Nov 2012, 05:08 PM
For example
I have 3 category
    - A, B, C

i want that my agregate function say
 Group  A     COUNT(A) = 23      COUNT(A) / COUNT(B)      COUNT(A) / COUNT(C) 

0
Dimitrina
Telerik team
answered on 15 Nov 2012, 10:21 AM
Hi,

I would suggest you to check this help article on more information for the different options to define a custom aggregate.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Salvador
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Salvador
Top achievements
Rank 1
Share this question
or