Hi Admins, is there any possible to Colorize Tasks in gantt [PHP] FOR EXAMPLE:
<script>
function onDataBound() {
var gantt = this;
gantt.element.find(".k-task").each(function(e) {
var dataItem = gantt.dataSource.getByUid($(this).attr("data-uid"));
// colorize task per business requirements
if (dataItem.id = 904) {
this.style.backgroundColor = "#f99";
} else {
this.style.backgroundColor = "#9f9";
}
});
}
</script>
But this dosen't work in php gantt, can you please help, and tell what is the way to get colored tasks depending on values for example:
$idField = new \Kendo\Data\DataSourceSchemaModelField('id');
$idField->type('number')
->from('ID')
->nullable(true);
Thanks