columns.headerAttributes Object

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

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

Example - specifyinging column header HTML attributes

<div id="treeList"></div>
  var dataSource = new{
      data: [
        { id: 1, parentId: null, lastName: "Jackson" },
        { id: 2, parentId: 1, lastName: "Weber" }
    columns: [ {
      field: "lastName",
      headerAttributes: {
        "class": "name-header",
        style: "text-align: right"
    } ],
    dataSource: dataSource
// The table headers will look like `<th class="name-header" style="text-align: right">...</th>`.
In this article
Not finding the help you need? Improve this article