GroupByHeader element (List)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Contains the definition of a Group By Header section in a view of a list.

<GroupByHeader>
</GroupByHeader>

Note

Most standard Microsoft SharePoint Foundation 2010 list views ignore this element. For more information, see XMLDefinition and CAML View Schema.

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

None

Child elements

Numerous

Parent elements

Occurrences

  • Minimum: 0
  • Maximum: 1

Example

The following example from the Schema.xml file for custom lists defines the Group By Header section in a view.

<GroupByHeader>
  <HTML><![CDATA[<TBODY id="titl]]></HTML>
  <GetVar Name="GroupByLevelString"/>
  <HTML><![CDATA["><TR]]></HTML>
  <Switch>
    <Expr>
      <GetVar Name="GroupByIndent"/>
    </Expr>
    <Case Value="0">
      <HTML><![CDATA[ class="ms-gb" ]]></HTML>
    </Case>
    <Default>
      <HTML><![CDATA[ class="ms-gb2" ]]></HTML>
    </Default>
  </Switch>
  <HTML><![CDATA[><TD colspan="100" nowrap>
    <img src="/_layouts/images/blank.gif" alt="" height=1
    width=]]></HTML>
  <GetVar Name="GroupByIndent"/>
  <HTML><![CDATA[><a href="javascript:"
    onclick="javascript:ExpCollGroup(']]></HTML>
  <GetVar Name="GroupByLevelString"/>
  <HTML><![CDATA[','img_]]></HTML>
  <GetVar Name="GroupByLevelString"/>
  <HTML><![CDATA[');return false;"><img id="img_]]></HTML>
  <GetVar Name="GroupByLevelString"/>
  <HTML><![CDATA[" src="/_layouts/images/minus.gif" alt="]]></HTML>
  <HTML>Expand/Collapse</HTML>
  <HTML><![CDATA[" border="0"></a>&amp;nbsp;]]></HTML>
  <GetVar Name="GroupByField" HTMLEncode="TRUE" />
  <HTML><![CDATA[ :&amp;nbsp;]]></HTML>
  <GetVar Name="GroupByValue"/>
  <HTML><![CDATA[</TD></TR></TBODY>]]></HTML>
  <HTML><![CDATA[<TBODY id="tbod]]></HTML>
  <GetVar Name="GroupByLevelString" HTMLEncode="TRUE"/>
  <HTML><![CDATA[_">]]></HTML>
</GroupByHeader>

See also