Batch Grid column total (unsaved)

2 posts, 0 answers
  1. Mitchell
    Mitchell avatar
    5 posts
    Member since:
    Jul 2014

    Posted 16 Mar 2015 Link to this post

    Is there a way to get the total of a data column for an unsaved data grid? I want to check the column total before allowing a save back to the server.
    Thanks
  2. Mitchell
    Mitchell avatar
    5 posts
    Member since:
    Jul 2014

    Posted 16 Mar 2015 Link to this post

    I have managed to do this now using the following.

    var grandtotal = 0;

    var grid = $('#TheGridName').data("kendoGrid");
    var gridData = grid.dataSource.view();

    for (var i = 0; i < gridData.length; i++) {
    (
    grandtotal += gridData[i].TheColumnName);
    }
Back to Top