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

RadScheduleView- Delete Appointment

4 Answers 106 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Ajitha
Top achievements
Rank 1
Ajitha asked on 05 Dec 2011, 08:19 PM
Hello,

I am trying to implement the Delete appointment functionlity, and I can see the X button on each of the appointment, but when i click on X button nothing happens. This functionality was working on RadScheduler and it doesnt work on RadScheduleView.
Any help is appriciated.

Thanks
Ajitha

4 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 06 Dec 2011, 09:43 AM
Hello Ajitha,

RadScheduleView appointments have an option for deletion by default. It is represented by the delete button in the top right corner of the appointment item.

Please, share more details on your scenario and the behavior you wish to implement.

All the best,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Ajitha
Top achievements
Rank 1
answered on 06 Dec 2011, 05:39 PM
Hello Dani,

I am using a template with the ResourceDictionary and creating a button on the right hand corner for each appointment, we are not able to handle the click event to delete the appointment. The same piece of code was working with RadScheduler and it doesnt work with  RadScheduleView. The built in delete button would get enabled and we were able to delete an appointment, but now it doesnt do that.

Thanks
Ajitha
0
Ajitha
Top achievements
Rank 1
answered on 07 Dec 2011, 09:34 PM
 
0
Dani
Telerik team
answered on 12 Dec 2011, 11:57 AM
Hi Ajitha,

RadScheduler and RadScheduleView are different controls and it is very likely that code or xaml you used for RadScheduler will not work for RadScheduleView.

The delete button in the appointment item control template works with a Command and a CommandParameter:
<telerik:RadButton x:Name="DeleteButton" ClickMode="Press" 
                                           CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                           Command="local:RadScheduleViewCommands.DeleteAppointment" 
                                           HorizontalAlignment="Right" Height="11" IsTabStop="False" Margin="5 5 6 5" 
                                           Padding="0" telerik:StyleManager.Theme="{StaticResource Theme}" 
                                           Visibility="{Binding IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource Self}}" 
                                           VerticalAlignment="Top" Width="11">
                            <Path Data="M0,0 L5,5 M5,0 L0,5" Stroke="{StaticResource AppointmentItemDeleteIconStroke}"/>
                        </telerik:RadButton>

 If you wish to replace that button with your own button, you can easily do that  - simply copy the Command, CommandParameter and Visibility properties values from the original delete button.

I hope this helps.

Greetings,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ScheduleView
Asked by
Ajitha
Top achievements
Rank 1
Answers by
Dani
Telerik team
Ajitha
Top achievements
Rank 1
Share this question
or