How to use Grid Custom Cells For Aggregates

1 Answer 56 Views
Grid
Jie
Top achievements
Rank 3
Iron
Iron
Iron
Jie asked on 06 Oct 2023, 02:37 PM

Hi

 

According to the Custom Cells documentation,

"As of update 5.14.0, new properties were introduced which allow you to apply further customizations to the Grid. The previously available props such as the GridColumn cell prop or the Grid cellRender callback are still available but provide less options for customization as the ones listed in this article."

However, I can't figure out how to use custom cells to show group aggregates for each column like in this documentation. Do I still need to use cellRender to achieve that?

 

Thanks,

Jie

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 10 Oct 2023, 09:18 AM

Hi Jie,

With the newly introduced "cells" property of the columns you can replace the logic from the cellRender and add it to explicit custom cells defined through "cells={{groupFooter: MyFooterCell}}". Following is an example demonstrating this approach:

However, please note that you can still use the cellRender approach if you want to place the entire logic for the aggregates at one place, because with the cells property you have to set the custom cell for each column.

Hope this helps.

 

Regards,
Konstantin Dikov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Jie
Top achievements
Rank 3
Iron
Iron
Iron
commented on 10 Oct 2023, 07:07 PM

That works! This is pretty straightforward, I don't know how I didn't get it the first time. Thank you!

 

Tags
Grid
Asked by
Jie
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Konstantin Dikov
Telerik team
Share this question
or