We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom CSs

Thread ID:





144801 May 23,2019 12:29 PM UTC May 24,2019 12:46 PM UTC Angular - EJ 2 1
Tags: TreeGrid
Asked On May 23, 2019 12:29 PM UTC


In Treegrid Component need to apply the custom CSS. Could you please Let me know the solution as soon as possible .

Thanks in Advance 



Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On May 24, 2019 12:46 PM UTC

Hi Sunithra, 

Thanks for contacting Syncfusion Support. 

QUERY: Need to apply Custom CSS in TreeGrid 
In Syncfusion we have “Theme Studio” to customize new themes for our components. It supports TreeGrid Component. You can use this Theme Studio for customizing the TreeGrid. Please refer to the below link, 

Also please refer to the attached document to modify the TreeGrid appearance by overriding the default CSS of the TreeGrid.  

We have logged a task to create “how to section” for styling the TreeGrid Component in our Documentation Page. We will let you know once it is refreshed. 

In TreeGrid, we also have “cutomAttribute” API . Using this, the CSS styles and attributes of the content cells of a particular column can be customized. Please refer the below help documentation, 

You can customize the grid cells by adding a CSS class to the customAttribute property of the column. 

In app.style.css 

.e-attr { 
    background: #d7f0f4; 

    field: taskID, headerText: 'Task ID', customAttributes: {class: 'e-attr'}, width: '90' 

In the below example, we have customized the cells of OrderID and ShipCity columns. 

In app.component.ts 

import { Component, OnInit, ViewEncapsulation } from '@angular/core'; 
import { sampleData } from './datasource'; 

    selector: 'app-root', 
    template: `<ejs-treegrid [dataSource]='data' height='300' [treeColumnIndex]='1' childMapping='subtasks' > 
                    <e-column field='taskID' headerText='Task ID' [customAttributes]="{class: 'e-attr'}" 
                    textAlign='Right' width=90></e-column> 
                styleUrls: ['app.style.css'], 
                encapsulation: ViewEncapsulation.None, 

export class AppComponent implements OnInit { 

Please get back to us if you need any further assistance. 

Farveen sulthana T 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon