Hi…
How can i change background in dataview…,i want different images as background for different items…, and also how can i change color when selected…, Attached pictures are before selecting item and after selecting item…, i want to change color when its selecting…
Hi,
the style for selected item is defined in the css. The defualt is:
.dhx_dataview_default_item_selected{
background-color:#FFBE31;
background-image:url(./imgs/dataview/selection_bg.png);
background-repeat: repeat-x;
}
To define colors for different items you may use templates
dhtmlxDataView/samples/02_templates/02_js.html
The example is:
data = new dhtmlXDataView({
container:"data_container",
type:{
padding:0,
template:function(obj){
return "<div style='height:100%;white-space:nowrap; overflow:hidden;background-color:"+(obj.color||"white")+"'>"+obj.text+"</div>";
},
height:40
}
});