Security on Grid group level / fields

Is there a way to hide/show some columns on the grid, depending of the User Role (Security-module) ?

Is there a way to hide/show only parts of the list (like a group by of the query AND Where)

Ex : for a list of team member, I don’t want to show all team of a specific departement to the other one.

If not, the only way to implement it (I guess) would be to duplicate the application and hide some columns ?

What I have done is set my own security group session variable at login and then use it to
sc_field_display(field_name,off);

i did this by using an IF THEN sc_field_display(field_name,off); in the OnScriptInit
when a user logs in i give him a global depending on it’s rights

an other way is to show a menu item depending on the rights and set a var [glob] in the menu when a user clicks on a certain menu then this var is the key in the IF THEN to show or hide some fileds.