Customize column styles in TypeScript Treegrid control
18 Nov 20181 minute to read
You can customise the appearance of the header and content of a particular column using the customAttributes property.
To customize the Tree Grid column, follow the given steps:
Step 1:
Create a CSS class with custom style to override the default style for rowcell and header cell.
.e-treegrid .e-rowcell.customcss{
background-color: #ecedee;
color: 'red';
font-family: 'Bell MT';
font-size: 20px;
}
.e-treegrid .e-headercell.customcss{
background-color: #2382c3;
color: white;
font-family: 'Bell MT';
font-size: 20px;
}
Step 2:
Add the custom CSS class to the specified column by using the customAttributes property.
{ field: 'taskName', headerText: 'Task Name', customAttributes: {class: 'customcss'}, width: 100 },You can refer to our
JavaScript Tree Gridfeature tour page for its groundbreaking feature representations. You can also explore our JavaScript Tree Grid exampleJavaScript Tree Grid exampleto knows how to present and manipulate data.