reference selector use

0
I want to simply pick a record from a reference selector (or other widget) and have all the data associated with the record displayed. In most apps you would pick a record from a dropdown then a table or list view would be populated with all the details for the selected record. How is this done in Mendix?
asked
2 answers
0

David:

While I'm not the most proficient Mendix user, I believe that a common way to do this is to use a nested DataGrid and DataView.

For example, suppose you have an entity called Company that stores information about companies that manufacture computers. If you had a second entity called Computer that stored information about the computer models that each company manufactured, then you would expect to have a one-to-many relationship between Company and Computer called Computer_Company. In other words, each Company manufactures multiple models of Computers.

Here is an image from the Business Modeler showing how you could have a DataGrid showing the Companies. Then, you have a DataView that is listening to the Company selected in that top DataGrid. The DataView then contains a second DataGrid that selects what it displays over the association Computer_Company.

alt text

My guess is that there is good documentation of exactly how to do this if you search for 'DataGrid over association' in either the Mendix reference material or HowTo pages.

Good luck,

John

answered
0

John that is right on target. I actually used a data grid and a data view that listened to it. Add the grid view and associated it with the data and just show one field, the one that picks the data. Then add the data view associate it with the data and auto fill the data display. Double click the top of the data view where it shows data view data source. This opens a dialog where you pick listening widget with the data grid as the object you listen to. Very easy and works great. thanks

answered