Hiding Data Grid if no data is entered

0
Hi, I have a Mendix Page with multiple (more than 5) data grids. I would like these data grids to not be visible but once data is entered into the data grid (through associated forms), I would like these tables to be visible  What expression or other visibility condition should I use default to not showing data, then once data is entered it will appear on the page. Thanks,
asked
1 answers
0

You can use a context page object to switch visibility on the datagrids inside. To set the right values in that object, you have 2 easy options:

  1. Retrieve the first object. If you get no object, switch visibility off. If you get it, it's on.
  2. Retrieve a list of objects and do a count immediately after without using the list further on. The count retrieve is optimised to actually not get objects in memory. Based on the count you can easily switch visibility as well.
answered