We're starting to migrate from Telerik MVC Extensions to Kendo.
As we have the first master detail grid, we begin creating it the same way as the examples that come with installation of Kendo UI.
Here is my view:
So, it is just like the example, I already even copied it to try to find anything wrong, but I couldn't.
When I run the application and go to this grid, I get the following error:
IE9
Chrome
Any help?
As we have the first master detail grid, we begin creating it the same way as the examples that come with installation of Kendo UI.
Here is my view:
@(Html.Kendo()
.Grid<
ShowResumo
>()
.Name("grid")
.Columns(columns => {
columns.Bound(e => e.MasterId).Hidden(true);
columns.Bound(e => e.Code).Width(110);
columns.Bound(e => e.Description).Width(110);
columns.Bound(e => e.Date).Width(110);
columns.Bound(e => e.Quantity).Width(110);
columns.Bound(e => e.Type);
})
.Sortable()
.Pageable()
.Scrollable()
.ClientDetailTemplateId("template")
.HtmlAttributes(new { style = "height:430px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(6)
.Read(read => read.Action("ListResumo", "Transportador"))
)
.Events(events => events.DataBound("dataBound"))
)
<
script
id
=
"template"
type
=
"text/kendo-tmpl"
>
@(Html.Kendo()
.Grid<
ShowDetails
>()
.Name("grid_#=MasterId#")
.Columns(columns => {
columns.Bound(o => o.TransportId).Width(70);
columns.Bound(o => o.TruckId).Width(110);
columns.Bound(o => o.Driver);
columns.Bound(o => o.Plate).Width(200);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(5)
.Read(read => read.Action("ListDetails", "Transportador", new { masterId= "#=MasterId#" }))
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
</
script
>
<
script
>
function dataBound() {
this.expandRow(this.tbody.find("tr.k-master-row").first());
}
</
script
>
When I run the application and go to this grid, I get the following error:
IE9
Unhandled exception at line 9, column 6594 in http://localhost:60455/Scripts/kendo/2013.1.319/kendo.all.min.js
0x800a139e - Microsoft JScript runtime error: Invalid template:'
<div class="k-widget k-grid" id="grid_#=MasterId#"><table cellspacing="0">
Uncaught Error: Invalid template:' <
div
class
=
"k-widget k-grid"
id
=
"grid_#=MasterId#"
>