Setting a GroupMemberPath for a GridViewExpressionColumn

1 Answer 81 Views
GridView
Jack
Top achievements
Rank 1
Jack asked on 17 Sep 2021, 02:50 PM

Hi,

We have a gridview where we allow users to create custom expression columns, in the case where the expression they create will return DateTime values we'd like these custom columns to be grouped by date but the default groups on date and time.

I've managed to get this behaviour from data columns by setting the GroupMemberPath to the Date property of the DateTime object but for the expression columns as far as I can tell I can only use it to point towards the data whereas I need the grouping to be based on the result of the expression.

Is it possible to set the GroupMemberPath to the date part of the expression's result / is there any other way of getting the ColumnGroupDescriptor to group the column by the date part of the expression's result?

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 20 Sep 2021, 02:30 PM

Hello Jack,

You could use an additional calculated property to hold the Date of the expression result and set it to the GroupMemberPath property of the column.

That said, if this is not possible in your current scenario, could you please provide a sample project, so I can try to come up with a proper solution? Thank you in advance for your cooperation on the matter.

Regards,
Stenly
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
GridView
Asked by
Jack
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or