kendo grid - rowtemplate
Sample from web/grid/rowtemplate http://demos.kendoui.com/web/grid/rowtemplate.html
by jwstott
HTML
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
<script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
<div id="example" class="k-content">
<table id="netflixTable">
<thead>
<tr>
<th>
Cover
</th>
<th>
Title
</th>
<th>
Rating A
</th>
<th>
Rating B
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3"></td>
</tr>
</tbody>
</table>
<script id="rowTemplate" type="text/x-kendo-tmpl">
<tr>
<td>
<img src="${ BoxArt.SmallUrl }" alt="${ Name }" />
</td>
<td>
${ Name }
</td>
<td>
${ AverageRating }
</td>
<td>
<span data-bind="text: AverageRating"></span>
</td>
</tr>
</script>
</div>
JavaScript
$("#netflixTable").kendoGrid({
dataSource: {
type: "odata",
serverFiltering: true,
filter: [{
field: "Name",
operator: "contains",
value: "Star Wars"},
{
field: "BoxArt.SmallUrl",
operator: "neq",
value: null}],
transport: {
read: "http://odata.netflix.com/Catalog/Titles"
}
},
rowTemplate: kendo.template($("#rowTemplate").html()),
height: 200
});