columns.attributes Object

The HTML attributes of the table cell (<td>) that is rendered for the column.

Quote all HTML attributes which are JavaScript keywords (for example, class).

Example - specifyinging the column HTML attributes

<div id="treelist"></div>
    columns: [
      { field: "lastName" },
        field: "position",
        attributes: {
          "class": "highlight",
          style: "text-align: right"
    dataSource: [
      { id: 1, parentId: null, lastName: "Jackson", position: "CEO" },
      { id: 2, parentId: 1, lastName: "Weber", position: "  VP, Engineering" }
  .highlight {
    color: red;
//The table cells look like `<td role="gridcell" class="highlight" style="text-align: right;">...</td>`.
In this article
Not finding the help you need? Improve this article