Can we access the EditAppointmentDialog ?

3 posts, 0 answers
  1. Derek
    Derek avatar
    104 posts
    Member since:
    Aug 2008

    Posted 11 Dec 2008 Link to this post

    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. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 12 Dec 2008 Link to this post

    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.
  3. Derek
    Derek avatar
    104 posts
    Member since:
    Aug 2008

    Posted 12 Dec 2008 Link to this post

    That's interesting, thanks.
Back to Top