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

[Solved] Total Column ColSpan in Grid Footer

2 Answers 307 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.
David
Top achievements
Rank 1
David asked on 25 Feb 2011, 04:09 AM
Hi,

On all my RadGridViews I put the total records in the bottom (using AggregateFunctions - see below). This works fine unless the column it is in has a small width (see attached screenshot), then it truncates the value. The problem is even worse on complex grids with virtualization and the value does not update even when you resize the column containing the total (it does not repaint it).

So what I would like to do is put a Colspan=2 on the TotalRow: grid footer so it is not bound to a particular column and is more of a row - is this possible?

              <telerikGrid:GridViewDataColumn.AggregateFunctions>
                        <telerik:CountFunction
                            Caption="Rows:" />
                    </telerikGrid:GridViewDataColumn.AggregateFunctions>

Thanks
Rodney

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 28 Feb 2011, 11:58 PM
bump
0
Ivan Ivanov
Telerik team
answered on 01 Mar 2011, 04:46 PM
Hello Rodney,

I wouldn't advise you to make any radical modifications to GridViewFooterRow/Cell templates, to prevent any visualization issues in the future. If such an approach satisfies you, I would propose extending first GridViewFooterCell's width, in order to make it spacious enough to host you aggregate function's results.  Apparently  it will affect its column's width. You may achieve it at runtime like this:

this.ChildrenOfType<GridViewFooterCell>().First().Width = desiredWidth;


Regards,

Ivan Ivanov
the Telerik team

 

Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Ivan Ivanov
Telerik team
Share this question
or