We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Cancel key pressing

Thread ID:

Created:

Updated:

Platform:

Replies:

131731 Jul 25,2017 09:27 AM Jul 28,2017 05:56 AM WPF 2
loading
Tags: SfSchedule
josep
Asked On July 25, 2017 09:27 AM

Hi folks,

I need cancel any keyboard input pressing on schedule view (specially Del key). I have tested:

                    <schedule:SfSchedule x:Name="schedule" Grid.Column="0" Grid.Row="0"
                        CurrentDateBackground="DarkCyan"
                        CurrentDateForeground="White"
                        CellSelectionBrush="DarkBlue"
                        ScheduleType="Month"
                        ScheduleClick="schedule_ScheduleClick"
                        PreviewKeyDown="schedule_PreviewKeyDown"/>


        private void schedule_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            e.Handled = false;
        }

But Del que still deletes appointments (I do not want to delete using keyboard)

Cheers

Subburaj Pandian Veluchamy [Syncfusion]
Replied On July 27, 2017 02:16 PM

Hi Josep, 
 
Thank you for contacting Syncfusion support. 
 
Currently we are checking on this requirement to achieve in sample level, we will analyze and update you the details at the earliest. We appreciate your patience until then. 
 
Regards,   
Subburaj Pandian V.     


Vigneshkumar Ramasamy [Syncfusion]
Replied On July 28, 2017 05:56 AM

Hi Josep 
 
Thanks for your patience. 
 
As of now we don’t have any direct support to prevent deleting appointment when Delete key pressed. But we have created a sample level workaround to achieve your requirement by using AppointmentCollectionChanged event. Please find the sample in the below link. 
 
Sample link:
SfSchedule_WPF
 
 
In the above sample based on the NotifyCollectionChangedAction we have achieved your requirement. Please find the below code snippet for the same. 
 
private void Schedule_AppointmentCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) 
        { 
            if (e.Action == NotifyCollectionChangedAction.Remove && this.isDeleteButtonPressed) 
            { 
 
            } 
        } 
 
Please let us know if you have any concern. 
 
Regards 
Vigneshkumar R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;