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

Aggregates, display all groups

4 Answers 38 Views
GridView
This is a migrated thread and some comments may be shown as answers.
invivo
Top achievements
Rank 1
invivo asked on 02 Oct 2012, 09:14 AM
Hello,

I would like to know if there is any way to show empty groups in the gridview when aggregates functions are used ?

For exemple :
I have these datas :
groupA sample
groupA sample2
groupB sample3

Actually, I see this :
groupA Count : 2
groupB Count : 1

And now I want to see this :
groupA Count : 2
groupB Count : 1
groupC Count : 0

It is possible to have this ?
Can we defined groups for the aggregates and so see also empty groups ?


Thanks !

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 02 Oct 2012, 10:32 AM
Hi,

That is not possible. You can't display something which does not exist in the actual data.

Try doing LINQ GroupBy over a set of data. It cannot return groups which do not exist in the data.

All the best,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Rossen Hristov
Telerik team
answered on 02 Oct 2012, 10:39 AM
Hi,

Actually, I will try to explain this in another way. For example you want to see groupC with count 0.

Why not groupX or groupY ot groupSomething else. In other words the set of possible zero=-count groups is the infinite set.

No one knows what can exist if it does not actually exist.

Regards,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
invivo
Top achievements
Rank 1
answered on 02 Oct 2012, 01:18 PM
Yes, I understand what you explain, and I knew that.

But my question was, if there any way to give "groups" to the aggregate function (so, not dynamicaly with datas) and thereby display all groups ?
0
Rossen Hristov
Telerik team
answered on 02 Oct 2012, 01:27 PM
Hi,

No.

Greetings,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
invivo
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
invivo
Top achievements
Rank 1
Share this question
or