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

Apply group property only to week

2 Answers 95 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
rahul
Top achievements
Rank 1
rahul asked on 09 Aug 2017, 08:35 PM

Hello Everyone,

I want to apply the group property to only week view and keep it default for day and month. How can I that?

Thanks

Rahul

2 Answers, 1 is accepted

Sort by
0
Tyler
Top achievements
Rank 1
answered on 10 Aug 2017, 08:10 PM

Just set up the view like this:

views: [{
                            type: "day",
                            startTime: new Date(1901, 1, 1, 0, 0, 0),
                            endTime: new Date(1901, 1, 1, 23, 59, 59),
                            workDayStart: new Date(startWorkDayStr),
                            workDayEnd: new Date(endWorkDayStr),
                            selected: selectDay
                        },
                        {
                            type: "week",
                            startTime: new Date(1901, 1, 1, 0, 0, 0),
                            endTime: new Date(1901, 1, 1, 23, 59, 59),
                            workDayStart: new Date(startWorkDayStr),
                            workDayEnd: new Date(endWorkDayStr),
                            selected: selectWeek
                        },
                        {
                            type: "workWeek",
                            startTime: new Date(1901, 1, 1, 0, 0, 0),
                            endTime: new Date(1901, 1, 1, 23, 59, 59),
                            workDayStart: new Date(startWorkDayStr),
                            workDayEnd: new Date(endWorkDayStr),
                            selected: selectWorkWeek
                        },
                        {
                            type: "month",
                            eventTemplate: kendo.template($('#event_template_month').html()),
                            eventHeight: 30,
                            selected: selectMonth
                        },
                        {
                            type: "agenda",
                            eventTemplate: $('#agendaEventTemplate').html(),
                            selected: selectAgenda
                        },
                        {
                            type: AgendaDayView,
                            title: 'Day Agenda',
                            eventTemplate: $('#agendaEventTemplate').html(),
                            selected: selectDayAgenda
                        },
                        {
                            type: "timeline",
                            columnWidth: 1,
                            minorTickCount: 1,
                            startTime: new Date(1901, 1, 1, 0, 0, 0),
                            endTime: new Date(1901, 1, 1, 23, 59, 59),
                            workDayStart: new Date(startWorkDayStr),
                            workDayEnd: new Date(endWorkDayStr),
                            group: {
                                orientation: 'vertical',
                                resources: ['AttendeeName']
                            },
                            dateHeaderTemplate: kendo.template('<strong>#=kendo.toString(date, "ddd M/dd")#</strong>'),
                            selected: selectTimeline
                        },
                        {
                            type: "timelineWeek",
                            minorTickCount: 1,
                            majorTick: 1440,
                            columnWidth: 1,
                            startTime: new Date(1901, 1, 1, 0, 0, 0),
                            endTime: new Date(1901, 1, 1, 23, 59, 59),
                            workWeekStart: 1,
                            workWeekEnd: 5,
                            workDayStart: new Date(startWorkDayStr),
                            workDayEnd: new Date(endWorkDayStr),
                            group: {
                                orientation: 'vertical',
                                resources: ['AttendeeName']
                            },
                            dateHeaderTemplate: kendo.template('<strong>#=kendo.toString(date, "ddd M/dd")#</strong>'),
                            selected: selectTimelineWeek
                        },
                        {
                            type: "timelineMonth",
                            startTime: new Date(1901, 1, 1, 0, 0, 0),
                            endTime: new Date(1901, 1, 1, 0, 0, 0),
                            group: {
                                orientation: 'vertical',
                                resources: ['AttendeeName']
                            },
                            dateHeaderTemplate: kendo.template('<strong>#=kendo.toString(date, "ddd M/dd")#</strong>'),
                            selected: selectTimelineMonth
                        }
                    ],

Here I am applying grouping only to my timeline views. Just use week instead and set the grouping how you need it. 

0
Veselin Tsvetanov
Telerik team
answered on 11 Aug 2017, 07:03 AM
Hello Rahul,

The approach that Tyler suggested is the appropriate one for the suggested scenario. Here you will find a small sample which applies grouping only on the Week view of the Scheduler.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
rahul
Top achievements
Rank 1
Answers by
Tyler
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or