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

[Solved] Aggregate showing the name of the Grouping

5 Answers 90 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.
Michele
Top achievements
Rank 2
Michele asked on 02 Jul 2009, 02:42 PM
Hello,
I would like to know if it's possible to have for a  caption for grouping as I can have for sum
 <data:SumFunction > 

Since I've to group by default on an integer and it's not so userfriendly for the users...

Thanks in advance

Paolo

5 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 06 Jul 2009, 07:18 AM
Hello Paolo,

This is actually very easy to do - the RadGroupDescription class has a DisplayContent property which allows you to provide custom caption for the group elements. Here is a XAML snippet:

<telerikGrid:RadGridView Name="RadGridView1">  
    <telerikGrid:RadGridView.GroupDescriptions>  
        <data:RadGroupDescription PropertyName="Size" DisplayContent="MyCustomHeader"/>  
    </telerikGrid:RadGridView.GroupDescriptions>  
</telerikGrid:RadGridView> 

Hope this helps.

Kind regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Michele
Top achievements
Rank 2
answered on 06 Jul 2009, 10:00 AM
Hello Milan,
thanks for your reply, I've just tried it, but it substituites the name in the grouping box above the grid's row, I wish to add a description just after the ' ^ ' that aggregates the element,
 in my case I' need to do grouping by int, and I've in the grouping "Class" and under  ^5 , ^6 , it would have been cool something like
^ Class:5, ^ Class:6

Thanks again

Paolo
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 08 Jul 2009, 01:13 PM
Hi Paolo,

We've introduced a GridViewDataColumn.GroupHeaderFormatString property which you can use to change appearance of the group header text. I'm attaching a sample application (with latest binaries) which demonstrates how to use this property.

Sincerely yours,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Michele
Top achievements
Rank 2
answered on 09 Jul 2009, 01:54 PM
Hello Nedyalko,
I'm sorry to say that the property you've introduced is not present in Telerik.Windows.Controls version 2009.2.701.1020, in the demo you've send to me [version 2009.2.708.1020] it's but it's a newer build respect to the official Q2...
can you please confirm? I've used reflector and inspected the 2 assemblies...

Thanks in advance

Paolo
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 09 Jul 2009, 02:59 PM
Hello Paolo,

Yes I can confirm that GroupHeaderFormatString property will be available with next "latest internal build" (every Friday night) and of course with next official releases. I've send you a sample project, because online examples will be updated only with official release or service pack.

Don't hesitate to contact us if you have other questions.


Greetings,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Michele
Top achievements
Rank 2
Answers by
Milan
Telerik team
Michele
Top achievements
Rank 2
Nedyalko Nikolov
Telerik team
Share this question
or