adding a column in datagrid 2 which points to the name of an associated entity
I’m almost embarrassed to ask this, but I cannot figure this out from the standard Mendix documentation. I’m trying to convert from the classic datagrid on a page to datagrid 2 using StudioPro 9.13.1. Say the datagrid 2 is on orderitem, and I want to have the associated order entity name attribute in the orderitem datagrid 2 in a column. In datagrid (classic), no problem. Just add a column and then find the associated attribute, and presto. In datagrid 2, eh? I can add columns on the attributes of the orderitem entity no problem, but nowhere do I see the association to the order entity, nor can I find the order entity name attribute. Played with the different column type content options, but am lost as to how to use which as the classic Mendix documentation is not very instructive (as usual). So, community to the rescue? How does one add the order entity name attribute in the grid that is using the orderitem entity as source?
Ron de Vries
It should be as straightforward as you describe it:
Add a column (Click on the data grid, go to the properties (panel on the right, columns, …, new, )
It should start with listing the attributes of your entity (OrderItem) and also list any associated entities (if the association is [1-1] or [1-*]), expand the entity and select the attribute.
I've had some issues with DataGrid2 as well (attributes not displaying in the browser while selected properly, no read rights on a given row+attribute breaking the entire page, not showing the added columns in Studio). So configuring it might be still a bit flaky, try to select the entity and 1 or 2 attributes from OrderItem first, save the lot, and then reopen the properties of DataGrid2 and see if Order shows up