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
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.
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.