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

IsEnabled of COntextMenu Does not Work

1 Answer 61 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sandeep
Top achievements
Rank 1
Sandeep asked on 02 Jul 2015, 12:31 PM

I want to make a feature that when user is logged in then context menu should appear else it should not. but the IsEnabled  property of the contextmenu does not work.

 <telerikPrimitives:RadContextMenu.ContextMenu>
                <telerikPrimitives:RadContextMenu IsEnabled="False" IsZoomEnabled="True">
                    <telerikPrimitives:RadContextMenuItem Content="Hii" Command="{Binding someparameter}" CommandParameter="{Binding}"/>
</telerikPrimitives:RadContextMenu>
</telerikPrimitives:RadContextMenu.ContextMenu>

 

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 07 Jul 2015, 11:07 AM
Hello,

Maybe you can use a different approach. You can try subscribing to the Opening event of the RadContextMenu component. Inside its handler you will be able to perform the necessary checks and decide if the menu should appear. If you need to close the menu you can simply set the e.Cancel property to True - otherwise set it to False and the menu will be visualized.

Please give this approach a try and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ContextMenu
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or