Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6664371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:36:11+00:00 2026-05-26T02:36:11+00:00

I have a DataForm bound to a collection of RoleViewModel objects. I’m using MVVMLight’s

  • 0

I have a DataForm bound to a collection of RoleViewModel objects. I’m using MVVMLight’s EventToCommand behaviour bound to the EditEnding event of the DataForm to inform my ViewModel when a Role has been edited.

Now,… the user edits a role and can either click ‘OK’, ‘Cancel’ or they can simply navigate away. This information is held in the DataFormEditAction property in the DataFormEditEndedEventArgs (OK being DataFormEditAction.Commit and the others being DataFormEditAction.Cancel).

The problem is that I have to choose whether I select PassEventArgsToCommand, making the signature of the command RelayCommand<DataFormEditEndedEventArgs> or I bind the CurrentItem of the DataForm to the CommandParameter of the behaviour, making the signature RelayCommand<RoleViewModel>. I’m going to need both.

I need the EventArgs to know whether the user has cancelled the edit or not and I need the new Role to save it back to the database if they didn’t cancel it.

Does anyone have any clever suggestions here? I guess I could get my hands dirty and create a second behaviour with two parameters but I’d rather not if there’s a more elegant solution.

Any help would be greatly appreciated.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:36:12+00:00Added an answer on May 26, 2026 at 2:36 am

    If your viewmodel holds a bindable value of the newrole to the dataform, then you can PassEventArgsToCommand, and you can manipulate data before saving/updating/cancelling.

    This is how we have solved a similar scenario.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight 3 datakit:DataForm bound to a ADO.NET Data Service 1.5 CTP2
I have a TreeView that is bound to a tree of ViewModel instances. The
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Some Background I have noticed that setting the EditTemplate of a DataForm (from the
I m using a Dataform that is binded to a entity on my view
I am using themes from the Silverlight toolkit, however several of them have poor
I have a silverlight combobox inside of a dataform as follows: <dataControls:DataForm x:Name=newScheduleMasterForm Height=350
I have a simple dataform created that reads address information. The address information is
I have two projects in a VS 2010 solution: Data and DataForm. In my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.