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

Multiple Resources in Web Service Example

3 Answers 15 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jahan
Top achievements
Rank 1
Jahan asked on 24 Jul 2014, 09:14 PM
Hello,
I've downloaded the telerik scheduler.
when I use the "RadSchedule Scenario Wizard"  to add Web Service with Customer Provider, everything works fine.
I would like to make a change to allow Multiple Resources be selected.

I can see the following code in MyDbSechedulerProvider.cs ... However I cannot select more than 1 teacher and 1 student per appointment


public override IEnumerable<Resource> GetResourcesByType(RadScheduler owner, string resourceType)
{
    switch (resourceType)
    {
        case "Teacher":
            return Teachers.Values;
 
        case "Student":
            return Students.Values;
 
        default:
            throw new InvalidOperationException("Unknown resource type: " + resourceType);
    }
}
 
public override IDictionary<ResourceType, IEnumerable<Resource>> GetResources(ISchedulerInfo schedulerInfo)
{
    var resCollection = new Dictionary<ResourceType, IEnumerable<Resource>>();
 
    resCollection.Add(new ResourceType("Teacher", false), Teachers.Values);
    resCollection.Add(new ResourceType("Student", true), Students.Values);
 
    return resCollection;
}
 
public override IEnumerable<ResourceType> GetResourceTypes(RadScheduler owner)
{
    var resourceTypes = new ResourceType[2];
    resourceTypes[0] = new ResourceType("Teacher", false);
    resourceTypes[1] = new ResourceType("Student", true);
 
    return resourceTypes;
}

3 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 29 Jul 2014, 11:11 AM
Hi Jahan,

We have used the following project to implement your scenario. Also, we are sending you a sample for a reference.

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jahan
Top achievements
Rank 1
answered on 29 Jul 2014, 02:16 PM
Is there any option to display a large list of resources.
For example 30 rooms to choose from.

I've tried to use the checkbox but it will make the advanced appointment screen too large to display (goes off the screen).
Is there an alternative way of displaying them?

Thank you
0
Boyan Dimitrov
Telerik team
answered on 01 Aug 2014, 12:46 PM
Hello,

Please find attached a sample project that implements a scenario where the students resource is displayed as RadComboBox with check box support. This allows you to check more than one student per appointment.

Regards,
Boyan Dimitrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Scheduler
Asked by
Jahan
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Jahan
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or