1
votes

I've created the following Plunkr:

https://plnkr.co/edit/UX7qeeul5SfWXtV9rYcf?p=preview

and have added the following code:

  statusBar: {
    statusPanels: [
        { statusPanel: 'agFilteredRowCountComponent' },
        { statusPanel: 'agSelectedRowCountComponent' },
        { statusPanel: 'agAggregationComponent' }
    ]
},

from:

https://www.ag-grid.com/javascript-grid-status-bar/#example-status-bar-simple

However, I am not getting status bars.

Are they supported in the server side model?

2

2 Answers

1
votes

Seems that is an issue of default statusPanel.

Cuz I've checked with custom and it works, here is a sample

*check console, getRangeSelections and getSelectedRows works as expected, so you can try to create own statusPanel with same logic while it wouldn't be fixed.

1
votes

I believe the issue with your specific example is that you are unable to actually select a ROW of data in your example. Instead you seem to only be able to select individual nodes. The status bar will only appear if an entire row is selected regardless on the data source

As well this is an excerpt from filterRowsComp.ts line 26 for within Ag grid:

// this component is only really useful with client side rowmodel
    if (this.gridApi.getModel().getType() !== 'clientSide') {
        console.warn(`ag-Grid: agFilteredRowCountComponent should only be used with the client side row model.`);
        return;
    }

Showing that the default filtered data status bar panels will only work correctly with client side data.