T
Tubs
I am trying to use data binding to avoid having to write event
handlers everywhere for my data transfer from controls to data source
and all is working well except, i have a condition i would like to
place on the value before i let it go through. I have built an
expression evaluator to determine when something is valid versus
invalid.
My problem is that when i trap the format event of the data binding, i
can get to the value before it goes into the control but what i can't
figure out is how to stop the actual value from getting there when the
eval says it is not valid.
Example:
I have a simple binding set up for a text box to go to another text
box but i only want the 2nd text boxes value to update when the first
one is alpha numeric. So in the format event i can put something like
if ce.DesiredType is GetType(String) then Return else ...
This is where i come up scratching my head. how can i essentially say
Cancel the request to send the value over. It might be something
simple i am missing but i can't find it.
Thoughts?
handlers everywhere for my data transfer from controls to data source
and all is working well except, i have a condition i would like to
place on the value before i let it go through. I have built an
expression evaluator to determine when something is valid versus
invalid.
My problem is that when i trap the format event of the data binding, i
can get to the value before it goes into the control but what i can't
figure out is how to stop the actual value from getting there when the
eval says it is not valid.
Example:
I have a simple binding set up for a text box to go to another text
box but i only want the 2nd text boxes value to update when the first
one is alpha numeric. So in the format event i can put something like
if ce.DesiredType is GetType(String) then Return else ...
This is where i come up scratching my head. how can i essentially say
Cancel the request to send the value over. It might be something
simple i am missing but i can't find it.
Thoughts?