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
close icon

Component methods not available from within value accessor

I use value accessor in my grid. I found out that I do not have access to other members (fields, methods) in the same component. Why is that?

<ejs-grid valueAccessor="formatColumn">

public formatColumn(field, data, column) {
   return this.foo();
foo() {
   return 'foo';

1 Reply

RR Rajapandi Ravi Syncfusion Team November 9, 2022 08:45 AM

Hi Ignacy,

Greetings from Syncfusion support

We have checked your shared information and we could see that you are defining the valueAccessor property in the (<ejs-grid>) Component initialization and trying to access the other members. By default, the valueAccessor property is used for column level and using this feature you can customize the value and displayed in the column level. You can access the field, data, column in the valueAccessor function. Please refer the below sample and documentation for more information.

Sample: https://stackblitz.com/edit/angular-vghpzx?file=app.component.ts,app.component.html

Documentation: https://ej2.syncfusion.com/angular/documentation/grid/columns/columns/#valueaccessor


Rajapandi R

Live Chat Icon For mobile
Up arrow icon