This question is locked. New answers and comments are not allowed.
Hi
No forum for Context menu control so will post it here.
I'm trying to do something that would seem silmple but am having problems with bindings.
Scenario:
I have a radtabitem that has its datacontext set to a viewmodel, call it 'MainViewModel'
I have a radgridview inside the radtabitem that is bound to property on 'MainViewModel' which is an observablecollection<SubViewModel>
When I rightclick a radgridview row I would like a context menu with 2 menu items 'Save' and 'Cancel'.
The 'Save' and 'Cancel' menu items should be bound to commands in 'SubViewModel', also 'SubViewMenu' exposes a 'IsDirty' property which should be used to set the enabled property of the menu items.
When checking the output window, 'Save', 'Cancel' and 'IsDirty' can't be found on 'MainViewModel'.
I have set the property on the context menu InheritDataContext="True" thinking that it would use the DataContext of the radgridview which is where the properties are that I'm trying to bind to. This doesn't work for me.
Silverlight 5
Current build of Telerik Silverlight controls
MVVM
Can anybody help me with this?
Thanks
Paul
No forum for Context menu control so will post it here.
I'm trying to do something that would seem silmple but am having problems with bindings.
Scenario:
I have a radtabitem that has its datacontext set to a viewmodel, call it 'MainViewModel'
I have a radgridview inside the radtabitem that is bound to property on 'MainViewModel' which is an observablecollection<SubViewModel>
When I rightclick a radgridview row I would like a context menu with 2 menu items 'Save' and 'Cancel'.
The 'Save' and 'Cancel' menu items should be bound to commands in 'SubViewModel', also 'SubViewMenu' exposes a 'IsDirty' property which should be used to set the enabled property of the menu items.
When checking the output window, 'Save', 'Cancel' and 'IsDirty' can't be found on 'MainViewModel'.
I have set the property on the context menu InheritDataContext="True" thinking that it would use the DataContext of the radgridview which is where the properties are that I'm trying to bind to. This doesn't work for me.
Silverlight 5
Current build of Telerik Silverlight controls
MVVM
Can anybody help me with this?
Thanks
Paul