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

[Solved] telerik:GridTableView add a footer

5 Answers 553 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rashika
Top achievements
Rank 1
Rashika asked on 28 May 2013, 12:23 PM
I have a Hierarchical Grid in my program. I need to add a footer for gridtableview. 

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 May 2013, 12:32 PM
Hello

Please set the ShowFooter="true" property of GridTableView.

ASPX:
<DetailTables >
     <telerik:GridTableView  ShowFooter="true". . . . >
       . . . . . . . . . .
    </telerik:GridTableView>
</DetailTables>

Thanks,
Princy
0
Rashika
Top achievements
Rank 1
answered on 29 May 2013, 03:36 AM
Thank for the reply princy. But this statement is valid for column base footers. But i need row base footer to apply for the DetailTables.

0
Princy
Top achievements
Rank 2
answered on 29 May 2013, 04:14 AM
Hi,

I am not sure about your requirement. The Footer element of a column is similar to the Header element, but it is placed at the bottom of the grid. To have a Footer row in your grid, set the ShowFooter property to true. Please elaborate your scenario so that i can help you. Take a look into the following help documentation.

Totals in Grid Footers
Using Columns

Thanks,
Princy.
0
Rashika
Top achievements
Rank 1
answered on 29 May 2013, 04:28 AM
Thanks, My real requirement is to add some buttons to the gridtableview footer area. (But not into separate column footers)
0
Princy
Top achievements
Rank 2
answered on 30 May 2013, 08:15 AM
Hi,

Try adding the a button in the footer using the following code snippet and you can change the position of the Button using the CSS.

C#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFooterItem && e.Item.OwnerTableView.Name == "DetailTableName")
        {
            GridFooterItem footerItem = (GridFooterItem)e.Item;
            Button btn = new Button();
            btn.Text = "Button";
            btn.CssClass = "btnClass";
            btn.CommandName = "btnFooter";
            footerItem.Cells[2].Controls.Add(btn);
        }
    }

CSS:
<style type="text/css">
    .btnClass
    {
        <%-- style the button here (set margin)--%>
    }
</style>

Thanks,
Princy.
Tags
Grid
Asked by
Rashika
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rashika
Top achievements
Rank 1
Share this question
or