Am I missing something in my initial file includes.
<link rel="stylesheet" href="@Url.Content("~/Content/kendo.common.min.css")">
<link rel="stylesheet" href="@Url.Content("~/Content/kendo.silver.min.css")">
<script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.all.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.aspnetmvc.min.js")"></script>
Here is a snippet of code that uses a client template
@( Html.Kendo().Grid<DetailCategoryListingGridView>()
.Name("DetailCategoryGrid").
Columns(columns =>{
columns.Bound(a => a.Value).Title("CategoryValue").Width(200);
columns.Bound(a => a.Comments).Title("Description");
columns.Bound(a => a.ModifiedDate).Title("LastUpdated").Format("{0:MM/dd/yyyy}").Width(150);
columns.Bound(a => a.ModifiedBy).Title("UpdatedBy").Width(150);
columns.Bound(a => a.DetailCategoryID).Title("UpdatedBy").Width(150);
columns.Command(commands =>
{
commands.Destroy();
commands.Edit();})
.HtmlAttributes(new {style = "text-align:center"});
})
.ClientDetailTemplateId("udfTemplate")
.Pageable().DataSource(dataBinding => dataBinding.Ajax()
.Read(read=>read.Action("FilteredDetailCategoryBinding", "DetailCategoryAdmin"))
.Create(create=>create.Action("InsertDetailCategory", "DetailCategoryAdmin"))
.Update(update=>update.Action("UpdateDetailCategory", "DetailCategoryAdmin"))
.Destroy(destroy=>destroy.Action("DeleteDetailCategory", "DetailCategoryAdmin"))
.Model(model => model.Id(a => a.DetailCategoryID)) .PageSize(15)
)
.Sortable()
.Pageable(page=>page.PageSizes(true))
//.Events(events => events.DataBound("dataBound")
)
<script id="udfTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid<UDFInventoryTemplate>()
.Name("UDFInventoryDetails_#=DetailCategoryID#")
.Columns(columns =>
{
columns.Bound(o => o.LabelValue);
columns.Bound(o => o.Status);
columns.Bound(o => o.ControlType);
columns.Bound(o => o.ControlDataValues);
columns.Bound(o => o.DefaultValue); })
.DataSource(dataSource => dataSource.Ajax() .Read(read=>read
.Action(
"FilteredUDFDetails", "DetailCategoryAdmin"))
).ToClientTemplate()
)
</script>
Thanks,
Jean-Paul