Hi Atolgan,
Thanks for contacting Syncfusion Support.
We could see you would like to calculate the sum of the Respective field and return it in the page unload. This can be done in the following methodology.
|
<script>
window.addEventListener("beforeunload", function (e) {
var obj = $("#Grid").ejGrid("instance");
var sum = ej.sum(obj.model.dataSource.dataSource.json, "Freight");
alert(sum);
});
</script> |
Regards,
Seeni Sakthi Kumar S.