I rephrased my question and got it working (adding filters to a custom grid, that was made with a custom data provider). See question and answer here: Create filterable admin grid from external database table

  • Try to put <filters name="listing_filters"/> in <listingToolbar /> tag above the <paging name="listing_paging"></paging> tag in your xml file. Sep 8, 2020 at 8:15
  • I did and the filter options appear above the grid - but they dont apply to the grid, once I input some values to any filter field...
    – Mario
    Sep 8, 2020 at 9:41

1 Answer 1


Ok, I finally found my mistake(?!) - I can get the applied filters in my data-provider php file by using the SessionManagerInterface:

use Magento\Framework\Session\SessionManagerInterface;

class YourClassname extents AbstractDataProvider
  protected $session;
    public function __construct(
        RequestInterface $request,
        UrlInterface $urlBuilder,
        Collection $collectionFactory,
        FilterBuilder $filterBuilder,
        array $meta = [],
        array $data = [],
        Data $helper,
        SessionManagerInterface $session
    ) {
        parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
        $this->collection = $collectionFactory->load();
        $this->helper = $helper;
        $this->request = $request;
        $this->filterBuilder = $filterBuilder;
        $this->urlBuilder = $urlBuilder;
      public function getData()



If anyone faces same problems, feel free to ask.

Some more code from this module and (basically the same) question from me with solution can be found here: Create filterable admin grid from external database table

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.