Solution using ViewEncapsultion.None
private createTreeGridColumns() { // method for dynamic column
return [
{
field: "taskID",
headerText: "Task ID",
editType: "defaultedit",
customAttributes: { class: "customcss" }
},
];
} |
Your CSS code:
.e-treegrid .e-headercell.customcss {
font-family: 'sans-serif';
color: blue;
text-align: start;
border-style: none;
}
Modified code:
.e-treegrid .e-headercell.customcss {
background-color: #2382c3;
font-family: "sans-serif";
color: red;
text-align: start;
border-radius: 50px;
}
|
Your CSS code:
<ejs-treegrid id='TreeGrid' ….. (rowDrop)='rowDrop($event)'
(rowDragStart)='rowDragStart($event)' (rowDrag)='rowDrag($event)' [columns]="treeColumns" rowHeight='60' [gridLines]='lines' >
Modified code:
<ejs-treegrid id='TreeGrid' … (rowDrag)='rowDrag($event)' [columns]="treeColumns" rowHeight='30'
[gridLines]='lines'>
|
// change the style on rows
e-treegrid .e-rowcell.customcss {
border-radius: 10px 0 0 10px;
}
.e-treegrid .e-rowcell.e-unboundcell { // last cell of the row
border-radius: 0 10px 10px 0;
}
.e-treegrid .e-table {
border-collapse: separate;
border-spacing: 0 1em;
background-color: #e0dbf3;
border: none;
}
.e-treegrid .e-rowcell {
border: none;
}
…
// change the style on header row
.e-treegrid .e-headercell.customcss {
border-radius: 10px 0 0 10px;
}
.e-treegrid .e-headercell.e-lastcell.e-rightalign {
border-radius: 0 10px 10px 0;
}
|