columns Array
The configuration of the TreeList columns whcih represents an array of JavaScript objects or strings. JavaScript objects are interpreted as column configurations. Strings are interpreted as the field to which the column is bound. The TreeList will create a column for each item of the array.
Example - specifyinging the columns of the TreeList as an array of strings
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
columns: [
"lastName",
"position"
],
dataSource: [
{ id: 1, parentId: null, lastName: "Jackson", position: "CEO" },
{ id: 2, parentId: 1, lastName: "Weber", position: " VP, Engineering" }
]
});
</script>
Example - specifyinging the columns of the TreeList as an array of objects
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
columns: [
{ field: "lastName", title: "Last Name" },
{ field: "position", title: "Position" }
],
dataSource: [
{ id: 1, parentId: null, lastName: "Jackson", position: "CEO" },
{ id: 2, parentId: 1, lastName: "Weber", position: " VP, Engineering" }
]
});
</script>
Related Properties
- columns.attributes
- columns.columns
- columns.command
- columns.command.className
- columns.command.icon
- columns.command.imageClass
- columns.command.click
- columns.command.name
- columns.command.text
- columns.draggable
- columns.editable
- columns.editor
- columns.editorOptions
- columns.encoded
- columns.expandable
- columns.field
- columns.filterable
- columns.filterable.cell
- columns.filterable.cell.dataSource
- columns.filterable.cell.dataTextField
- columns.filterable.cell.delay
- columns.filterable.cell.inputWidth
- columns.filterable.cell.suggestionOperator
- columns.filterable.cell.minLength
- columns.filterable.cell.enabled
- columns.filterable.cell.operator
- columns.filterable.cell.showOperators
- columns.filterable.cell.template
- columns.filterable.operators
- columns.filterable.ui
- columns.footerTemplate
- columns.format
- columns.headerAttributes
- columns.headerTemplate
- columns.minScreenWidth
- columns.selectable
- columns.sortable
- columns.sortable.compare
- columns.template
- columns.title
- columns.width
- columns.hidden
- columns.includeChildren
- columns.menu
- columns.locked
- columns.lockable