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

[Solved] scheduler resoruce collection

3 Answers 154 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
salman
Top achievements
Rank 1
salman asked on 05 Jun 2008, 10:07 PM

Hello,


Does anyone knows how to get the resources between the specified start and end time instead of getting all the resources from resource collection?  I'm trying to get the resources durring scheduler FormCreatingEvent and then hide the available resources so user cannot reserve the same resource again between that time.

Please help any suggestion or comments would be appereciated.

Thank you.
-Sal

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar Milushev
Telerik team
answered on 09 Jun 2008, 04:17 PM
Hi Sal,

You can get all appointments that overlap the desired range and check what resources they have assigned. Here is a sample code snipped:

foreach (Appointment appointment in RadScheduler1.Appointments.GetAppointmentsInRange(start, end)) 
{ 
    foreach (Resource resource in appointment.Resources) 
    { 
        resource.Available = false; 
    } 
} 


Regards,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
salman
Top achievements
Rank 1
answered on 09 Jun 2008, 07:20 PM
Hi, 

Do you know what event is fired when you click on 'more..." button to go to the advance editor.  Or the last event fired before going into the advance edit for the appointment.

Thank you,
-Sal
0
Accepted
Dimitar Milushev
Telerik team
answered on 12 Jun 2008, 08:01 AM
Hello,

In the FormCreating event, you can check the Mode of the form being created to see if it is an AdvancedForm. For example:

    void RadScheduler1_FormCreating(object sender, SchedulerFormCreatingEventArgs e)
    {
        if(e.Mode == SchedulerFormMode.AdvancedEdit || e.Mode == SchedulerFormMode.AdvancedInsert)
        {

        }
    }

There is no client-side event fired when clicking the 'more..' button, but you can use an InlineEditTemplate/InlineInsertTemplate to add custom javascript to be executed when clicking the button.

I hope this helps. Please let us know if you have further questions.

Kind regards,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
salman
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
salman
Top achievements
Rank 1
Share this question
or