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

GridBoundColumn GroupByExpression

3 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 18 May 2011, 05:26 PM
Hi,
I cannot seem to figure out how to declaratively format the result of an aggregate function using a GroupByExpression properly.
I have
GroupByExpression="Foo Name, avg(Total) [Average Days {0:0.00}]"

This shows both the formatted and unformatted value in the group header for Average Days.
Sample Result:
Name: Joe Smith; Average Days 30.47: 30.466666666666666666666666667

I can't seem to find anything online with this issue. I'm assuming I've done something wrong here.

Thanks,
ian

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 May 2011, 08:27 AM
Hello Ian,

 One approach is to access GridGroupHeaderItem and then customize it accordingly. Check the following help documentation which explains more about this.
Customizing GridGroupHeaderItem.

Thanks,
Princy.
0
Ian
Top achievements
Rank 1
answered on 19 May 2011, 08:35 PM

Hi,

Thanks for the link. Is there declarative support for this in the markup?

ian

0
Radoslav
Telerik team
answered on 24 May 2011, 01:02 PM
Hello Ian,

Unfortunately there is not any markup into the RadGrid which corresponds to the code snippet from the Princy's link. You could achieve the desired functionally only with custom code into the code behind.

I hope this helps.

Greetings,
Radoslav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Ian
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ian
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or