Ag Grid valueGetter pulling data from separate table

Is it possible to pull data from a separate AgGrid?

Presumably I would need to specify the grid id (?), column and the rowId.

{
    "field": "vol_total",
    "valueGetter": {"function": "calculateVolTotal(params)"},
},
dagfuncs.calculateVolTotal = function (params) {
   
    // area from local table
    const area = params.data.area
    // height from separate table
    const height = TODO

    return area * height;
}

Hello @Redhotmoons,

Yes, this is possible.

While utilizing the built in dash_ag_grid.getApiAsync you can query node info from any grid that is loaded into the DOM (webapp active page and/or tab depending on the tabs).

Here is the full list of api’s available for use at this endpoint:

You can also use the columnApi if you needed to.

The api you’ll want to use is this:

You’ll need the id.

1 Like