All docs
V20.2
24.1
23.2
23.1
22.2
22.1
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.
A newer version of this page is available. Switch to the current version.

jQuery TreeList - Data Columns

Data columns are the most common type of columns used in the TreeList UI component. They are generated for all members of the columns array that do not configure band columns. Usually, a data column displays values from a data field to which it is bound, but you can populate a data column with custom values (see Customize Cells).

DevExtreme HTML5 JavaScript TreeList DataColumns

If data column values should be cast to another type (for example, date values stored as strings), specify the target type using the dataType property.

jQuery
JavaScript
$(function() {
    $("#treeListContainer").dxTreeList({
        // ...
        columns: [{
            dataField: "HireDate",
            dataType: "date"
        }]
    });
});
Angular
HTML
TypeScript
<dx-tree-list ... >
    <dxi-column dataField="HireDate" dataType="date"></dxi-column>
</dx-tree-list>
import { DxTreeListModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxTreeListModule
    ],
    // ...
})
Vue
App.vue
<template>
    <DxTreeList ... >
        <DxColumn data-field="HireDate" data-type="date" />
    </DxTreeList>
</template>

<script>
import 'devextreme/dist/css/dx.light.css';
import DxTreeList, {
    DxColumn
} from 'devextreme-vue/tree-list';

export default {
    components: {
        DxTreeList,
        DxColumn
    },
    // ...
}
</script>
React
App.js
import React from 'react';
import 'devextreme/dist/css/dx.light.css';

import TreeList, {
    Column
} from 'devextreme-react/tree-list';

export default function App() {
    return (
        <TreeList ... >
            <Column dataField="HireDate" dataType="date" />
        </TreeList>
    );
}
See Also