|
public field:Object ={ dataSource: this.localData, id: 'id', parentID: 'pid', text: 'name', hasChildren: 'hasChild', htmlAttributes: 'htmlAttributes' };
public localData: Object[] = [
{ id: 1, name: 'Discover Music', hasChild: true, expanded: true, htmlAttributes:{class:"value"} },
{ id: 2, pid: 1, name: 'Hot Singles', htmlAttributes:{class:"value1"} },
{ id: 3, pid: 1, name: 'Rising Artists' },
{ id: 4, pid: 1, name: 'Live Music' },
{ id: 7, name: 'Sales and Events', hasChild: true },
<style>
.e-treeview .e-list-item.value > .e-fullrow {
background-color: blue;
}
.e-treeview .e-list-item.value1 > .e-fullrow {
background-color: skyblue;
}
</style>
]; |