Difference between Validated and Validating
-
Dear Sirs, I can't figure out the difference between
Control.Validated
andControl.Validating
. I see the difference is that one's called, then the other's called. Here is the code I found inControl
:if (this.NotifyValidating())
{
return true;
}
if (bulkValidation || NativeWindow.WndProcShouldBeDebuggable)
{
this.NotifyValidated();
}So it looks like
Validating
can cancel theValidated
event's scheduled run by setting theCancel
field of theEventArgs
, but is that the only difference? Of what use is that? Thanks.In Christ, Aaron Laws http://ProCure.com
-
Dear Sirs, I can't figure out the difference between
Control.Validated
andControl.Validating
. I see the difference is that one's called, then the other's called. Here is the code I found inControl
:if (this.NotifyValidating())
{
return true;
}
if (bulkValidation || NativeWindow.WndProcShouldBeDebuggable)
{
this.NotifyValidated();
}So it looks like
Validating
can cancel theValidated
event's scheduled run by setting theCancel
field of theEventArgs
, but is that the only difference? Of what use is that? Thanks.In Christ, Aaron Laws http://ProCure.com
Rather than guessing what each event does why not take the time to actually read the documentation? control.validated[^] control.validating[^]
I know the language. I've read a book. - _Madmatt
-
Dear Sirs, I can't figure out the difference between
Control.Validated
andControl.Validating
. I see the difference is that one's called, then the other's called. Here is the code I found inControl
:if (this.NotifyValidating())
{
return true;
}
if (bulkValidation || NativeWindow.WndProcShouldBeDebuggable)
{
this.NotifyValidated();
}So it looks like
Validating
can cancel theValidated
event's scheduled run by setting theCancel
field of theEventArgs
, but is that the only difference? Of what use is that? Thanks.In Christ, Aaron Laws http://ProCure.com
Well, if you think about what the words mean, validating can be cancelled as it's called during the validation process. Validated is called after.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Rather than guessing what each event does why not take the time to actually read the documentation? control.validated[^] control.validating[^]
I know the language. I've read a book. - _Madmatt
Dear Mr. Nischalke, Yeah, I read that, I just can't figure out what the use might be.
In Christ, Aaron Laws http://ProCure.com
-
Dear Mr. Nischalke, Yeah, I read that, I just can't figure out what the use might be.
In Christ, Aaron Laws http://ProCure.com
It's painfully clear. When you validate, there's an event you can catch to do further validation and thus reject it. When it's been validated, there's an event so you can know if it passed or not.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Dear Mr. Nischalke, Yeah, I read that, I just can't figure out what the use might be.
In Christ, Aaron Laws http://ProCure.com
You are going to have a very difficult time in this field if something so simple throws you off.
I know the language. I've read a book. - _Madmatt
-
You are going to have a very difficult time in this field if something so simple throws you off.
I know the language. I've read a book. - _Madmatt
-
Dear Sirs, I can't figure out the difference between
Control.Validated
andControl.Validating
. I see the difference is that one's called, then the other's called. Here is the code I found inControl
:if (this.NotifyValidating())
{
return true;
}
if (bulkValidation || NativeWindow.WndProcShouldBeDebuggable)
{
this.NotifyValidated();
}So it looks like
Validating
can cancel theValidated
event's scheduled run by setting theCancel
field of theEventArgs
, but is that the only difference? Of what use is that? Thanks.In Christ, Aaron Laws http://ProCure.com
Dear Sirs, Thanks for your sharp responses. It didn't throw me off, but it seemed a bit redundant, that's all. The clarity is indeed blinding as to what happens, but the intent is still - to me - less than clear. I'm beginning to see why this might be necessary, but I still can't think of an example. A specific example could be great, if you please.
In Christ, Aaron Laws http://ProCure.com
-
HA! Who is in danger of being too qualified?
In Christ, Aaron Laws http://ProCure.com