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

Commit button binding

2 Answers 101 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 03 Aug 2011, 05:15 PM
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 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 04 Aug 2011, 10:32 AM
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 >>
0
Greg
Top achievements
Rank 1
answered on 04 Aug 2011, 02:45 PM
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
Tags
DataForm
Asked by
Greg
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Greg
Top achievements
Rank 1
Share this question
or