kendo ui grid total row get total number of rows in a grid

kendo ui grid total row count

Hello everyone, I am going to share the code sample for 
"get total number of rows in a kendo ui grid".

Code sample for MVC 4 kendo Grid

            .Columns(columns =>
                columns.Bound(e => e.AParty_Subscriber).Title("A Party");
                columns.Bound(e => e.BParty);
                columns.Bound(e => e.Date_Time).Format("{0:dd-mm-yyyy / h:mm:ss}").Title("Date & Time");
                columns.Bound(e => e.NetworkID).Title("Network").ClientTemplate("#: getNetworkName(NetworkID) #");
                columns.Bound(e => e.CallType);
                columns.Bound(e => e.Location);
                columns.Bound(e => e.CallDirection);
                columns.Bound(e => e.Unit);
            .DataSource(dataSource => dataSource
                .Model(model => model.Id(p => p.ID))
                .Read(read => read.Action("GetUsage", "Api/Use").Type(HttpVerbs.Get).Data("sendData"))

Code sample for JavaScript

<script type="text/javascript">
    $(document).ready(function () {

    function sendData() {
        return {
            TenantID: '@userSession.TenantID',
            CompanyID: '@userSession.CompanyID'

    function totalNoOfRows() {
        var kendoGrid = $("#CallByCallUsage").data("kendoGrid");

        //THis is for get the length of grid.
        var grdLength = kendoGrid.dataSource.view().length;

        //This is for get total no of records.
        var grdTotal =;


Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog -
My Books - Book 1 and Book 2 Powered by Blogger.