Q:

How to access the kendo grid footer template value

i have developed a web application using kendo tools and asp.net mvc4..
below is a screenshot of the grid i'm using and i need to get the value of footer under the "Total Stock" column.. according to this, the total value is $74,050.85.. 
i need to assign this value to a text box or a variable and use it in some where else but there no positive feedback from the online resources..

can somebody please tell me that how to get a value from footer template..

A:

i guess you use aggregate function in your kendogrid to calculate Total Stock[so your total $74,050.85..], am i right??
if yes than
this should be the best answer for your question.
example your kendogrid id = 'gridtotal', and your field that aggregated = total_stock
so if you want to get the total, you just do this
    var total = $("#gridtotal").data().kendoGrid.dataSource.aggregates().total_stock.sum;

here if you want to know more
http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-group.aggregates

A:

You can get the footer aggregate values (such as total) by setting a footerTemplate. That footer template can execute arbitrary code such as updating a textbox value.
The other option is to use jQuery to get the text of the footer:
var totalText = $("#grid .k-footer-template").text();

A:

Under the grid column definition, add 
footerAttribute: {"id":"total-stock"}

This will add an id to the cell. Then you can just use jquery to pull it directly:
var totalStock = $("#total-stock").text().split(":")[1]

If you wanted to pull the raw numerical value, you could get it as well by parsing the number out, or you can assign it as an attribute to the cell.
footerAttribute: {"id":"total-stock", "data-value": sum }

Then reference it later
var totalStock = $("#total-stock").data("value")

