Hiding all datagrid results (css or something)

0
I had a quick Mendix question. I currently want to add an export to excel to my project. I have managed to add it when using a datagrid, however on one of my pages I use a list view instead of a datagrid. So what I tried todo was just add the datagrid above the listview and then hide all the results so only the export to excel button is shown. Is there any way for me to hide every colum/row? As I cant seem to figure it out
asked
1 answers
0

It may be a better idea to use the export excel module, which allows you to customize your export (and put your button anywhere you want).  

https://docs.mendix.com/howto/integration/using-the-excel-exporter/

But I am sure you can also do it using css and javascript (not sure with only css)

Using javascript I would do the following :

Put a container that contain your datagrid, put it to display none or visibility hidden.

Then use javascript (html snippet, or nanoflow), to take the export button (use a specific class inside that button to retrieve it easily) and move it wherever you want, using appendChild(). 

Hope this helps

answered