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

Accessing/Updating SchedulerResourceCollection on ClientSide

5 Answers 66 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 29 Jun 2013, 05:38 PM
So I am starting off with 
var myScheduler = $find('<%=RadScheduler1.ClientID %>');
How would I drill down and access and update the SchedulerResourceCollection?

Thanks.

5 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 03 Jul 2013, 02:34 PM
Hi Martin,

Thank you for contacting us.

Please refer to the following help article where you can find more information on the SchedulerResourceCollection (here) that you are trying to access on the client side.

Let me know if you have any further questions that I can assist you with.

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Zura Chikhladze
Top achievements
Rank 1
answered on 15 Jul 2013, 12:54 PM
Hi Kate,

i have the following issue with the radschduler and maybe you can help me.

what i want to implement is that when  am employee enters a new appointment, he/she should not be able to edit/delete already entered appointments by other employees. He should ONLY change his entered appointment in the scheduler. I appreciate your help. 
0
Kate
Telerik team
answered on 18 Jul 2013, 02:21 PM
Hello Zura,

To get the desired functionality you will need to assign a custom attribute to the appointment when you are initially creating it. Here is a help article where you can get detailed information on how to achieve that. Then, on the client side you can check the appointment and depending on value of the attribute you can cancel the OnClientAppointmentMovingOnClientAppointmentDeleting and the OnClientAppointmentEditing events. 

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Zura Chikhladze
Top achievements
Rank 1
answered on 19 Jul 2013, 05:54 AM
Hi Kate

Thank you for your reply. i was wondering how can i can access the username of the user who inserted the appointment and perform validation whether that same user is trying to edit or delete the appointment? by means of popup or how? can you please show me. Thank you. 

Here is the code: 

<telerik:RadScheduler ID="RadScheduler1" runat="server" OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnClientAppointmentEditing="ClientAppointmentEditing" OnClientAppointmentDeleting="ClientAppointmentDeleting" >
           ....
</telerik:RadScheduler>

protected void RadScheduler1_AppointmentInsert(object sender, AppointmentInsertEventArgs e)
   {
       //here you add the username as attribute
       e.Appointment.Attributes.Add("Nick""Kapanadze");
   }

function ClientAppointmentEditing(sender, args) {
    var appointment = args.get_appointment();
    if (appointment.get_attributes().getAttribute("Nick") != "Kapanadze") {
        args.set_cancel(true);
    }
     
}
 
function ClientAppointmentDeleting(sender, args) {
    var appointment = args.get_appointment();
    if (appointment.get_attributes().getAttribute("Nick") != "Kapanadze") {
        args.set_cancel(true);
    }
}

0
Plamen
Telerik team
answered on 23 Jul 2013, 07:57 AM
Hello,

 
You can access the username and set such custom permission validation on the server as in the code in the attached web page.

Hope this will be helpful.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Martin
Top achievements
Rank 1
Answers by
Kate
Telerik team
Zura Chikhladze
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or