Difference Between Database as a Data Source and XPath as a Data Source for a Data Grid

2
Hi All, I am trying to understand if there is any difference between choosing an entity from the DataBase as a source vs choosing an entity using the XPath option when selecting a data source for a Data Grid. Both options provide the same result. This also works with setting Constraints on an entity using the Database option and using a XPath constraint on the entity using the XPath option for selecting the Data Source. Is there any significant point of differentiation between these two methods for selecting a datasource?
asked
2 answers
3

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.

answered
1

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

answered