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

Is grouping by numeric ranges supported?

1 Answer 15 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Morgan
Top achievements
Rank 1
Morgan asked on 15 Dec 2011, 11:12 PM
I am looking for some way to group by a range of values. For example, dragging a sales header to the grouping region might generate the following groups:

0
1-10,000
10,001-20,000
20,001-30,000
30,000 and up

I have thought about doing this with IValueConverter, and grouping on the converted value, but I was not sure if there was a better way.  Thanks.

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 16 Dec 2011, 10:20 AM
Hi Morgan,

Create a new read-only string property that will return a range based on the data item value. Then group by this new property.

That is called a view model. You adapt your model (DB) for display in the view (UI) by using a view-model.

I hope this helps.

Greetings,
Ross
the Telerik team

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

Tags
GridView
Asked by
Morgan
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or