Overview

Columns represent sets of data values that have the same type. To configure columns, assign an array of objects to the columns option. Each object in it configures a single column. If a column does not need to be customized, this array may include the name of the field that provides data for this column.

JavaScript
$(function() {
    $("#treeListContainer").dxTreeList({
        // ...
        columns: [{
            dataField: "Title",
            caption: "Position"
        }, {
            dataField: "FullName",
            width: 300
        }, 
            "CompanyName",
            "City"
        ]
    });
});

The TreeList generates a column per data field if you do not specify the columns array. You can make minor adjustments to these columns with the customizeColumns function. Use the function's parameter to access the column configurations.

JavaScript
$(function() {
    $("#treeListContainer").dxTreeList({
        // ...
        customizeColumns: function (columns) {
            columns[0].width = 100;
            columns[1].width = 210;
        }
    })
});

This topic has outlined the ways to configure columns in the TreeList widget. For a detailed overview of column features, refer to other topics in this section.

See Also