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

updating aggregate sum footer for editable tables

2 Answers 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 26 Aug 2011, 09:27 AM
Is it possible to update Radgrid footer sums to show the sum of the values in cells which are in edit mode?

C#, ASP.NET 4, Windows Server 2003
ASP.NET AJAX 2011 Q2

I have created a RadGrid which is built dynamically at runtime.  The number of columns and their names are not known until the user has made their parameter selection and submitted their request for data.  The whole grid is in Edit mode when loaded (AllowMultiRowEdit=true, EditMode = GridEditMode.InPlace).  I am able to retrieve all the values programatically in code-behind for data validation before I commit the changes to my database.  I have footers showing the totals of the values in each column when the grid is first generated.

My problem is that I want to update the footer sums based on the edited values in the grid, so that the user sees a real time update of the totals.  This is to ensure that the numbers total 100 in each column.

Is this possible?  If not, is there any way to trap the Tab event using the client event KeyPress (eg when they use tab or shift-tab to change cells), or the change in cell event when you click in another cell?

Any help or advice gratefully received

Thanks
Mark

2 Answers, 1 is accepted

Sort by
0
Accepted
Radoslav
Telerik team
answered on 31 Aug 2011, 09:28 AM
Hi Mark,

Please check out the following code library which explains how to refresh footer values in RadGrid client-side:
http://www.telerik.com/community/code-library/aspnet-ajax/general/refresh-footer-values-in-radgrid-client-side-using-radnumerictextbox.aspx

I hope this helps.

All the best,
Radoslav
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Mark
Top achievements
Rank 1
answered on 07 Sep 2011, 11:35 AM
Thank you for the code sample.  It seems to do exactly what I'm looking for!

Regards
Mark

Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Mark
Top achievements
Rank 1
Share this question
or