Re: Is Dirty

Greg Robinson <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <[email protected]>
Somewhat related, when using Data Binding, if you touch a field (say a
textbox that is data bound) the DataRow gets flagged "Modified".  If you
'untouch' the DataRow is still flagged as Modified. We wrote a
DataReallyIsDirty method that compares original to current and if they are
the same the commit is cancelled, even though the DataRow is marked as
modified .



-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[email protected]]On Behalf Of
Brady Kelly
Sent: Thursday, May 17, 2007 11:02 AM
To: [email protected]
Subject: Re: [DOTNET-WINFORMS] Is Dirty


My argument as well, against using the Quick-draw method described by Phil.
My first response as a user is, "But I haven't changed anything!" and I'm
fortunate enough to understand why it happens.  Imagine the telephonist
users I expect this app targeted at.  Ok, maybe they won't even be bothered
about it.


> -----Original Message-----
> From: Discussion forum for developers using Windows Forms to build apps
> and controls [mailto:[email protected]] On Behalf Of
> Peter Osucha
> Sent: 17 May 2007 16:50 PM
> To: [email protected]
> Subject: Re: [DOTNET-WINFORMS] Is Dirty
>
> That isn't quite as efficient though (I don't think).  If a user changes
> something and then changes it back, the 'IsDirty' would still be true
> even though technically, nothing has changed.  I haven't done the
> serializing thing to check for IsDirty but it seems solid.
>
> -----Original Message-----
> From: Discussion forum for developers using Windows Forms to build apps
> and controls [mailto:[email protected]] On Behalf Of
> Phil Sayers
> Sent: Thursday, May 17, 2007 10:29 AM
> To: [email protected]
> Subject: Re: [DOTNET-WINFORMS] Is Dirty
>
> inside your entity, or even in a common base class...
>
> add a property, and a backing field
>
> Public ReadOnly prperty IsDirty
> get
> return _IsDirty
> end get
>
> in all your public property Set blocks add "_isDirty = True"
>
>
>
>
> -----Original Message-----
> From: Discussion forum for developers using Windows Forms to build apps
> and controls [mailto:[email protected]]On Behalf Of
> Brady Kelly
> Sent: Thursday, May 17, 2007 10:25 AM
> To: [email protected]
> Subject: [DOTNET-WINFORMS] Is Dirty
>
>
> I'm doing a quick and dirty prototype app, with one simple detail edit
> screen, so I've used simple own code to transfer values between controls
> and
> data entity, deferring properly implementing data binding at a later
> stage[1].  Now I want to know if the edited entity is 'dirty'.  My first
> reaction is to serialise it on starting my edit, and then when closing
> the
> form, and compare the two.  How do the experts here feel about this?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.