Database Source

4 minutes to read Download PDF Edit

The data source properties determine which objects will be shown in the data grid. The list of objects in the data grid is constrained by the following mechanisms:

  1. Access rules on entities limit which objects you see. You only see objects you are allowed to see.
  2. For nested data grids, if an entity path is used, only the objects reachable by following the path from the containing object are shown.
  3. With the XPath constraint property you can manually limit the objects in the data grid.
  4. If the context is applied (property ‘Apply Context’), the context mechanism limits the object based on references they have to objects in the context.

Components

See Search Bar.

Sort bar

See Sort Bar.

Properties

Entity (Path)

The entity (path) property specifies of which entity instances will be shown in the data grid. A top-level data grid is always connected to an entity. A nested data grid can either be connected to an entity or to an entity path starting in the entity of the containing data view. The entity path follows one association of type reference starting at the side where the ‘0’ is.

With this property you can influence the visibility of the search bar.

Value Description
Never No search bar and no search button is shown.
With button (initially open) The user can open and close the search bar using the Search button and the search bar is initially open.
With button (initially closed) The user can open and close the search bar using the Search button and the search bar is initilly closed.
Always The search bar is always open and there is no Search button.

Default value: With button (initially closed)

This setting defines whether the contents of the grid are immediately visible or that first a search has to be performed. This is useful for grids with very large amounts of objects that do not need to be browsed all at the same time.

Default value: false

XPath constraint

With the XPath constraint, you can add a manual constraint to your data grid. This XPath constraint will be added to the constraints that are generated by the context mechanism and the (optional) path. Note: preferably use access rules to limit the objects in the data grid. See the introduction of data source properties above.

Apply context

The property ‘Apply context’ indicates whether the context mechanism will be used to constrain the list of objects in the grid. See Context Mechanism for more information.

Default value: False

Remove from context

Using this property you can remove objects from the context. If you remove objects of a certain entity from the context they will not be used to constrain the list of objects and neither to automatically set references of objects created by using a standard New button.

See Context Mechanism.

Copyright © Mendix. All rights reserved. | Mendix.com | Terms of Use | Privacy Policy