Is there a way to show attributes of 2 different entities in one single data grid / list view?
1
Hi, I have a problem with how to deal with domain modeling. I attached an image of how my domain model looks like. Employees should be able to join multiple projects and a project can have multiple employees working on it. The main purpose of ProjectMember_Registration is to record the date when an employee joins the project. If the employee, later on, quit the project, his/her quit date will be recorded too. Now, In a project detail page, I want to show the information of employees that are active and inactive in the project. So I will need to show the name, start date, end date and status of the employees. I use a data grid in a project data view, but I can’t get all the information I need. The data grid will show either ProjectMember_Registration info or Employee info. Is there a way to solve this?
asked
Lisa Zeng
2 answers
2
Hi Lisa,
Yes.
I was able to display 2 entities on one list/grid view by the steps below.
Create a grid page and assign/select the datasource Entity property.
Right-click on the column you want to add additional entity info and click ‘Add column left/right’ whichever you prefer
Once a column is created, click on that new column and on the Data source properties, you can assign an attribute entity path
Let me know if that helps.
Ryan
answered
Ryan Eduardo Gadin
3
Hi Lisa,
the main entity of your data grid needs to be the ProjectMember registration. In a datagrid, you can always show attributes from associated objects, if the associated object is on the “1” side of your association. That means it will not work with *-* associations, but with 1-1 and with *-1 (as long as the main entity is on the * side).