Expand/Collapse Capability...using data grid?

Hi Mendix Community! I was wondering if anyone might be able to point me to any ways (if possible) to have a data grid that allows the end user to “expand” an entity so that they can see more attributes. I want the user to not be overwhelmed with multiple ‘columns’ of attributes, and to be able to see the long list of attributes only when they want to for specific items via an expand/collapse capability. So maybe another idea is to have a pop up window showing this, but I would prefer an expand/collapse capability, as I the end user will want to compare a couple expanded entity inputs at a time. Any ideas at all are much appreciated! Also, apologies if the ask is unclear...I am happy to clarify :)  Best, Alex
2 answers

Hi, there are a couples of ways to do this, here are 2 ideas:

One of the more obvious ones is to use the default Mendix group box widget in combination with a list view. 
You start of by showing the desired attributes above the groupbox or in the groupbox header. The rest you can show inside the groupbox. With some styling you can let the listview look a bit like a datagrid.

Another solution would be to ‘ hide’  columns by default and let users add them if they wanted to, this is possible for example with this widget https://marketplace.mendix.com/link/component/2702 (will also be possible with datagrid 2.0 in Mx9)




One of the solutions is to use a listview with hover option as available in SASS. At the moment you hover over the entity you expand the view. See below on an example I made:

Without hover:



With hover:


You can also enlarge the area that is visable via Sass.


I hope this helps.