ContextMenu => RadButton != Button

2 posts, 0 answers
  1. Eugen Rata
    Eugen Rata avatar
    3 posts
    Member since:
    Jul 2009

    Posted 02 Jan 2010 Link to this post

    I found a strange behavior of ContextMenu, if won't work when bound to RadButton, and works ok for simple Button. Why so?
    I'm using RadButton in my app, so the application looks consistent.
    here is the code that works
            <telerik:GridViewColumn Header="Misc" IsReadOnly="True"
                  <Button Content="Misc" > 
                        <telerikNavigation:RadContextMenu.ContextMenu > 
                          <telerikNavigation:RadContextMenu EventName="Click" > 
                              <telerikNavigation:RadMenuItem Header="IF Script" /> 
                              <telerikNavigation:RadMenuItem Header="Transform Script" /> 
    if you replace Button with RadButton the menu won't appear anymore on button click.
    BTW, what is the other best approach to have a context menu shown on button click when using inside GridView. The above code will work but I don't like that menu is created for every row. It could be done only once, but I could not find a nice solution to show the ContextMenu under the button in grid in MVVM scenario.
    Any idea?

  2. Kaloyan
    Kaloyan avatar
    920 posts

    Posted 05 Jan 2010 Link to this post

    Hello Eugen Rata,

    Please accept our apologies. We will fix the issue you are facing with our RadButton and RadContextMenu. It will be included in the SP2 scheduled for this month. Also you can grab some interesting ideas from Valeri's blog post, demonstrating an interesting approaches of how to use RadContextMenu and RadToggleButton..

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top