IsEnabled of COntextMenu Does not Work

2 posts, 0 answers
  1. Sandeep
    Sandeep avatar
    2 posts
    Member since:
    Jul 2015

    Posted 02 Jul 2015 Link to this post

    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>

     

  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 07 Jul 2015 Link to this post

    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
  3. DevCraft banner
Back to Top