Hi
if you replace Button with RadButton the menu won't appear anymore on button click.
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"> |
<telerik:GridViewColumn.CellTemplate> |
<DataTemplate> |
<Button Content="Misc" > |
<telerikNavigation:RadContextMenu.ContextMenu > |
<telerikNavigation:RadContextMenu EventName="Click" > |
<telerikNavigation:RadContextMenu.Items> |
<telerikNavigation:RadMenuItem Header="IF Script" /> |
<telerikNavigation:RadMenuItem Header="Transform Script" /> |
</telerikNavigation:RadContextMenu.Items> |
</telerikNavigation:RadContextMenu> |
</telerikNavigation:RadContextMenu.ContextMenu> |
</Button> |
</DataTemplate> |
</telerik:GridViewColumn.CellTemplate> |
</telerik:GridViewColumn> |
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?
Tx