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 =;


Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions