Commit button binding

3 posts, 0 answers
  1. Greg
    Greg avatar
    13 posts
    Member since:
    Jun 2011

    Posted 03 Aug 2011 Link to this post

    Hello! I'm working with the DataForm and I have what I would guess is a simple question. I'm using a DataForm to edit a single item and I'd like to bind the Commit button to an ICommand on my ViewModel. How do I go about doing that?

    -Greg
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 04 Aug 2011 Link to this post

    Hello Greg,

    The fact that you want the Command's logic to be executed in your view model makes the things little bit more difficult. I have prepared an example project, but the approach is kind of hacky. Please, refer to it and let me know whether this approach meets your requirements. 

    Kind regards,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Greg
    Greg avatar
    13 posts
    Member since:
    Jun 2011

    Posted 04 Aug 2011 Link to this post

    Thanks for the quick turn-around, Ivan! Your example certainly works, but I agree it's a little bit hackish. I suppose my perception of how DataForm works is/was a little bit skewed. No worries. I'll re-evaluate my approach. Thanks!!

    -Greg
Back to Top