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

[Solved] Gridview Print Footer

1 Answer 74 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brad Lanford
Top achievements
Rank 1
Brad Lanford asked on 19 Oct 2010, 02:42 PM
I have a gridview that prints based on the telerik demo. How do I add code to print a footer I have created for the gridview. The footer contains no aggregate functions, it is just simply made up of text. All I need to do is print it with the gridview data.

1 Answer, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 19 Oct 2010, 02:50 PM
Hi Brad Lanford,

 You need to modify a part of the Button1_Click method of the demo print example to look like this:
grid.ShowColumnFooters = true;
foreach (GridViewDataColumn column in RadGridView1.Columns.OfType<GridViewDataColumn>())
{
    GridViewDataColumn newColumn = new GridViewDataColumn();
    newColumn.DataMemberBinding = new System.Windows.Data.Binding(column.UniqueName);
    newColumn.Footer = column.Footer;
    grid.Columns.Add(newColumn);
}


All the best,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Brad Lanford
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Share this question
or