I need to group a property that does not implement IComparable. I'd expect it to simply do a ReferenceEquals. It's not. It's erroring.
I cannot alter the class being grouped without serious effort, it's a WCF Data Services entity (they do not implement IComparable).
3 Answers, 1 is accepted
0
Nedyalko Nikolov
Telerik team
answered on 06 Oct 2011, 04:37 PM
Hi Jerome,
Indeed RadGridView cannot group by a property which doesn't implement IEquatable<T> or IComparable interfaces. However you could set GroupMemberPath and point RadGridView to group by a property of the WCF Data service entity which implements IComparable interface. For example GroupMemberPath = "Entity.ID".
Let me know if this doesn't help.
Regards,
Nedyalko Nikolov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Okay, but then Group.Key refers to the key. There's no way to navigate from there up to the actual grouped value, so that I can use other properties of it in rendering it's header.
0
Vlad
Telerik team
answered on 11 Oct 2011, 12:46 PM
Hi,
Generally WCF Data Services classes are partial and you can implement IComparable very easily.
Greetings,
Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>