i have used "group by" some field(boolean) in my View,. so the results are dipslayed in 2 sets ,. is there any way that i can hide a column in the first set and hide another column in the second set?,. i have checked $view is hook_views_pre_render,. but the $view there doesnt seems to have any separate variables/objects for the 2 groups!

Comments

jason_gates’s picture

cosminadrianpopescu’s picture

Dude, sorry, but this is a perfectly legitimate question. If you never needed to hide some column in a table display, then I wonder what kind of "Senior Analyst Programmer" you are. Seriously...

cosminadrianpopescu’s picture

And on a more constructive note, the solution is:

you add a class on the table from CSS class field (for example my-view-class), and then you set a css rule in your css file:

.my-view-class .views-field-[the id of the field you want to hide]{
display: none;
}

For example, if you want to hide the nid field, you would have the following classes in your css:

.my-view-class .views-field-nid{
display: none;
}