I cannot really tell you why this is, but in this case I would always set the data source to xPath and just leave the xPath empty.
Hope this helps!
yes I did the same thing but its really strange why it does not allow database retrieval !!!
As Matteo stated you need to set the data source to xpath. One notable mention here is that you export what you see. If you have 500 entries in your database, but you only show 10 in the grid – it will export these 10.
the same goes for filtered data. When you applied some search filters, the export will only contain the filtered entries that are currently displayed by the grid on that page.
An alternative to this is to set up the excel exporter module. https://docs.mendix.com/appstore/modules/excel-exporter/