Hello,
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:
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);
}
}