I have a grid and I want to sum the number of true values in a boolean column. Is there a way to create a custom aggregate function to achieve this?
Brett
1 Answer, 1 is accepted
0
Aleksandar
Telerik team
answered on 12 May 2021, 06:10 AM
Hi Brett,
If I am not misunderstanding the scenario, you can use the Count aggregate function to get the number of items of the Boolean column that values true and false. Check the Demo we have here https://demos.telerik.com/aspnet-core/grid/aggregates
You are correct that the count aggregate will count the number of true AND false values. However I am looking to count the number of true values only. If the value is false I don't want to count it.
Brett
Aleksandar
Telerik team
commented on 14 May 2021, 12:23 PM
Hi Brett,
I am not entirely sure I understand the scenario you have. Is it possible that the approach demonstrated in this article would be useful for you?