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

Key Delete disable to prevent the appointment elimination

2 Answers 246 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Aurelio Righetti
Top achievements
Rank 1
Aurelio Righetti asked on 12 Sep 2016, 09:27 PM

Hi, it's possibile not delete the appointment then the user press the key Delete ?

I have the ShowAppointmentDeleteButton="False" and the user delete the appointment usign the contexmenu, but if press the key Delete, the appointment is delete from the scheduler but obviously not from database.

 

I have using the event PreviewKeyUp, but not work.

 

if you have any solution...thanks

 

Aurelio

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Kalin
Telerik team
answered on 15 Sep 2016, 12:20 PM
Hello,

You would be able to achieve the desired by hooking to the PreviewKeyDown event of RadScheduleView:

private void OnScheduleViewPreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
    if (e.Key == System.Windows.Input.Key.Delete)
    {
        e.Handled = true;
    }
}

Hope this helps.

Regards,
Kalin
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Aurelio Righetti
Top achievements
Rank 1
answered on 15 Sep 2016, 12:51 PM

Hello Kalin

It's work great...many many thanks

Aurelio

Tags
ScheduleView
Asked by
Aurelio Righetti
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Aurelio Righetti
Top achievements
Rank 1
Share this question
or