What is the css class for hiding datagrid column

0
What is the css class for hiding datagrid column?
asked
3 answers
1

Hi John,

 

Could you elaborate on the use case that you are trying to implement here

 

 If you are needing to display different columns for different user roles I would suggest that you actually display completely different grids to each user role.  An element hidden by styling is simply not displayed but is still on the page and could pose security risks.

 

Let me know if the above makes sense or is relevant to the case that you are trying to implement.

answered
1

Hi John,

I think we can't do this in DataGrid(not sure), instead you can use list view and apply conditional visibility to required columns.

Thanks

answered
0

I know it is possible, but it gives headache on maintenance/handover and if you add an excel/csv export to that grid those hidden columns are exported too.

 

If complexity is added, i prefer it to be on standard mendix logic:

- Create snippets of the datagrid, with the different colum-arrangements

- Add an enumeration (could be done with a helper object on a dataview) with the different options to contidionally displays the right snippet. 
- create a selector with the enumerated attribute to choose the value of the enumeration (and the right snippet will be shown)

 

answered