bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.
https://pluto.weblaze.dev
MIT License
664 stars 305 forks source link

[Help] How to get a row count after a columnfilter is applied? #874

Closed eebeeDEV closed 1 year ago

eebeeDEV commented 1 year ago

Hi,

Is there an event when a columnfilter is applied ? Or how can I display the number of records after applying a filter?

Best, Eric

eebeeDEV commented 1 year ago

I found it (thanks to copilot :) ), but if anyone has a better solution, please submit To show the counter in the footer, add a footerRender :

PlutoColumn(
          title: 'Client Name',
          field: 'clientName',
          type: PlutoColumnType.text(),
          enableEditingMode: false,
          width: 200,
          backgroundColor: color_grey_1,
          footerRenderer: (context) {
            return PlutoAggregateColumnFooter(
              rendererContext: context,
              type: PlutoAggregateColumnType.count,
              format: 'Rows: ##.###',
              filter: (cell) => true,
            );
          },
        ),
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.