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="gantt"></div>
<script>
$("#gantt").kendoGantt({
dataSource: [
{
id: 1,
orderId: 0,
parentId: null,
title: "Task1",
start: new Date("2014/6/17 9:00"),
end: new Date("2014/6/17 11:00")
},
{
id: 2,
orderId: 1,
parentId: null,
title: "Task2",
start: new Date("2014/6/17 12:00"),
end: new Date("2014/6/17 14:00")
}
],
columns: [{
field: "title",
attributes: {
"class": "highlight",
style: "text-align: right"
}
}, {
field: "start"
}]
});
</script>
<style>
.highlight {
color: red;
}
</style>
// The table cells look like `<td class="name-cell" style="text-align: right">...</td>`.