Hi,
Teleriks outdated documenation caused me, again, to lose some time finding solution.
https://docs.telerik.com/devtools/wpf/controls/radcontextmenu/how-to/use-radcontextmenu-with-radgridview
Here is implementation of RadContextMenu for RadGridView, step-by-step guide is clear and explains everything. But menu implemented in this way to my app didn't work. There is important property, not present in documentation:
BasedOn="{StaticResource RadMenuItemStyle}"
wwich changes Example 4
<
Style
x:Key
=
"MenuItemContainerStyle"
TargetType
=
"telerik:RadMenuItem"
>
<
Setter
Property
=
"Header"
Value
=
"{Binding Text}"
/>
<
Setter
Property
=
"ItemsSource"
Value
=
"{Binding SubItems}"
/>
<
Setter
Property
=
"IsEnabled"
Value
=
"{Binding IsEnabled}"
/>
</
Style
>
to
<
Style
x:Key
=
"MenuItemContainerStyle"
TargetType
=
"telerik:RadMenuItem"
BasedOn
=
"{StaticResource RadMenuItemStyle}"
>
<
Setter
Property
=
"Header"
Value
=
"{Binding Text}"
/>
<
Setter
Property
=
"ItemsSource"
Value
=
"{Binding SubItems}"
/>
<
Setter
Property
=
"IsEnabled"
Value
=
"{Binding IsEnabled}"
/>
</
Style
>
Please, update your documentation to save others time.
Best Regards,
Mateusz