Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

SPView.GroupByFooter Property

Gets or sets the definition of the Group By footer that is used in the view.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Public Property GroupByFooter As String
Dim instance As SPView
Dim value As String

value = instance.GroupByFooter

instance.GroupByFooter = value

Property Value

Type: System.String
A Collaborative Application Markup Language (CAML) string that contains the footer definition.

Setting values through the GroupByFooter property requires using the Update method for changes to take effect in the database.

The following code example uses the GroupByFooter property to customize the Group By footer area in a view and adds a link to a document library that is located

in the site.

Dim siteColl As SPSite = SPControl.GetContextSite(Context)
Dim site As SPWeb = siteColl.AllWebs("Site_Name")
Dim list As SPList = site.Lists("List_Name")
Dim view As SPView = list.Views("View_Name")

view.GroupByFooter = 
        "<Switch><Expr><GetVar Name='OnlyOneItem' /></Expr>" _
    & "<Case Value='1'><HTML><![CDATA[<td>&amp;nbsp;</td>
        <td width='50%'>&amp;nbsp;</td>]]>" _
    & "</HTML><SetVar Name='OnlyOneItem' Scope='Request' 
        Value='0' /></Case>" _
    & "</Switch><HTML><![CDATA[</TBODY>]]></HTML><Switch><Expr>" _
    & "<GetVar Name='GroupByIndent' /></Expr><Case Value='0'><HTML>" _
    & "<![CDATA[<TBODY id='foot]]></HTML>
        <GetVar Name='GroupByLevelString' />" _
    & "<HTML><![CDATA[_'>
        <TR BORDERCOLOR='darkcyan'><TD>&lt;BR&gt;</TD>" _
    & "<TD STYLE='border-style:double' width='100%' BGCOLOR='beige'         class='ms-gb2'>" _    & "<A href='/Site_Name/DocLib_Name'>        See Documents</A></TD></TR></TBODY>]]></HTML>" _
    & "</Case><Default /></Switch><Switch><Expr>
        <GetVar Name='GroupByCollapse' />" _
    & "</Expr><Case Value='TRUE'>
        <HTML><![CDATA[<SCRIPT>ExpCollGroup(']]></HTML>" _
    & "<GetVar Name='GroupByLevelString' />
        <HTML><![CDATA[','img_]]></HTML>" _
    & "<GetVar Name='GroupByLevelString' />
        <HTML><![CDATA[');</SCRIPT>]]></HTML>" _
    & "</Case><Default /></Switch>"


Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

© 2015 Microsoft