AppointmentSelectionChanged is close but can be fired in situations other than a click.
I don't use the edit dialog but I want to show appointment details on single click. Currently I am trapping the ShowDialog event which is fired on the double-click of an appointment but I would rather do it on a single click.
5 Answers, 1 is accepted
To complete the described task I would suggest you to use the SelectedAppointment property, bind to it and display its details. However I can see that you already explored this option.
Another option is to edit the AppointmentTemplate and find the code below:
<
telerik:CommandManager.InputBindings
>
<
telerik:InputBindingCollection
>
<
telerik:MouseBinding
Gesture
=
"LeftDoubleClick"
Command
=
"{StaticResource EditAppointment}"
/>
</
telerik:InputBindingCollection
>
</
telerik:CommandManager.InputBindings
>
where you can easily change the Gesture and Command properties.
For more details how to change the Appointment's template you can read here and here.
Hi, I have the same problem. I've made CustomAppointmentStyleSelector with OverrideDefaultAppointment template. I've done this inside:
<Grid.InputBindings>
<MouseBinding MouseAction="RightClick" Command="{x:Staticm scheduleView:RadScheduleViewCommands.EditAppointment}"/> </Grid.InputBindings>
I also made scheduleView_ShowDialog method, where i cancel opening default appointment editing window and open custom one. Everything worked fine, until I've used MouseAction="LeftDoubleClick" (this opened my view and worked fine). When i changed mouse action to RightClick, first click on the appointment doesn't do anything and every second click works.
Do you maybe know what am I doing wrong?
I wanted to attach video, but i get an error: (allowed: .jpg, .jpeg, .gif, .png). So here is link to my dropbox: https://www.dropbox.com/s/4yfsxkrxydnsh3s/SchedulerTelerik.swf?dl=0
Regards,
Hipokrat
We cannot be sure what is happening in your exact scenario based on only the video provided. An alternative approach that you can try is the following logic in the PreviewMouseLeftButtonDown event of the RadScheduleView control:
private
void
RadScheduleView_MouseLeftButtonDown(
object
sender, System.Windows.Input.MouseButtonEventArgs e)
{
if
((e.OriginalSource
as
UIElement).ParentOfType<AppointmentItem>() !=
null
)
{
Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, (Action)(() =>
{
RadScheduleViewCommands.EditAppointment.Execute(scheduleView.SelectedAppointment, scheduleView);
}));
}
}
Regards,
Stefan Nenchev
Telerik by Progress