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

edit/delete appointment

7 Answers 184 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Srikanth
Top achievements
Rank 1
Srikanth asked on 10 Dec 2010, 09:47 PM
On double click of an appointment, I want to open my own Window. Is this possible?
ALso, I want to take the ability to delete the appointment away.

7 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 15 Dec 2010, 09:54 AM
Hello Srikanth,

Thank you for contacting us.

You can find more information about that in this blog post: http://blogs.telerik.com/miroslavnedyalkov/posts/10-11-25/how_to_create_custom_appointments_and_custom_appointment_dialog_in_telerik_scheduleview.aspx

Please let us know if you have further questions.

Kind regards,
Konstantina
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Srikanth
Top achievements
Rank 1
answered on 17 Dec 2010, 05:46 AM
Here is what I want to do. We have a very complicated Scheduling, where we need to check Conflicts on Parent and / or Child Surfaces.
So it will be lot easier if we can open our own Window. I just want to get the appoitment details when Double Clicked on the Appoiment  and then want to open our own Window.
0
Konstantina
Telerik team
answered on 22 Dec 2010, 10:40 AM
Hello Srikanth,
 
To cancel the showing of the default EditAppointmentDialog you have to do the following:

this.scheduleView.ShowDialog += new EventHandler<Telerik.Windows.Controls.ShowDialogEventArgs>(scheduleView_ShowDialog);
 }
       void scheduleView_ShowDialog(object sender, Telerik.Windows.Controls.ShowDialogEventArgs e)
       {
           e.Cancel = true;
           // get the selected Appointment
           var app = scheduleView.CurrentAppointment
       }

Hope this helps. Please let us know if you have further questions.

Kind regards,
Konstantina
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Rod Yager
Top achievements
Rank 1
answered on 22 Dec 2010, 11:24 PM
The ShowDialog solution doesn't seem doable as it executes even for the default delete dialog. I think what we need is to ovveride the default doubleclick handler and pop our own editor in place of the default appt editor dialog. Any ideas on how to accomplish this?

Thanks,
Rod
0
Valeri Hristov
Telerik team
answered on 23 Dec 2010, 10:55 AM
Hi,

The proposed solution has information which dialog has opened - the DialogViewModel property of the event args can be used to determine which dialog is firing the event. For example the DialogViewModel property contains an object of type AppointmentDialogViewModel when the edit dialog is opening:
var isEditDialog = e.DialogViewModel is AppointmentDialogViewModel;
if (isEditDialog)
{
...
}
else
{
...
}

You cannot override the default double click handler as RadScheduleView relies on many things that must happen in order to work properly. We provide several hooks that can be used to replace default functionality, as the dialogs. They are simple views (contain only XAML template and no code-behind) hence they can be replaced only by changing their style, as Miroslav demonstrated in his blog post. The only thing RadScheduleView is providing, is the ViewModel for the corresponding view. You can put additional ViewModels in the dialog XAML (as static resources for example) that can implement the additional logic you need.

Best wishes,
Valeri Hristov
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Gareth McNicol
Top achievements
Rank 1
answered on 21 Feb 2011, 10:29 AM
The problem with the example in the blog post is that I can't get Dragging & Dropping to work with any objects that differ from being just Appointment.

0
George
Telerik team
answered on 24 Feb 2011, 01:50 PM
Hello Gareth,

 
Could you please give us more information about your scenario? I am glad to assist you further.

Greetings,
George
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
ScheduleView
Asked by
Srikanth
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Srikanth
Top achievements
Rank 1
Rod Yager
Top achievements
Rank 1
Valeri Hristov
Telerik team
Gareth McNicol
Top achievements
Rank 1
George
Telerik team
Share this question
or