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

Can we access the EditAppointmentDialog ?

2 Answers 139 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 11 Dec 2008, 09:56 AM
Can I access properties of this dialog?  For example, make the recurrence button invisible, seen as I can't save a recurrence rule.

Thanks,
Derek.

2 Answers, 1 is accepted

Sort by
0
Jordan
Telerik team
answered on 12 Dec 2008, 08:46 AM
Hello Derek,

That is quite an interesting question, the answer to which is yes. You can hide the "Recurrence" button by inheriting from the standard dialog and hiding it and then make the scheduler use the custom dialog like below:
 
 protected override void OnLoad(EventArgs e) 
        { 
            base.OnLoad(e); 
 
            this.radScheduler1.AppointmentEditDialogShowing += new EventHandler<AppointmentEditDialogShowingEventArgs>(radScheduler1_AppointmentEditDialogShowing); 
        } 
 
        CustomAppointmentDialog appointmentDialog = null
 
        void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e) 
        { 
            if(this.appointmentDialog == null
            { 
                this.appointmentDialog = new CustomAppointmentDialog(); 
            } 
            e.AppointmentEditDialog = this.appointmentDialog; 
        } 
 
        public class CustomAppointmentDialog : EditAppointmentDialog 
        { 
            public CustomAppointmentDialog() 
                : base() 
            { 
                this.Controls["btnRecurrence"].Visible = false
            } 
        } 



Sincerely yours,
Jordan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Derek
Top achievements
Rank 1
answered on 12 Dec 2008, 09:16 AM
That's interesting, thanks.
Tags
Scheduler and Reminder
Asked by
Derek
Top achievements
Rank 1
Answers by
Jordan
Telerik team
Derek
Top achievements
Rank 1
Share this question
or