Hi,
I would like to change the text color(sort of grayed out idea) of certain children of a treeview based on a criteria. But i'm having some trouble to edit any of them(css) at all. Do you have a example on how to change the color text of specific children?
Thank you in advance!
greetings,
Laurens
|
App.component.ts
<div id='treeparent'>
<ejs-treeview id='treeElement' #treevalidate [fields]='field' [cssClass]='cssClass'></ejs-treeview>
</div>
export class AppComponent {
public cssClass: string = 'mytree';
}
--------------------------------------------------------------------
App.component.css /*apply custom css to second level*/ .mytree .e-level-2 > .e-text-content .e-list-text { color: darkmagenta;
}
/*apply custom css to all the leaf nodes*/
.mytree .e-level-3 > .e-text-content .e-list-text {
color: royalblue;
} |
Hi
Thank you for your response, but maybe i should elaborate my query/request some more.
I have added a file(zip containing image) as an example. As you can see level 3 can have a mix of colors depending a certain criteria. Not all of level 3 are black and not all of level 4 are black.
How would I identify and then color a row based on your example?
greetings,
Laurens
Attachment: tempsnip_81c1193f.zip
|
<ejs-treeview id="template" [fields]="field">
<ng-template #nodeTemplate="" let-data="">
<div>
<div class="treeviewdiv" *ngIf="data.prority =='normal' ; else condition2">
<div class="normal">
<span class="treeName1">{{data.name}}</span>
</div>
</div>
<ng-template #condition2>
<div class="treeviewdiv" *ngIf="data.prority == 'high'; else condition3">
<div class="highlevel">
<span class="treeName2">{{data.name}}</span>
</ng-template>
<ng-template #condition3>
<div class="treeviewdiv">
<div class="lowlevel">
<span class="treeName3">{{data.name}}</span>
</ng-template>
</div>
</ng-template>
</ejs-treeview> |