Filtering Data Grid Based on X Value and Conditional Data Grid Visibility

  Hi everyone, I'm working on a Mendix application that displays data from an Excel sheet using two Data Grids: Main Folders: Displays the first column of the sheet. (Working as expected) Sub Folders: Displays the second column of the sheet, containing independent data. My question is two-fold: Filtering Data Grid 2: How can I add a constraint to the XPath expression used by the second Data Grid? I want it to stop iterating and not display any further rows if the value in the second column itself is equal to "x". Conditional Data Grid Visibility: How can I initially hide Data Grid 2 and make it visible only when a user clicks on a row in the first Data Grid (Main Folders)? Current Approach: Data source: Excel sheet Mendix version: 9.24
1 answers

First, add a non persistent helper entity to the page. Create an association from the helper to the entity that is displayed in the first dg2.


Create an on click event at the first datagrid. within this event microflow, set the association mentioned above. 


In the second datagrid, add the xpath constraint so that the value matches the selected value (associated value from the helper entity) 


You can hide the second datagrid using a visibility rule that checks the association set between the helper entity and the object selected in the first datagrid. The association should not be empty for the second datagrid to be displayed.