Key Delete disable to prevent the appointment elimination

3 posts, 1 answers
  1. Aurelio Righetti
    Aurelio Righetti avatar
    51 posts
    Member since:
    May 2009

    Posted 12 Sep Link to this post

    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. Answer
    Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 15 Sep Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Aurelio Righetti
    Aurelio Righetti avatar
    51 posts
    Member since:
    May 2009

    Posted 15 Sep Link to this post

    Hello Kalin

    It's work great...many many thanks

    Aurelio

Back to Top