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

Grouping field in Kendo Grid by partial value of the field

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
QualiWareUA
Top achievements
Rank 1
QualiWareUA asked on 08 Nov 2018, 08:29 AM

I have a Kendo Grid with a field (Date) that contains values like:

Date

2018.03.05 10:33

2018.03.05 11:20

2018.04.11 14:30

Now I want to group based on the date, but I don't want to include the time - or I would get all distinct groupings. I still want to display the time to the user, however.

I cannot find somewhere to modify the value before it's send to the grouping function. I could create an extra hidden field, populate it with the data, and somehow redirect the grouping to use that field, but this seems like an ugly solution, and I'm not even sure it's possible.

What can I do to archive the desired effect: 2 groups called 2018.03.05 and 2018.04.11?

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 12 Nov 2018, 07:17 AM
Hello,

I would also suggest creating a field that holds only the part of the data value relevant to grouping and use it for grouping. The same idea is presented for filtering by the date portion of a field here:
Filter by Date Only (the first solution, Create Helper Field)

I modified it to also include grouping and you can test the result here:
https://dojo.telerik.com/ATUyeGAG

Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
QualiWareUA
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or