I have a need to dynamically update the footer template for a grid column. There is a custom calculation that needs to be performed on data for a column and the result of the calculation should be displayed in the column footer. The data for the grid is local. The custom calc should be triggered and the footer should be updated immediately after the user modifies the data for a cell in the column.
I created a Kendo UI Dogo sample to illustrate what I'm trying to do. The sample can be found at http://trykendoui.telerik.com/oVEV. In the sample, a function named "calc" is being called by the footer template. I'm having two problems trying to accomplish my goal right now.
1. The call to the "calc" function is wired to the save event of the grid. However, the data source doesn't contain the latest values at the point in time that the save event callback is called. It's as if the save event is actually a "beforeSave" event. How do I get the updated values from the grid's data source? Is there another event that I should be using for making the call to the "calc" function?
2. Once problem #1 is solved and the "calc" function is able to calculate the correct values, how do I display the new value in the column footer?
I created a Kendo UI Dogo sample to illustrate what I'm trying to do. The sample can be found at http://trykendoui.telerik.com/oVEV. In the sample, a function named "calc" is being called by the footer template. I'm having two problems trying to accomplish my goal right now.
1. The call to the "calc" function is wired to the save event of the grid. However, the data source doesn't contain the latest values at the point in time that the save event callback is called. It's as if the save event is actually a "beforeSave" event. How do I get the updated values from the grid's data source? Is there another event that I should be using for making the call to the "calc" function?
2. Once problem #1 is solved and the "calc" function is able to calculate the correct values, how do I display the new value in the column footer?