I am using radscheduler in my application. i want to select more than one appointment set cancel the appointments at a time. please let me know how to get more than one appointment in appointment context menu and update the all selected appointment.
Thanks in advance,
Dhamu.
11 Answers, 1 is accepted
Multiple selection of appointments is not supported by RadScheduler.
Plamen Zdravkov
the Telerik team
I have similar question in radscheduler. I am using inline appointment insert in my application.
I would like to know if I can insert multiple appointments at a time.. If so, could you point me to the resource please? My requirement is, user should be able to select random or continuous dates using ctrl/shift and drag/select. On selection of multiple dates , ask him if you wants to schedule as a single appointment or different appointments and bring on the inline inserts accordingly. Any help with this is highly appreciated as I am new to telerix.
Thanks in advance!
Kalpana.
This scenario is not supported by RadScheduler at the moment. I have inspected different schedulers including the Microsoft OutLook but could not find anywhere implemented such case. Would you please share a link or some name of a program where we can observe it?
Plamen Zdravkov
the Telerik team
Thanks for your reply! I am not aware if such scenarios are available with other schedulers.This was a requirement from my client so, I seeked your team's help.
Thanks,
Kalpana
Thank you for sharing this scenario with us. Please excuse us for this limitation of our product.
Plamen Zdravkov
the Telerik team
http://demos.devexpress.com/ASPxSchedulerDemos/ClientSide/AppointmentsSelection.aspx
this is one of the Scheduler haveing multiple selection of appointment using ctrl + click
eg: select 2 appointments in the scheduler and change the label of the selected appointments same time.
we have a requirement for similar feature. how to achieve this.
Unfortunately this scenario is currently not supported by RadScheduler but it is in our "to do list" and you can vote increasing its priority in our PITS system.
Plamen Zdravkov
the Telerik team
In RadScheduler the appointments are being saves immediately after they are created but if you want to make a validation for the total duration of the appointments for a day you can use that following code on a click of the button:
protected void RadButton1_Click(object sender, EventArgs e) { double hours = 0; DateTime startTime = DateTime.Now; DateTime endTime=DateTime.Now.AddDays(7); foreach (Appointment app in RadScheduler1.Appointments.GetAppointmentsInRange(DateTime.Now, DateTime.Now.AddDays(7))) { if (app.RecurrenceState!=RecurrenceState.Master) { hours += app.Duration.TotalHours; } } foreach (Appointment recApp in RadScheduler1.Appointments) { if (!String.IsNullOrEmpty(recApp.RecurrenceRule)) { RecurrenceRule parsedRule; RecurrenceRule.TryParse(recApp.RecurrenceRule, out parsedRule); foreach (DateTime occ in parsedRule.Occurrences) { if (occ >= startTime && occ < endTime) { hours += parsedRule.Range.EventDuration.TotalHours; } } } } if (hours>1) { Response.Write("Too much appointments-"+hours); } }Hope this will be helpful.
Plamen Zdravkov
the Telerik team
Please write in VB code.
In such case since the changes are already added to the database and they can not be stored in a memory we recommend updating your DataSource when the validation fails by removing the appointments you do not need. You can separate the appointments that need to be removed by using some Custom Attribute as LastModified in this demo.
Another possible way to handle this is to check if the appointments exceed the limit at every insert or update of an appointment and cancel it if the validation fail similar to the scenario in our Occupied TimeSlots demo.
Here is how the validation code from the previous post should look in VB:
Protected Sub RadButton1_Click(sender As Object, e As EventArgs) Dim hours As Double = 0 Dim startTime As DateTime = DateTime.Now Dim endTime As DateTime = DateTime.Now.AddDays(7) For Each app As Appointment In RadScheduler1.Appointments.GetAppointmentsInRange(DateTime.Now, DateTime.Now.AddDays(7)) If app.RecurrenceState <> RecurrenceState.Master Then hours += app.Duration.TotalHours End If Next For Each recApp As Appointment In RadScheduler1.Appointments If Not [String].IsNullOrEmpty(recApp.RecurrenceRule) Then Dim parsedRule As RecurrenceRule RecurrenceRule.TryParse(recApp.RecurrenceRule, parsedRule) For Each occ As DateTime In parsedRule.Occurrences If occ >= startTime AndAlso occ < endTime Then hours += parsedRule.Range.EventDuration.TotalHours End If Next End If Next If hours > 1 Then Response.Write("Too much appointments-" + hours) End IfEnd SubHope this will help you solve the case.
All the best,
Plamen Zdravkov
the Telerik team
