Trying to set a default sort column on my kendo UI grid from a local datasource. I've read all over that I should be putting:
sort: { field: "price", dir: "desc" }
onto the data source. I've tried this and it still isn't working (see bottom of following example).
Here's my code in full, where am I going wrong?
$('#grid').kendoGrid({
dataSource: [
{
date: "Feb 13 2014",
price: 5,
},
{
date: "Feb 15 2014",
price: 7,
},
{
date: "Feb 12 2014",
price: 6,
}
],
height:500,
sortable: true,
pageable: false,
columns: [
{
field: "date",
title: "Date"
},
{
field: "price",
title: "Price",
}
],
sort: {field: "price", dir: "desc"}
});