This is a migrated thread and some comments may be shown as answers.

Buttons added to Header/Footer look for a Command in the FormViewModel rather than the Dataform's datacontext

1 Answer 37 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 12 Aug 2011, 05:42 PM
Hello,

I'm attempting to add a radbutton to the footer of a dataform. My problem is that every property on the radbutton is directing to the FormViewModel rather than the View Model which the dataform is bound to. I assume that this is because that is where the commands for the Cancel and Commit buttons are.

How can I redirect a binding to the templated parent's view model? I need to be able to bind a few properties (content, command, visibility) to the parent view model rather than your internal FormViewModel.


Thanks,

Ryan Brown

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 15 Aug 2011, 09:25 AM
Hi Ryan,

 
You may try to create a DataContextProxy as demonstrated in the following blog post. 


Best wishes,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
DataForm
Asked by
Ryan
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or