Last Updated: 31 Jan 2017 12:05 by ADMIN
Created on: 05 Feb 2016 10:58
Category: GridView
Type: Feature Request
GridView: Group column by enum value but display Description or DisplayName
Provide an option to group a column which is based on an enum by the enum value, but display the DescriptionAttribute or DisplayNameAttribute if existing.
So many times you have sort/group a column by its value like 1,2,3 but display the Description like "Delivery", "Ready", "Pickup". Of course I could add a column to my class which presents the DescriptionAttribute, but then grouping/sorting is wrong: "Delivery", "Pickup", "Ready". It would by much easier if there is an option like "UseDescription". There is something similar with Teleriks "EnumDataSource" which IS using the Description or DisplayName so it should not be that hard to implement the same logic for RadGridView.
1 comment
Posted on: 31 Jan 2017 12:05
Hello Neils,

Firstly, please, excuse us for the delayed reply.

We have logged this as a feature request in our backlog. Note, that by the time being, a similar behavior can be achieved by using the GroupMemberPath property of the column and defining an additional string one which would serve as a Description. The GroupMemberPath will have to point to the enum property, so that the grouping operation is performed over it. On the other hand, the column will have to be bound to the aforementioned string property through its DataMemberBinding, so that the needed description is displayed.

Hopefully, this helps.

Best Regards,