Hi,
is it possible to set a style per item in a dataview?
I have several items in a dataview and they have a status: assigned or unassigned. Depending on this status I want the background color of the item to be green or the default color.
I tried it like this:
view = dhxLayout.cells("a").attachDataView({
type:{
template: function(obj){return obj.status+"<br>"+obj.Company+" :"+obj.Task+"<br/>"+obj.Description+"</div>"},
css:function(obj){if(obj.status=="assigned"){return "green"} else {return ""}}
})
But that doesn’t seem to work, do you have some advice on how to handle this?
kind regards,
Arno.