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

disable recurrsion on Editing single Appointment

6 Answers 58 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 01 Sep 2011, 02:39 PM
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

6 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 01 Sep 2011, 04:13 PM
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 >>

0
Kevin
Top achievements
Rank 1
answered on 02 Sep 2011, 06:33 AM
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
0
Veronica
Telerik team
answered on 03 Sep 2011, 12:10 PM
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 >>

0
Kevin
Top achievements
Rank 1
answered on 07 Sep 2011, 07:27 AM
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
0
Accepted
Plamen
Telerik team
answered on 12 Sep 2011, 08:32 AM
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 >>

0
Kevin
Top achievements
Rank 1
answered on 13 Sep 2011, 10:34 AM
Thanks Plamen Zdravkov, It works for me.

Regards
Tags
Scheduler
Asked by
Kevin
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Kevin
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or