This is a migrated thread and some comments may be shown as answers.

MVC Grid empty row template - server binding

1 Answer 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Marcin asked on 02 Dec 2015, 03:11 PM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 04 Dec 2015, 09:49 AM
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
Tags
Grid
Asked by
Marcin
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or