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.

how to disable the delete action in context menu

Thread ID:

Created:

Updated:

Platform:

Replies:

123749 Apr 18,2016 09:39 AM Apr 19,2016 03:02 AM UWP 2
loading
Tags: SfSchedule
citt_jr
Asked On April 18, 2016 09:39 AM

Hello,

How to disable the delete action in context menu of a schedule without declare new context menu ?

Vigneshkumar Ramasamy [Syncfusion]
Replied On April 19, 2016 02:43 AM

Dear Customer,

Thanks for using Syncfusion product.

As of now your requirement of disable delete option in the context menu can be achieved by overriding the default template of EditRadialMenuControl in the schedule control. We have prepared sample for the same and please find the sample in the below link.

Sample Link: Schedule_DisableMenu

In above sample we have used below code snippet to disable the delete option in the context menu.


<
radialmenu:SfRadialMenuItem IsEnabled="False" IsHitTestVisible="False" Opacity="0.1"  GroupName="ContextMenu">

                                <radialmenu:SfRadialMenuItem.Header>

                                    <Border Background="Transparent" Padding="5">

                                        <StackPanel>

                                            <Path UseLayoutRounding="False" Stretch="Fill" Width="15" RenderTransformOrigin="0.5,0.5" Opacity="1" Height="20" Fill="#484949" Data="M33.977998,27.684L33.977998,58.102997 41.373998,58.102997 41.373998,27.684z M14.841999,27.684L14.841999,58.102997 22.237998,58.102997 22.237998,27.684z M4.0319996,22.433001L52.183,22.433001 52.183,63.999001 4.0319996,63.999001z M15.974,0L40.195001,0 40.195001,7.7260003 56.167001,7.7260003 56.167001,16.000999 0,16.000999 0,7.7260003 15.974,7.7260003z" />

                                            <TextBlock x:Name="EditDeleteMenuText" Margin="0,5,0,0" Text="Delete" Foreground="#484949" HorizontalAlignment="Center"/>

                                        </StackPanel>

                                    </Border>

                                </radialmenu:SfRadialMenuItem.Header>

                            </radialmenu:SfRadialMenuItem>



Regards

Vigneshkumar R


Vigneshkumar Ramasamy [Syncfusion]
Replied On April 19, 2016 03:02 AM

Dear Customer,

Please ignore the previous update.

As of now your requirement of disable delete option in the context menu can be achieved by overriding the default template of EditRadialMenuControl in the schedule control. We have prepared sample for the same and please find the sample in the below link.

Sample Link:
Schedule_DisableMenu

In above sample we have used below code snippet to disable the delete option in the context menu.


<
radialmenu:SfRadialMenuItem IsEnabled="False" IsHitTestVisible="False" Opacity="0.1"  GroupName="ContextMenu">

                                <radialmenu:SfRadialMenuItem.Header>

                                    <Border Background="Transparent" Padding="5">

                                        <StackPanel>

                                            <Path UseLayoutRounding="False" Stretch="Fill" Width="15" RenderTransformOrigin="0.5,0.5" Opacity="1" Height="20" Fill="#484949" Data="M33.977998,27.684L33.977998,58.102997 41.373998,58.102997 41.373998,27.684z M14.841999,27.684L14.841999,58.102997 22.237998,58.102997 22.237998,27.684z M4.0319996,22.433001L52.183,22.433001 52.183,63.999001 4.0319996,63.999001z M15.974,0L40.195001,0 40.195001,7.7260003 56.167001,7.7260003 56.167001,16.000999 0,16.000999 0,7.7260003 15.974,7.7260003z" />

                                            <TextBlock x:Name="EditDeleteMenuText" Margin="0,5,0,0" Text="Delete" Foreground="#484949" HorizontalAlignment="Center"/>

                                        </StackPanel>

                                    </Border>

                                </radialmenu:SfRadialMenuItem.Header>

                            </radialmenu:SfRadialMenuItem>


Note: The above solution is applicable only for UWP windows platform and for UWP windows phone, you need to create custom radial menu to disable the delete option.

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.

;