StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Business Object 'IsDirty' propertyExpand / Collapse
Author
Message
Posted 06/07/2007 8:41:52 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 12:38:37 PM
Posts: 308, Visits: 1,229
Is there a way to prevent the 'IsDirty' property from being set when you modify a business object?  The SetDirtyOnEdit = False works okay until you actually change the business object.  I have a couple business objects on a form which require some pre-processing and I don't want these to trigger my Save message.

Tim

Post #9401
Posted 06/07/2007 10:04:51 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:58:13 AM
Posts: 4,379, Visits: 4,421
The IsDirty property actually looks through the DataTable to see if there are any changes.  To "reset" the IsDirty property all you need to do is reject the changes on the DataTable (or AcceptChanges if you want to keep the data the same within the DataTable but just not write it back to the server).  This will reset the IsDirty flag and you can then have the behavior you are looking for.

FYI....in version 1.6.1 there is now an IsDirtyChanged event that you can handle which will tell you immediately when a value within the internal DataTable has been changed.  This really doesn't matter much to what you were doing, but I know that people have asked for this in the past and I could not remember if you were one of them.

Post #9406
Posted 06/07/2007 10:21:41 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 12:38:37 PM
Posts: 308, Visits: 1,229
Exactly what I needed.  Thanks.
Post #9407
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 4:16pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 11 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.