How to select multiple appointment and update at a same time

12 posts, 0 answers
  1. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 23 Mar 2012 Link to this post

    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.
  2. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 26 Mar 2012 Link to this post

    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.
  3. Kalpana
    Kalpana avatar
    4 posts
    Member since:
    Feb 2012

    Posted 26 Mar 2012 Link to this post

    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.
  4. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 29 Mar 2012 Link to this post

    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.
  5. Kalpana
    Kalpana avatar
    4 posts
    Member since:
    Feb 2012

    Posted 29 Mar 2012 Link to this post

    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
  6. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 02 Apr 2012 Link to this post

    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.
  7. Perumal A
    Perumal A avatar
    2 posts
    Member since:
    Feb 2010

    Posted 02 May 2012 Link to this post

    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.
  8. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 03 May 2012 Link to this post

    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.
  9. Allen
    Allen avatar
    111 posts
    Member since:
    Apr 2012

    Posted 11 May 2012 Link to this post

    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.
  10. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 16 May 2012 Link to this post

    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.
  11. Allen
    Allen avatar
    111 posts
    Member since:
    Apr 2012

    Posted 16 May 2012 Link to this post

    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.
  12. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 16 May 2012 Link to this post

    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.
Back to Top