React Grid: I need a simple example of the use footerCell for count and sum of columns in the latest Kendo builds

0 Answers 10 Views
Grid
Dave
Top achievements
Rank 1
Dave asked on 03 Jul 2025, 04:34 PM
I found older examples using pre React 18  and but they are not working for me.
Vessy
Telerik team
commented on 03 Jul 2025, 06:04 PM

Hi, Dave,

Below you can see a sample demonstrating how to implement a custom sum/total footerCell for a grouped column using the latest version of React and KendoReact:

Is this the scenario that you are after or can you share some more details on the target result? You can also send me the found sample using React 18 so I can advice you how to upgrade it.

Regards,
Vessy
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Dave
Top achievements
Rank 1
commented on 04 Jul 2025, 12:55 AM

https://stackblitz.com/edit/react-9cw5ko?file=app%2Fmain.jsx

The above is a simple example. The above example is from an older build of Kendo React.  I am not interested in the Excel issues but would like to se this running in the latest Kendo React build.  I can run the footer aggregation in the Kendo Query grid just fine.

how to implement a custom sum/total footerCell  is hard for me to follow  .. it is not a simple example.

 

Thanks

 

 

Vessy
Telerik team
commented on 07 Jul 2025, 03:46 PM

Hi, Dave,

Thanks a lot for the provided sample. In order to migrate it to the latest version of the Grid you just need to use the cells.footerCell prop in order to the deprecated footerCell one. For example:

Dave
Top achievements
Rank 1
commented on 07 Jul 2025, 11:04 PM

How to make it work with filtering?

https://stackblitz.com/run/?file=app%2Fapp.jsx

I have been using the JQuery version for 2 years and it works for me in the JQuery version .. works different in React.

Thanks for your help

 

 

Dave
Top achievements
Rank 1
commented on 07 Jul 2025, 11:09 PM

This is the filtered grid reference  not the one above

https://stackblitz.com/edit/react-wdb3edkz?file=index.js

 

The total does not update after filter reset

Vessy
Telerik team
commented on 08 Jul 2025, 04:02 PM

Hi, Dave, 

I tried to replicate the described behavior in the shared demo but the items in the Grid are properly reset to total when I clear the filter. Can you take a look at the video from my test below and see whether I am leaving any step out?

Dave
Top achievements
Rank 1
commented on 08 Jul 2025, 04:19 PM

The issue is that the Total is not updating after the filter data changes

I need the total to be based on the viewed data.

 

Thanks

Alexander
Telerik team
commented on 10 Jul 2025, 08:25 AM | edited

Hi, Dave,

The issue appears to be that the code is looping over the `sampleProducts` array, which contains all the initial records. I can recommend filtering out only the results left after applying the selected filters. This can be achieved by using the `filterBy` function provided in our Data Query package and passing the initial `sampleProducts` array and the currently selected filter:

You can read more about filterBy here:

Please let me know in case the issue still persists on your end and I will gladly assist further in resolving it.

Regards,
Alexander
Progress Telerik

 

Dave
Top achievements
Rank 1
commented on 10 Jul 2025, 02:02 PM

Thnaks

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dave
Top achievements
Rank 1
Share this question
or