Select Slot on double click

4 posts, 0 answers
  1. Robertyo Grifalconi
    Robertyo Grifalconi avatar
    5 posts
    Member since:
    Sep 2012

    Posted 24 Sep 2012 Link to this post

    Hi,
    is there a way to select a slot of ScheduleView on mouse double click instead of mouse right click?

    How can i implement it?

    Thanks,
    Rob

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 27 Sep 2012 Link to this post

    Hello Rob,

    By default on double click over a slot, EditAppointmentDialog is shown.  So in order to change this behavior, you should cancel the dialog. This can be done in ShowDialog event as explained in the following link:
    http://www.telerik.com/help/silverlight/radscheduleview-howto-prevent-dialogs-from-opening.html

    All the best,
    Yana
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Robertyo Grifalconi
    Robertyo Grifalconi avatar
    5 posts
    Member since:
    Sep 2012

    Posted 27 Sep 2012 Link to this post

    Hi Yana,
    thanks for your help, but my problem isn't how to modify the behavior about EditAppointmentDialog.

    I've already cancel the dialog with:
    private void RadScheduleView_ShowDialog(object sender, ShowDialogEventArgs e)
    {
        if (e.DialogViewModel is AppointmentDialogViewModel)
    	e.Cancel = true;
     
        if (e.DialogViewModel is ConfirmDialogViewModel)     {         e.DefaultDialogResult = true;         e.Cancel = true;     } }


    but i've not found the way to know the selected slot at double click.

    For example, if i catch the MouseLeftButtonUp event when the user select more than one slot of RadScheduleView i'm able to know which slots are selected like this:

    void scheduleView_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
    {
        var radScheduleView = ((RadScheduleView)sender);
        var selectedSlot = radScheduleView.SelectedSlot;

        if (selectedSlot == null)
            return;
        IAppointment app = new Appointment() { Start = selectedSlot.Start, End = selectedSlot.End, Subject = "new appointment" };
        
        //other code here
    }

    but if i catch the mouseDoubleClick event when the user does a doubleClick over a single slot the radScheduleView.SelectedSlot is always null.

    Thanks, Rob
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 01 Oct 2012 Link to this post

    Hi Rob,

    I have checked MouseDoubleClick event and was able to get the SelectedSlot in the handler. Could you please confirm that you're using the latest versions of the controls? Can you send us a sample project showing the problem? Thanks in advance.

    Regards,
    Yana
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Back to Top