I want to add icon before the tree view in ag grid in first column before the collapse and expand arrow and also the leaf level.. how can i write custom render for this thing.
Customize tree icon on ag grid
1.4k views Asked by user1697114 At
2
There are 2 answers
0
On
Adding Icons before the Expanding/Collapse arrow is not possible out of the box using Cell Renderer Components, however you can leverage CSS to do this.
For example, targeting the grouping nodes and then adding an icon (in this case, Font Awesome icon):
.ag-theme-alpine span.ag-row-group::before {
font-family: 'Font Awesome 5 Free';
font-weight: bold;
content: '\f00d';
color: red;
}
Please see the following example to see how: https://plnkr.co/edit/Dn5nIqzyaeOFld9q
You can add icon or button in first column in tree view as below:-