sheets.sortObject
Defines the sort criteria for the sheet.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
name: "MySheet",
sort: {
ref: "A1:B5",
columns: [{
index: 0,
ascending: false
}]
},
rows: [{
cells: [{
value: "Name"
}, {
value: "Age"
}]
}]
}]
});
</script>
sheets.sort.columnsArray
Specifies the sort options for individual columns.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
name: "MySheet",
sort: {
ref: "A1:C5",
columns: [{
index: 0,
ascending: true
}, {
index: 1,
ascending: false
}]
}
}]
});
</script>
sheets.sort.columns.ascendingBoolean
Indicates if the data in the cell will be sorted in ascending (true) or descending order (false).
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
name: "MySheet",
sort: {
ref: "A1:B5",
columns: [{
index: 0,
ascending: true
}]
}
}]
});
</script>
sheets.sort.columns.indexNumber
The index of the column within the sheet. For example, column C will have an index of 2.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
name: "MySheet",
sort: {
ref: "A1:C5",
columns: [{
index: 2,
ascending: true
}]
}
}]
});
</script>
sheets.sort.refString
The sorted range, for example, A1:D5.
Example
<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
name: "MySheet",
sort: {
ref: "A1:D5",
columns: [{
index: 0,
ascending: true
}]
}
}]
});
</script>
In this article