Edit this page

columns.headerAttributes Object

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

HTML attributes which are JavaScript keywords (e.g. class) must be quoted.

Example - specify column header HTML attributes

<div id="treeList"></div>
  var dataSource = new kendo.data.TreeListDataSource({
      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 would look like this: <th class="name-header" style="text-align: right">...</th>.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article