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
5 Answers, 1 is accepted
0
Accepted
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:
I hope this helps. If you have any additional questions, do not hesitate to contact me.
Greetings,
Ivan Todorov
the Telerik team
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
0

Anoop
Top achievements
Rank 1
answered on 27 Apr 2011, 07:54 AM
Instead of the message box when I need to add my own form, how can I add it in message box way
0

Anoop
Top achievements
Rank 1
answered on 01 May 2011, 06:53 AM
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.
0
Hi Anoop,
You can get information about the selected appointment from the event args:
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
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
0

Anoop
Top achievements
Rank 1
answered on 11 May 2011, 05:52 AM
Thank you Ivan Todorov
Regards,
Regards,