miércoles, 1 de octubre de 2014

Date datasource y grid, template campo compuesto,Fecha

<script type="text/javascript">
$(document).ready(function() {
var myDataSource = new kendo.data.DataSource({
data: personData,
schema: {
model: {
fields: {
FirstName: { type: "string" },
LastName: { type: "string" },
Rank: { type: "string" },
DOB: { type: "date" },
PersonId: { type: "number" }
}
}
}
} );
$("#myGrid").kendoGrid({
dataSource: myDataSource,
columns: [
{ field: "Name", title: "Full Name", width: "300px",
template: '#=FirstName# #=LastName#' },
{ field: "DOB", title: "Date of Birth", width: "300px",
format: "{0:yyyy-MM-dd}" },
{ field: "Rank", title: "Rank", width: "300px" }
]
});
});
</script>
<div id="myGrid"></div>
</body>

No hay comentarios:

Publicar un comentario