I need to create a simple grid in admin section, which contains all orders filtered by customer's email. I can't figure it out how I can fill the grid with custom data. All the examples found online create a custom table and then populate the grid with the data retrieved by that table. I don't need it. I just want to get all orders filtered by customer's email as I mentioned before.
Thank you in advance.
How to Create a Grid in Magento 2
adminbackendgridmagento2
Best Answer
I know that it is not as simple that follow a tutorial but I recommend you to check the Magento 2 CMS core module.
You will see how Magento creates CMS block and pages grid.
Then copy/paste and adapt the impacted files to follow your needs.
You will learn more features this way and become more independent.
This is a non exhaustive list of useful files :
I hope it will be useful for you.
In order to populate the grid data, create your custom Grid Collection as Datasource or reuse the order grid collection.
For orders in
vendor/magento/module-sales/etc/di.xml:799
Feel free to ask some extra details.