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

Hide/Display groups which have no data/events

1 Answer 57 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kumeri
Top achievements
Rank 1
Veteran
Kumeri asked on 31 Oct 2018, 09:20 AM

Hi, 

We are using the scheduler control with two resources. 

resources: [
            {
                field: "company"'
                name: "Company",
                dataSource: [
                    { text: "Company 1", value: 1, color: "#6eb3fa" },
                    { text: "Company 2", value: 2, color: "#f58a8a" }
                ],
                title: "Company"
            },
            {
                field: "employee",
                name: "Employee",
                dataSource: [
                    { text: "Alex", value: 1, color: "#f8a398" },
                    { text: "Bob", value: 2, color: "#51a0ed" },
                    { text: "Charlie", value: 3, color: "#56ca85" }
                ],
                title: "Employee"
            }
        ]

And we use the two resources to group the scheduler.

  group: {
            resources: "Company", "Employee"],
            orientation: "vertical"
        }

But in our scenario we do not have employees who work for more than one company. There is an one-one mapping between the employee-company.
So I would like to if there is a possibility to hide/not-display or disable the group catergories created without data.

Example:

Company          Employees

1                      Alex, Bob
2                      Charlie, Daphne

So I would like to hide the groups 1-Charlie, 1-Daphne and 2-Alex, 2-Bob in the scheduler as there 4 section will always be empty.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 02 Nov 2018, 09:42 AM
Hello Kumeri,

I am not completely sure that I had understood the scenario that you are trying to achieve. Do you aim to avoid displaying resources area, when no events with this type are created? If so, I think that the following KB could help:

https://docs.telerik.com/kendo-ui/knowledge-base/scheduler-dynamically-change-grouping-options

Please let me know if I had misunderstood your scenario.

Regards,
Nencho
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
Scheduler
Asked by
Kumeri
Top achievements
Rank 1
Veteran
Answers by
Nencho
Telerik team
Share this question
or