MVC Grid empty row template - server binding

2 posts, 1 answers
  1. Marcin
    Marcin avatar
    4 posts
    Member since:
    Jul 2015

    Posted 02 Dec 2015 Link to this post

    Hello,

     

    I'm trying to use empty row template in server model binding and it does not work. Using Ajax call for collection everything works ok. It is possible to define empty row template for server binding.

     

    Cheers,

    Marcin Kurtz

  2. Answer
    Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 Dec 2015 Link to this post

    Hello,

    Specifying an empty sever-side row template is possible, as seen on this screenshot. Here is the code used: 
    @model IEnumerable<Kendo.Mvc.Examples.Models.Customer>
     
    @(Html.Kendo().Grid(Model)
        .Name("Grid")
        .HtmlAttributes(new { style = "width: 750px" })
        .Columns(columns =>
        {
            columns.Bound(c => c.CustomerID).Title("Picture");
            columns.Bound(c => c.ContactName).Title("Name");
            columns.Bound(c => c.CompanyName);
            columns.Bound(c => c.Country);
            columns.Bound(c => c.Address);
            columns.Bound(c => c.Phone);
        })
        .RowTemplate(@<text></text>)
        .Pageable()
        .Sortable()
        .Scrollable()
    )


    Regards,
    Alexander Popov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top