I'm trying to use some of Kendo's Grid options together.
I have created a row template with some fields, but I can't find how to include edit and delete buttons in the custom row template.
My datagrid configuration has the following columns:
If I don't include the rowtemplate in de datagrid configuration, the edit and delete button do show up.
But I need the template:
Because I want to add custom classes to my fields and rows or put multiple values in one row.
Any help would be appreciated!
I have created a row template with some fields, but I can't find how to include edit and delete buttons in the custom row template.
<
script
id
=
"rowTemplate"
type
=
"text/x-kendo-tmpl"
>
<
tr
data-uid
=
"#: uid #"
>
<
td
>
<
span
>#: Name #</
span
>
</
td
>
<
td
>
<
span
>#: CreatedBy #</
span
>
</
td
>
<
td
>
<
span
>#: kendo.format("{0: dd-MMM-yyyy}", CreatedDate) #</
span
>
</
td
>
<
td
>
<
span
>#: InUse #</
span
>
</
td
>
<
td
>
HOW DO I GET THE COMMAND BUTTONS HERE?
</
td
>
</
tr
>
</
script
>
columns: [
{ field: "Name", title: "Skill", width: "130px" },
{ field: "CreatedBy", title: "Created by", width: "130px" },
{ field: "CreatedDate", title: "Created at", width: "130px" },
{ field: "InUse", title: "In use?", width: "130px" },
{ command: ["edit", "destroy"], title: " " }
]
But I need the template:
rowTemplate: kendo.template($("#rowTemplate").html())
Any help would be appreciated!