ViewModel<T>, IsDirty and ObjectStatus

ViewModel<T>, IsDirty and ObjectStatus

Old forum URL: forums.lhotka.net/forums/t/8202.aspx


Devman posted on Wednesday, December 23, 2009

Hi,

Im looking at moving one of our test forms to using MVVM. Initially we had CslaDataProviders and an ObjectStatus pointing to the main dataprovider for IsDirty binding. Is an ObjectStatus still needed for IsDirty binding to work as Im currently binding to Model.IsDirty without success?

Regards
David

RockfordLhotka replied on Wednesday, December 23, 2009

ViewModel has a set of slightly more abstract properites most people bind to (CanCancel, CanSave, etc).

If you really want to bind to IsDirty you'll need to use ObjectStatus.

Devman replied on Wednesday, February 10, 2010

Hi Rocky,

This is really a feature request so not sure if this is the correct area.

I would love to see IsDirty and IsValid added to the ViewModelBase<T> as CanSave,CanEdit etc have been.

In our application we need to see that a record is IsDirty and whether its valid, which the Can_ variables dont cover. I've lifted csla's ViewModel<T>  and ViewModelBase<T> classes into our source to add these in to get property changed notifactions working correctly. Im not sure if there was an easier way to achieve this.

Best Regards

David

 

Copyright (c) Marimer LLC