Robertyo Grifalconi
Top achievements
Rank 1
Robertyo Grifalconi
asked on 24 Sep 2012, 03:23 PM
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
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
3 Answers, 1 is accepted
0
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
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.
0
Robertyo Grifalconi
Top achievements
Rank 1
answered on 27 Sep 2012, 09:59 AM
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:
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 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;but i've not found the way to know the selected slot at double click.
if (e.DialogViewModel is ConfirmDialogViewModel) { e.DefaultDialogResult = true; e.Cancel = true; } }
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
0
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
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.