Value accessor

Hello,

Could you help me how to use value accessor in treegrid if I want to use format also. like  https://stackblitz.com/edit/angular-davotb-suinef?file=default.component.ts.

Also I want to know can I add custom css according to value accessor ? If yes,could you provide demo.




Regards,
Wilma Hill.


1 Reply

MP Manivannan Padmanaban Syncfusion Team May 19, 2020 12:46 PM UTC

Hi Wilma, 

Greetings from Syncfusion Support. 

Query 1: how to use value accessor in treegrid  

As like grid(i.e. shared link), we are able to define the valueAccessor property in the treegrid columns and which will help to achieve custom value formatting. Refer to the below help documentation links, 

Query 2: can I add custom css according to value accessor  

The valueAccessor property will be used only to access/manipulate the value of display data and which is helps for custom value formatting. So, using valueAccessor we are unable to customize the cell styles. For that we suggest you to use the queryCellInfo event of tree grid. 
 
Refer to the below help and API documentation links. 
 
Also, refer to the demo link below. 
 
Kindly get back to us, if you need further assistance. We will be happy to assist you. 

Regards, 
Manivannan Padmanaban 


Loader.
Up arrow icon