The following is stated on the documentation page:
The data grid supports the following types of data sources: Database Source, XPath Source, Association Source, Microflow Source. The database and XPath sources retrieve objects from the database and supports searching and sorting. The database source can also be used in offline applications. The association source follows an association from the enclosing data view to get to the objects. Finally, the microflow source calculates the list of objects by executing a microflow.
While the primary difference lies in support for (or lack of) offline pages/apps, there are also some known limits such as the Export to Excel functionality not being available when you select Database as source.
See also https://docs.mendix.com/refguide/data-grid for more details.
Hi Renita,
As far as I know, using the DB will/can also work in Offline mode while XPath will not.
Another difference is that when you used the constrained by on reference selectors it will be updated in realtime, while using Xpath constraint will not.
Those are the differences I know about,
Andrej
Hi Renita,
if we have any page component which use Xpath as data source will always issues a retrieve request.
Components that use Database as data source will attempt to use data stored in the device or browser before retrieving fresh data.
Use Database retrieval whenever possible for efficiency.
Use XPath retrieval when you need advanced filtering and cannot rely on associations.