Some time ago, I was working on a project which used Kendo MVC Wrappers, they are pretty handy beacause they save you a lot of work with ajax call, formating, ordering, paging, among others, but many times I found myself struggling deep inside Telerik documentation trying to find out how to make something a little bit different from Telerik's Demos
A few weeks ago, I needed to make a table grid who included a field from a foreign table that I accessed through a navigation property. I had to present to user a list of app comments with the following fields:
A few weeks ago, I needed to make a table grid who included a field from a foreign table that I accessed through a navigation property. I had to present to user a list of app comments with the following fields:
- CommentId
- Comment
- Application (This is taken from a other)
@(Html.Kendo().Grid()
.Name("grid")
.Pageable()
.Sortable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read
.Action("GetAll", "Comment")
)
).Columns(col =>
{
col.Bound(p => p.CommentId).Title("ID").Width(60);
col.Bound(p => p.Text).Title("Comment");
//foreign table field
col.Bound(p => p.AppName).Title("App");
})
.Filterable(x => x.Enabled(false))
)