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

How to select multiple appointment and update at a same time

11 Answers 274 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dhamodharan
Top achievements
Rank 1
Dhamodharan asked on 23 Mar 2012, 07:49 AM
Hi All,

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

Sort by
0
Plamen
Telerik team
answered on 26 Mar 2012, 08:48 AM
Hello Dhamu,

 
Multiple selection of appointments is not supported by RadScheduler
 

Kind regards,
Plamen Zdravkov
the Telerik team
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 their blog feed now.
0
Kalpana
Top achievements
Rank 1
answered on 26 Mar 2012, 01:44 PM
Hi Telerix 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.
0
Plamen
Telerik team
answered on 29 Mar 2012, 11:18 AM
Hi Kaplana,

 
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?

Kind regards,
Plamen Zdravkov
the Telerik team
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 their blog feed now.
0
Kalpana
Top achievements
Rank 1
answered on 29 Mar 2012, 12:13 PM
Hi Plamen, 

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
0
Plamen
Telerik team
answered on 02 Apr 2012, 02:38 PM
Hi Kalpana,

Thank you for sharing this scenario with us. Please excuse us for this limitation of our product.

Greetings,
Plamen Zdravkov
the Telerik team
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 their blog feed now.
0
Perumal A
Top achievements
Rank 1
answered on 02 May 2012, 09:44 AM
Hi 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.
0
Plamen
Telerik team
answered on 03 May 2012, 03:35 PM
Hi Perumal,

 
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.

All the best,
Plamen Zdravkov
the Telerik team
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 their blog feed now.
0
Allen
Top achievements
Rank 1
answered on 11 May 2012, 04:35 PM
I have similar question. Can I use a Save RadButton to update all appointments at the same time after the user make all the changes?  It is becase we have some rules to validate.   eg. we need to add all the hours in that week, if it exceed 40 hours a week we need to pop up a windows and say "you have exceed the 40 hours limit" when the user click the Save button.
0
Plamen
Telerik team
answered on 16 May 2012, 08:44 AM
Hi Allen,

 
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.

All the best,
Plamen Zdravkov
the Telerik team
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 their blog feed now.
0
Allen
Top achievements
Rank 1
answered on 16 May 2012, 02:40 PM
However, we need some kind of roll back feature, so if it does not pass the validation, the hours will stay in the previous value.  in another word, it will not update the database if it fail the validation.   Is that possible that I store the changes in a memory and it will update the database after it passes validation?
Please write in VB code.
0
Plamen
Telerik team
answered on 16 May 2012, 03:51 PM
Hi Allen,

 
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 If
End Sub

Hope this will help you solve the case.
All the best,
Plamen Zdravkov
the Telerik team
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 their blog feed now.
Tags
Scheduler
Asked by
Dhamodharan
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Kalpana
Top achievements
Rank 1
Perumal A
Top achievements
Rank 1
Allen
Top achievements
Rank 1
Share this question
or