columns.format String
The format that is applied to the value before it is displayed. Takes the {0:format}
form where format
is a standard number format, custom number format, standard date format or a custom date format.
The kendo.format function is used to format the value.
Example - specifyinging the column format string
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
columns: [
{ field: "lastName" },
{ field: "successRate", format: "{0:p}" },
{ field: "hireDate", format: "{0:dd/MMM/yyyy}" }
],
dataSource: {
data: [
{ id: 1, parentId: null, lastName: "Jackson", successRate: 0.7, hireDate: new Date(2012, 2, 3) },
{ id: 2, parentId: 1, lastName: "Weber", successRate: 0.8, hireDate: new Date(2012, 7, 13) }
]
}
});
</script>