1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Using ng-template as cellRenderer in ag-grid / Angular 5

Discussão em 'Angular' iniciado por rattkin, Novembro 6, 2024 às 20:22.

  1. rattkin

    rattkin Guest

    It would seem that whenever you want to customize the output of the cell by something more than just text transformation, you need a cellRenderer. But it requires a whole new component to fulfill that goal. That approach is, in general, fine, but I've found that in my project I'm using grids a lot, and I need custom cell renderers for them. Most of the time they are also not re-usable and specific to particular grid. The overhead for creating (and storing somewhere in the filesystem) another component, just for the sake of providing an HTML template structure, seems a bit overkill to me.

    Is there a way to render a cell in Ag-Grid, without specifying a full-blown component, inheriting from AgGrid renderers? For instance, can I just use ng-template with #id reference, that I could pass somehow to Ag-Grid?

    Continue reading...

Compartilhe esta Página