Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Scheduler and Reminder > Is it possible to replace appointment dialog with a message box??

Answered Is it possible to replace appointment dialog with a message box??

Feed from this thread
  • Posted on Apr 19, 2011 (permalink)

     Is it possible to add for example a message box or another window when we click on the appointment box?

    I mean instead of the appointment dialog I want to view another window or message box.

     

    PS: I do not mean custom appointment dialog

     

    Thanks in advance

    Reply

  • Answer Ivan Todorov Ivan Todorov admin's avatar

    Posted on Apr 22, 2011 (permalink)

    Hi Anoop,

    Thank you for your question.

    Yes, this is possible. In order to achieve this, you should subscribe to the scheduler's AppointmentEditDialogShowing event, cancel the original dialog's opening and show your message box. The following code snippet demonstrates this:
    void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
    {
        List<SchedulerCellElement> cells = SchedulerUIHelper.GetSelectedCells(this.radScheduler1);
        if (cells.Count == 0)
            return;
        DialogResult result = MessageBox.Show("Are you sure want to add an appointment?", "Question", MessageBoxButtons.YesNo);
        if (result == System.Windows.Forms.DialogResult.Yes)
        {
            Appointment appointment = new Appointment(cells[0].Date, cells[cells.Count - 1].Date.AddHours(1), "New Appointment");
            this.radScheduler1.Appointments.Add(appointment);
        }
     
        e.Cancel = true;
    }

    I hope this helps. If you have any additional questions, do not hesitate to contact me.

    Greetings,
    Ivan Todorov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Posted on Apr 27, 2011 (permalink)

    Instead of the message box when I need to add my own form, how can I add it in message box way

    Reply

  • Posted on May 1, 2011 (permalink)

    I wanna add my own form or dialog to view the data of each appointment differently according to its category.

     

    For example see the attached picture just sample.

    Attached files

    Reply

  • Ivan Todorov Ivan Todorov admin's avatar

    Posted on May 2, 2011 (permalink)

    Hi Anoop,

    You can get information about the selected appointment from the event args:
    void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
    {
        if (e.Appointment != null && this.radScheduler1.Appointments.Contains(e.Appointment))
        {
            MessageBox.Show("Editing appointment: " + e.Appointment.Summary + " " + e.Appointment.Start + " - " + e.Appointment.End);
            e.Cancel = true;
        }
    }

    If there is a selected appointment, e.Appointment it. Otherwise, it contains a temporary appointment that is created according to the selected cells. To understand whether we are creating a new appointment or editing an existing one, we can check if the Appointments collection of our scheduler contains e.Appointment.

    I hope this helps. Feel free to ask if you have any additional questions.

    Greetings,
    Ivan Todorov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Posted on May 11, 2011 (permalink)

    Thank you Ivan Todorov

    Regards,

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Scheduler and Reminder > Is it possible to replace appointment dialog with a message box??
Related resources for "Is it possible to replace appointment dialog with a message box??"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]