Hi all I just want to use ClientTemplate option and I can't get it working:
As you can see:
columns.Bound(p => p.BookId).Width(50).ClientTemplate("Some HTML code");
Insead of this lane I should have "Some HTML code" but I have ID's
As you can see:
columns.Bound(p => p.BookId).Width(50).ClientTemplate("Some HTML code");
Insead of this lane I should have "Some HTML code" but I have ID's
@model List<
Biblioteka.ViewModels.BookViewModel
>
@{
ViewBag.Title = "Index";
}
<
h2
>Index</
h2
>
@(Html.Kendo().Grid<
Biblioteka.ViewModels.BookViewModel
>()
.Name("BooksKendoGrid")
.Columns(columns =>
{
columns.Bound(p => p.Title);
columns.Bound(p => p.Author);
columns.Bound(p => p.BookGenreId);
columns.Bound(p => p.ReleaseDate);
columns.Bound(p => p.ISBN);
columns.Bound(p => p.Count);
columns.Bound(p => p.RealBookCount);
columns.Bound(p => p.AddDate);
columns.Bound(p => p.ModifiedDate);
columns.Bound(p => p.BookId).Width(50).ClientTemplate("Some HTML code");
//columns.Command(command => { command.Edit(); }).Width(200);
})
//.ToolBar(toolbar => toolbar.Create())
// PopUp editing Mode
.Editable(editable => editable.TemplateName("BooksEditor").Mode(GridEditMode.PopUp))
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Model(model =>
{
//The unique identifier (primary key) of the model is the ProductID property
model.Id(p => p.BookId);
})
// .Create(create => create.Action("Create", "Books"))
.Read(read => read.Action("BooksKendoGridRead", "Books").Type(HttpVerbs.Post)
)
).BindTo(Model)
)