Hi,
I have a sample ASP.NET 5 (MVC) web app from Microsoft working in VS2015:
http://docs.asp.net/en/latest/tutorials/your-first-aspnet-application.html
I am in attempt to popluate the Telerik Grid with the Model that I have generated above, however having no luck.
Snip from the app:
BooksController:
// GET: Books
public
IActionResult Index()
{
var applicationDbContext = _context.Book;
return
View(applicationDbContext.ToList());
}
Views/Books/Index.chtml:
@(Html.Kendo().Grid(Model)
.Name(
"datagrid"
)
.Columns(columns =>
{
columns.Bound(b=>b.Title);
})
.DataSource(dataSource => dataSource
.Ajax()
)
)
When I debug, Grid does not appear on the page. However, I can see the actual data written in the html source of the page:
HTML:
<
div
id
=
"datagrid"
name
=
"datagrid"
></
div
><
script
>jQuery(function(){jQuery("#datagrid").kendoGrid({"columns":[{"title":"Title","field":"Title",
:
"data":{"Data":[{"BookID":2,"AuthorID":null,"Genre":"Gothic parody333","Price":12.95,"Title":"Northanger Abbey","Year":1817,"Author":null},{"BookID":3,"AuthorID":2,"Genre":"Bildungsroman","Price":15.00,"Title":"David Copperfield","Year":1850,"Author":null},{"BookID":4,"AuthorID":3,"Genre":"Picaresque","Price":8.95,"Title":"Don Quixote","Year":1617,"Author":null}],"Total":3}}});});</
script
>
Would help if you could point out what I may have missed, thanks!