Kendo ui grid record length count

Kendo ui grid record length count

MVC 4 Controller code sample

 //Use api Controller
// GET api/use/
public string Get(int id)
    return "value";

 Kendo MVC4 Grid code sample

    .Columns(columns =>
        columns.Bound(e => e.Product).Title("Product");
        columns.Bound(e => e.UsageIncluded).Title("Usage Included");
        columns.Bound(e => e.UsageIncludedTypeID).Title("Usage Included Type").ClientTemplate("#: getUsageIncludedType(UsageIncludedTypeID) #");
        columns.Bound(e => e.NetworkID).Title("Network").ClientTemplate("#: getNetworkName(NetworkID) #");
        columns.Bound(e => e.UsageMade);
    .DataSource(dataSource => dataSource
        .Read(read => read.Action("GetUsageByPricing", "Api/Use").Type(HttpVerbs.Get).Data("sendData"))

JavaScript Code sample

<script type="text/javascript">
var kendoGrid = $("#kndoGridId").data("kendoGrid");

var msg = "<div class='clr_15'></div><div class='alert grid-no-record'>No Record found</div>";

if (kendoGrid !== undefined && kendoGrid !== null) {
    kendoGrid.bind("dataBound", function (e) {
        if (e.sender.dataSource.view().length === 0) {
            e.sender.table.closest(".k-grid-content").css({ "overflow-y": "scroll;" });

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



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 - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book