This is a migrated thread and some comments may be shown as answers.

[Solved] Footer for a GridBoundColumn

1 Answer 317 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 21 Oct 2009, 02:15 PM
Hi,

Is it possible to add a footer to a GridBoundColumn without turning it into an item template.

i want to add a button to the footer of a radGrid.  I'd like to have it under the right most column, but don't want to have to convert the contents of the column to an item template, is this possible, and if so, how do I do it?

The code below is a snippet from the grid I'd like to add the footer to.  If possible I'd like the button to appear under the FirstName column.



<telerik:RadGrid ID="grvLandlords" runat="server" AutoGenerateColumns="False" DataSourceID="SqlLandlord" GridLines="None"   
                Skin="Office2007" OnSelectedIndexChanged="grvLandlords_SelectedIndexChanged" OnItemDataBound="grvLandlords_ItemDataBound" > 
                <MasterTableView ShowFooter="true" DataKeyNames="LandlordID" DataSourceID="SqlLandlord">  
                    <Columns>                              
                        <telerik:GridButtonColumn CommandName="Select" Text="Select" UniqueName="Select">  
                        </telerik:GridButtonColumn>    
                        <telerik:GridBoundColumn DataField="LandlordID" DataType="System.Int32" HeaderText="LandlordID" 
                            ReadOnly="True" SortExpression="LandlordID" UniqueName="LandlordID" Visible="false">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title" 
                            UniqueName="Title">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" SortExpression="FirstName" 
                            UniqueName="FirstName">  
                        </telerik:GridBoundColumn> 
</Columns> 
                </MasterTableView> 
            </telerik:RadGrid> 


Thanks,

Peter

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 21 Oct 2009, 03:07 PM
Hi Peter,

The Footer element of a column is similar to the Header element, but it is placed at the bottom of the grid. It cannot provide header-specific functions like reordering, resizing and sorting of columns. Rather, you can set the FooterText property of the column to display information about the column (such as summary information).

If you are using column aggregates, these are automatically displayed in the footer.
To have a Footer row in your grid, set the ShowFooter property to true. Then you can customize the Footer appearance using the RadGrid property builder or FooterStyle section of the RadGrid property pane.

Regards,
Pavlina
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Peter
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or