i need to use row template and sortable features together. But it is not working. Can somebody help me how do i fix this?
My sample code is below:
###############################################
<script src="path/to/jquery"></script>
<script src="path/to/kendo/all/js"></script>
<script src="../../content/shared/js/people.js"></script>
<link href="../../../styles/kendo.common.min.css" rel="stylesheet" />
<div id="example" class="k-content">
<table id="people">
<thead>
<th>Id</th>
<th>First Name</th>
<th>Last Name</th>
<th>Title</th>
<th>Age</th>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<script id="template" type="text/x-kendo-template">
<tr class="asdf">
<td>#= Id #</td>
<td>#= FirstName #</td>
<td>#= LastName #</td>
<td>#= Title #</td>
<td>#= Age #</td>
</tr>
</script>
<script>
$(document).ready(function() {
//initialize dropdownlist components
$("#people").kendoGrid({
dataSource: {data: createRandomData(500)},
height: 200,
sortable: true,
rowTemplate: kendo.template($("#template").html())
});
});
</script>
#############################################
Thank you!
My sample code is below:
###############################################
<script src="path/to/jquery"></script>
<script src="path/to/kendo/all/js"></script>
<script src="../../content/shared/js/people.js"></script>
<link href="../../../styles/kendo.common.min.css" rel="stylesheet" />
<div id="example" class="k-content">
<table id="people">
<thead>
<th>Id</th>
<th>First Name</th>
<th>Last Name</th>
<th>Title</th>
<th>Age</th>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<script id="template" type="text/x-kendo-template">
<tr class="asdf">
<td>#= Id #</td>
<td>#= FirstName #</td>
<td>#= LastName #</td>
<td>#= Title #</td>
<td>#= Age #</td>
</tr>
</script>
<script>
$(document).ready(function() {
//initialize dropdownlist components
$("#people").kendoGrid({
dataSource: {data: createRandomData(500)},
height: 200,
sortable: true,
rowTemplate: kendo.template($("#template").html())
});
});
</script>
#############################################
Thank you!