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

Group by formatted value and not underlying value

2 Answers 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Boots
Top achievements
Rank 1
Boots asked on 24 Oct 2011, 04:21 PM
Hello,

I'm wondering if it's possible to group a column by the formatted value and not the underlying value?

for example:
value 1 = 1.12345678
value 2 = 1.12
value 3 = 1.1225

Each of these values with the currency format applied to them (assuming your region setting for currency is "$123,456,789.00") would display the same in the gridview. However when grouping them they would each be in their own group.

Currently I'm using the Math.Round() method to get around, but i was wondering if there was anything out of the box with the RadGridView to handle this?

Thanks Much,
~Boots

2 Answers, 1 is accepted

Sort by
0
Accepted
Pavel Pavlov
Telerik team
answered on 27 Oct 2011, 01:20 PM
Hi Boots,

Yes it is .  Using a generic group descriptor you can make almost any kind of  custom grouping .
I am attaching a small runnable demo. To see this in action , just group by the Price column .

Regards,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Boots
Top achievements
Rank 1
answered on 27 Oct 2011, 03:26 PM
Hi Pavel,

Thank You! That's exactly what I'm looking for!

Thanks Again,
~Boots
Tags
GridView
Asked by
Boots
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Boots
Top achievements
Rank 1
Share this question
or