disable recurrsion on Editing single Appointment

7 posts, 1 answers
  1. Kevin
    Kevin avatar
    24 posts
    Member since:
    Jul 2011

    Posted 01 Sep 2011 Link to this post

    Hi,

    i want to disable checkbox of recursion in case user is editing indivisual appointment of recurrsive appointment. any idea to acheive that. if editing is for series checkbox needs to be enabled else disabled.


    Thanks
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 01 Sep 2011 Link to this post

    Hi Kevin,

    Could you please be more specific on the requirement as I didn't understood it?

    If you want to hide the "Recurrence" checkbox please take a look at this forum post for a solution.

    Greetings,
    Veronica Milcheva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. Kevin
    Kevin avatar
    24 posts
    Member since:
    Jul 2011

    Posted 02 Sep 2011 Link to this post

    When user tries to Edit any appointment which is recursive, then a dialog box appear with options like you want to edit  only this occurence or the you want to edit whole series. What i want is when user select only one occurence then recurrence checkbox in Editing form shold be disabled and in aother cases it should be enabled. I hope you Understand my requirement . Please do reply...

    Thanks
  4. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 03 Sep 2011 Link to this post

    Hi Kevin,

    Thanks for clarification.

    Please note that when you select the "Edit only this occurence .." option - you are editing an exception of the occurence. That's why you can perform a check whether the Appointment's RecurrenceState is an Exception and only in that case to disable the recurrence checkbox:

     
    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
            {
                if (e.Container.Mode == SchedulerFormMode.AdvancedEdit)
                {
                    if (e.Appointment.RecurrenceState == RecurrenceState.Exception)
                    {
                        Panel recurrencePanel = (Panel)e.Container.FindControl("RecurrenceCheckBoxPanel");
                        recurrencePanel.Enabled = false;
                    }
                }
            }


    Kind regards,
    Veronica Milcheva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  5. Kevin
    Kevin avatar
    24 posts
    Member since:
    Jul 2011

    Posted 07 Sep 2011 Link to this post

    Thanks Veronica for the reply. well i got the event and caught the value in case of adding exception as per your reply. But i am not able to Find the controli.e RecurrenceCheckBoxPanel. I am getting null value in recurrencePanel.
    Is there any other way to find the control in FormCreated Event or it can be found directly as you have done this. Pls reply as i am facing Problem in finding the controls.

    Thanks
  6. Answer
    Plamen
    Admin
    Plamen avatar
    2933 posts

    Posted 12 Sep 2011 Link to this post

    Hello Kevin,

    You can try to use this code instead:
    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
       {
           if (e.Container.Mode == SchedulerFormMode.AdvancedEdit)
           {
               if (e.Appointment.RecurrenceState == RecurrenceState.Exception)
               {
     
                   RecurrenceEditor recurrenceEditor1 = e.Container.FindControl("RecurrenceEditor") as RecurrenceEditor;
                   RadioButton rb = (RadioButton)recurrenceEditor1.FindControl("RepeatFrequencyHourly");
                   CheckBox ck = (CheckBox)e.Container.FindControl("RecurrentAppointment");
                   ck.Enabled = false;
               }
           }
       }

    Hope this works for you.

    Regards,
    Plamen Zdravkov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  7. Kevin
    Kevin avatar
    24 posts
    Member since:
    Jul 2011

    Posted 13 Sep 2011 Link to this post

    Thanks Plamen Zdravkov, It works for me.

    Regards
Back to Top