1

In a SP2013 List that is grouped by field 1 and then field 2, I need css or jquery help to hide the column totals at the first .ms-gb level but show the totals at the .ms-gb2 level.

Thank you!

1

Hide the group totals in a SharePoint 2013 classic view

<style>
    .ms-gb>span{
        display:none !important;
    }
</style>

Result

enter image description here

enter image description here

Hide Totals for the first level only

$(".ms-listviewtable tbody[id^='aggrWP']").hide()

Hide Totals for the first level only (ms-gb)

$( document ).ready(function() {
   $(".ms-gb").parent().parent().next().hide()
});
10
  • Denis, This is not hiding anything on my list. I'm specifically trying to hide the totals for Group 1 but display the totals for Group 2
    – ChasEpes
    Mar 29 at 19:48
  • 1
    I see. I've updated the answer with a jQuery that hides the first level totals. Mar 29 at 20:23
  • 1
    Denis, thank you very much for rewriting your code. I Still have a question. In my list view which is grouped at two levels, the totals looks like this: - Grand Total - Grouping 1 Total - Grouping 2 Total Your code hid the Grand Total which is great but I also need to hide the Grouping 1 Total. Unfortunately, I cannot figure out how to distinguish between Grouping 1 Total and Grouping 2 Total.
    – ChasEpes
    Mar 30 at 12:08
  • 1
    Let us continue this discussion in chat. Mar 30 at 16:44
  • 1
    Denis: Your code works now! Most importantly, you taught me how the code works and how to craft it for other uses! Thank you very much for sticking with me on this! Cheers-
    – ChasEpes
    Apr 1 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.