We use SharePoint and DVWP for getting items from InfoPath Form library. In DVWP we enabled 4-level grouping. And rows with group headers looks like this:

  • Month: Value
    • Type: Value
      • Category: Value
        • Subcategory: Value

And this looks good except behavior when one of grouping fields contains blank values. In this case - we can see expanded grouping rows with group headers which looks like "field_name: " except "field_name: value".

Is it possible (with jQuery or with XSL) to hide this rows (which contain group header with blank field value) from DVWP?

Any help will be appreciated.

1 Answer 1


I assume that you just want to remove the grouping header row and not the items in the grouping. I think that addressing this directly in XSL would be the best way. In your XSL template, add a validation against the group field value (should be $fieldvalue)

You can put this in your specific grouping template :

<xsl:if test="$fieldvalue != ''"> <!-- grouping header --></xsl:if>

or in the body template :

<xsl:if test="$groupheader0 != ''"> 
    <xsl:call-template name="dvt_1.groupheader0">
    <!-- params -->


Month: July




Month: July



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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