Hi, sorry if this has already been answered but I'm fairly new to this. Anyway I've implemented the Kendo Grid in my VB.NET MVC 3 project. I thought it would be good to have a drilldown details template, but the details template won't populate with data...i've tried everything..can anyone help? It's in VB.NET so there may be something lost in translation somewhere.
Any help would be greatly appreciated
Any help would be greatly appreciated
@(Html.Kendo().Grid(Of Models.Device) _
.Name("Devices") _
.Groupable() _
.Filterable() _
.HtmlAttributes(New With {.style = "width: 100%", .align = "center"}) _
.Columns(Function(columns)
columns.Bound(Function(p) p.Tag).Groupable(True).Width(200)
columns.Bound(Function(p) p.Enabled).Groupable(True).Width(200)
columns.Bound(Function(p) p.Description).Groupable(True).Width(200)
columns.Bound(Function(p) p.Suffix).Groupable(True).Width(200)
columns.Command(Function(command)
command.Edit()
command.Destroy()
End Function).Width(200)
End Function) _
.Editable(Function(editable) editable.Mode(GridEditMode.InLine)) _
.ToolBar(Function(toolbar) toolbar.Create()) _
.DataSource(Function(dataSource)
dataSource.Ajax.Events(Function(events) events.Error("error_handler"))
dataSource.Ajax.Model(Sub(model) model.Id(Function(p) p.Suffix))
dataSource.Ajax.Create(Function(create) create.Action("Device_Create", "Device"))
dataSource.Ajax.Read(Function(read) read.Action("Device_Read", "Device"))
dataSource.Ajax.Update(Function(update) update.Action("Device_Update", "Device"))
dataSource.Ajax.Destroy(Function(delete) delete.Action("Device_Delete", "Device"))
End Function) _
.Events(Function(events)
events.DataBound("dataBound")
End Function) _
.ClientDetailTemplateId("RuleTemplate")
)
<
script
>
function dataBound() {
this.expandRow(this.tbody.find("tr.k-master-row").first());
}
</
script
>
<
script
id
=
"RuleTemplate"
type
=
"text/kendo-tmpl"
>
@(Html.Kendo().Grid(Of Models.DeviceRule) _
.Name("Rules_#=Suffix#") _
.Columns(Function(columns)
columns.Bound(Function(p) p.Suffix).Groupable(True)
columns.Bound(Function(p) p.RuleID).Groupable(True)
columns.Bound(Function(p) p.Name).Groupable(True)
columns.Bound(Function(p) p.Priority).Groupable(True)
columns.Bound(Function(p) p.Active).Groupable(True)
End Function) _
.DataSource(Function(dataSource)
dataSource.Ajax.Read(Function(read) read.Action("DeviceRules_Read", "Device", New With {.Suffix = "#=Suffix#"}))
End Function) _
.Pageable() _
.Sortable() _
.ToClientTemplate())
</
script
>