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

Kendo ui scheduler horizontal grouping issue

3 Answers 110 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rajeev
Top achievements
Rank 1
Rajeev asked on 18 Feb 2014, 03:47 PM
Hi,

I am using keno UI scheduler with horizontal grouping but i want  it for only day view not for week view and others view.

for that i used filter option in navigate event to filter data source as shown bellow:

 var scheduler = $("#scheduler").data("kendoScheduler");

            if(e.view!='day' ){

             var filter = {

                    logic:"or",

                    filters: [

                        {

                            operator: "eq",

                            field: "text",

                            value: 1

                        },

                       

                        ]

                };

            scheduler.resources[0].dataSource.filter(filter);

            scheduler.view(scheduler.view().name);

            scheduler.refresh();

            }else  {

                var filter = {

                    logic:"or",

                    filters: [

                        {

                            operator: "eq",

                            field: "text",

                            value: 1

                        }, {

                            operator: "eq",

                            field: "text",

                            value: 2

                        }]

                };

                scheduler.resources[0].dataSource.filter(filter);

                scheduler.view(scheduler.view().name);

               

            }

but when i navigate from day view to other views its not working and giving java script error :

"this.groups[t.groupIndex] is undefined"

please help mi how to customize horizontal grouping and is there any way to set groups run time .

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 19 Feb 2014, 07:41 AM
Hi Rajeev,

In order to set resource grouping for a particular view you should use the view's group option instead of the global one.

$("#scheduler").kendoScheduler({ 
  views: [
    {
      type: "day",
      group: {
        resources: ["Rooms"]
      }
    },
    { type: "week", selected: true }   
  ],   
  resources: [
    /*..*/
  ]
});


Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tony
Top achievements
Rank 1
answered on 24 Oct 2015, 12:37 AM
this is excellent. is there a way you can demo this using MVVM?
0
Rosen
Telerik team
answered on 27 Oct 2015, 07:45 AM

Hello George,

The syntax when using the declarative configuration should look almost identical:

data-views="[{
  'type': 'day',
  'group': {
    'resources': ['Rooms']
  }
}, 'week' ]"

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Rajeev
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Tony
Top achievements
Rank 1
Share this question
or