Hello,
I'm trying to integrate the sortable component into a grid that is a ClientDetailTemplateId. Is it possible to do that ? Here is my code so far (this grid is the client detail, a grid within a grid)
<script>
@(Html.Kendo().Grid<PointVerificationViewModel>()
.Name("pointGrid_#=Id#")
.Columns(col =>
{
col.Bound(p => p.Libelle);
col.Bound(p => p.EstBloquant)
.ClientTemplate("\\#: data && data.EstBloquant ? 'OUI' : 'NON' \\#");
col.Command(cmd =>
{
cmd.Edit().Text(" ").UpdateText(" ").CancelText(" ").IconClass("fa fa-pencil-alt").UpdateIconClass("fa fa-check").CancelIconClass("fa fa-ban");
cmd.Destroy().Text(" ").IconClass("fa fa-times");
});
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.ToolBar(toolbar =>
{
toolbar.Create().IconClass("fa fa-plus").Text("Créer un point de vérification");
})
.DataSource(ds => ds
.Ajax()
.ServerOperation(false)
.Model(m =>
{
m.Id(p => p.Id);
})
.Read(a => a.Action("Read", "PointVerification", new { familleId = "#=Id#" }).Type(HttpVerbs.Get))
.Create(a => a.Action("Create", "PointVerification", new { familleId = "#=Id#" }).Type(HttpVerbs.Post))
.Update(a => a.Action("Update", "PointVerification").Type(HttpVerbs.Put))
.Destroy(a => a.Action("Delete", "PointVerification").Type(HttpVerbs.Delete))
)
.Sortable()
.ToClientTemplate()
)
@(Html.Kendo().Sortable()
.For("#pointGrid_#=Id#")
.Filter("table > tbody > tr")
.Cursor("move")
.HintHandler("noHint")
.PlaceholderHandler("placeholder")
.ContainerSelector("#pointGrid_#=Id# tbody")
.Events(events => events.Change("onChange"))
)
</script>
i've got an invalide template error with that code.
Thanks a lot.