hide data grid via scss if empty

2
i have used the following technique to hide list views when empty:  add class in menidx on css:    .listclassname> ul > li.mx-listview-empty {     display: none;   } does anyone know if something similar can be done for a data grid?
asked
4 answers
2

Hi Corina,

In mendix Atlas UI it is not possible to hide the datagrid on no list found through CSS.

you can use the datagrid extension widget for achieving this in that one tab will be there as empty table in that tab you can configure in such a way that you show a message or you can leave it as empty or anything.

 

Hope that widget meets your requirements.

answered
0

Hi Corina,

 

I don’t know whether data-grid visibility can be achieved through scss or not . But Pls check below steps to achieve this in other way.

 

Create a non persistable entity with boolean attribute.

 

  1. if you are calling the page which has data grid from navigation item directly, then instead of directly calling the page. Call the microflow, In the microflow, retrieve all objects which you are using for datagrid. Check the count of the retrieved list . if it is greater than 0 , then update non persitable entity boolean variable as true.
  2. In your page, add data view with data source selecting the non persistable entity,

Inside the dataview , add your datagrid with conditional visibility. If boolean is true then only your datagrid will be visible.

answered
0

Hi Corina,

 

I would suggest upgrading to data grid 2 , this functionality come by default .

 

Thanks

answered
0

If a list is empty, it always shows the text 'No items found'. If you want to remove it; add a custom class to your styling with this styling. Add the class to the specific listview and the text will be removed.

answered