single click to edit appointment

6 posts, 0 answers
  1. Kenneth
    Kenneth avatar
    104 posts
    Member since:
    Apr 2014

    Posted 20 Mar 2015 Link to this post

    Is there a way to detect a click (mouseleftbuttonup) on an appointment rather than the doubleclick?

    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.
  2. Kenneth
    Kenneth avatar
    104 posts
    Member since:
    Apr 2014

    Posted 23 Mar 2015 in reply to Kenneth Link to this post

    I should also say this is in month-view.
  3. Rosi
    Admin
    Rosi avatar
    2529 posts

    Posted 24 Mar 2015 Link to this post

    Hi,


    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.
  4. Trajce
    Trajce avatar
    2 posts
    Member since:
    Oct 2016

    Posted 04 Apr in reply to Rosi Link to this post

    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

     

     

  5. Trajce
    Trajce avatar
    2 posts
    Member since:
    Oct 2016

    Posted 04 Apr in reply to Trajce Link to this post

    I just realized that I did not post this in right section, i use telerik for WPF...
  6. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    534 posts

    Posted 06 Apr Link to this post

    Hello,

    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
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top