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

2 posts, 0 answers
  1. Ryan
    Ryan avatar
    18 posts
    Member since:
    Oct 2010

    Posted 12 Aug 2011 Link to this post

    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
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 15 Aug 2011 Link to this post

    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 >>

  3. DevCraft banner
Back to Top