reorderColumn
Changes the position of the specified column.
Parameters
destIndex Number
The new position of the column. The destination index has to be calculated with regard to all columns including the hidden ones.
column Object
The column whose position will be changed.
Example - moving a column
<button id="btn">Switch Name and Age Column</button>
<div id="treeList"></div>
<script>
$("#treeList").kendoTreeList({
columns: [
{ field: "id" },
{ field: "name" },
{ field: "age" }
],
dataSource: [
{ id: 1, parentId: null, name: "Jane Doe", age: 22, expanded: true },
{ id: 2, parentId: 1, name: "John Doe", age: 24 },
{ id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
],
selectable: true
});
$("#btn").click(function(){
var treeList = $("#treeList").data("kendoTreeList");
treeList.reorderColumn(2, treeList.columns[1]);
});
</script>