I'm wondering what the best practice is for displaying a table (with data from multiple fields
) within a cell in ag-grid
?
I think I can get it to work with formatting the entire table as an html string and passing that to the grid as the field
and using a cellRenderer
, however I'd rather not have that kind of view logic on the server-side.
I'd really like for the column definition to be able to take in more than one field, but it doesn't seem like that's possible.
Any ideas? Thanks.
You can define a valueGetter
for the desired column in column def.
Here is a sample -
valueGetter:
function sumField(params) {
return params.data.a + params.data.b
}
Value getters example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With