New to Telerik UI for Silverlight? Download free 30-day trial

Column Footers

RadGridView allows you to display additional information which applies to the columns in a specific row placed at the bottom of the control. This row consists of individual footer cells for each column.

By default, column footers are hidden and in order to make them visible you have to set the ShowColumnFooters property to True.

Example 1: Show column footers

<telerik:RadGridView ShowColumnFooters="True"> 
  <!-- ... --> 
</telerik:RadGridView> 
To set the value of the footer cells, you can use the Footer property of the columns.

Example 2: Set the content of the footer cells

<telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding EmployeeID}" Footer="Footer cell" /> 

Figure 1: RadGridView with footer cells

Telerik Silverlight DataGrid Column Footers 1

Because it is of type object, you are not limited to just using plain text. For example, you can add a corresponding picture to the footer text.

Example 3: Adding an image to the footer content

<telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding EmployeeID}"> 
    <telerik:GridViewDataColumn.Footer> 
        <Grid> 
            <Grid.ColumnDefinitions> 
                <ColumnDefinition Width="Auto" /> 
                <ColumnDefinition /> 
            </Grid.ColumnDefinitions> 
            <Image Stretch="None" Source="../../Images/User.png" Margin="0,0,5,0" /> 
            <TextBlock Text="The Id of the employee" VerticalAlignment="Center" TextWrapping="Wrap" Grid.Column="1" /> 
        </Grid> 
    </telerik:GridViewDataColumn.Footer> 
</telerik:GridViewDataColumn> 

Figure 2: Image in the footer cell

Telerik Silverlight DataGrid Column Footers 2

Aggregates

Column footers are also used to display aggregated information on the data displayed in the column via aggregate functions.

Example 4: Adding an aggregate function to a column

<telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding EmployeeID}">  
    <telerik:GridViewDataColumn.AggregateFunctions>  
        <telerik:CountFunction Caption="Count:  " />  
    </telerik:GridViewDataColumn.AggregateFunctions>  
</telerik:GridViewDataColumn> 

Figure 3: Footer cell with aggregate results

Telerik Silverlight DataGrid Column Footers 3

To learn more about aggregate functions please have a look at this article.

Please note that if the Footer property is explicitly defined, it will take precedence over the aggregate results.

See Also

In this article
Not finding the help you need? Improve this article