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

[Solved] Can group value be different from display value

3 Answers 64 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.
Evan
Top achievements
Rank 1
Evan asked on 28 Jul 2009, 02:54 PM
I'd like to display a value in a column but only group by part of the value.  Can this be done?

Example:
Display Value:  John Doe (30 pts)
Group Value:  John Doe

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 28 Jul 2009, 03:50 PM
Hello Evan ,

RadGridView does not support such complex grouping logic ( e.g. parsing strings in cells) .
The value must be contained in the bound business object. So as a solution I may recommend to use a view model approach  or if possible add a property with the parsed string to your business object.

Greetings,
Pavel Pavlov
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
Evan
Top achievements
Rank 1
answered on 28 Jul 2009, 03:56 PM
Hi Pavel,

If I add a a property to the business object, will that have to be a separate visible column in the GridView?  Or can I specify that a column be grouped by a different property?  Also, can you clarify "view model approach"?  You don't have to explain the concept of view/model, but I'm just not sure what you mean in this specific situation.

Thanks,
Evan
0
Pavel Pavlov
Telerik team
answered on 28 Jul 2009, 04:26 PM
Hello Evan ,

It does not have to be a visible column , you can group by values of the business object , that are not visualized in a column.

By view model approach I meant the scenario, where you can not change the business object ( to add the property) .In such case you would need an "intermediate" or proxy  representation of the object with the new property added.

Greetings,
Pavel Pavlov
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
Evan
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Evan
Top achievements
Rank 1
Share this question
or