Re: i love reflection:)
- From: "Pieter" <pietercoucke@xxxxxxxxxxx>
- Date: Mon, 27 Feb 2006 09:31:57 +0100
So you're not really using DataBinding, but just updating the appropriate
Property when a control changes?
And how does it work when one of the property's of your business object
changes, and the Form must be updated?
Pieter
"guy" <guy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B7DA1FBA-D044-463A-A03F-6DCFF2D1B877@xxxxxxxxxxxxxxxx
hi,
cant give you the code as its in a number of methods in a couple of
classes
but:-
in the base form...
load event get a hashtable of all the controls you might want to bind to
add an event handler that binds to the leave event or similar (1 handler
for
all the controls) that handler can then use reflection to update the
appropriate property in the business object.
declare a business object of base type
write a display method that uses reflection to display all the properies
in
the business object, call this from the event raised in the business
object
(below)
ensure that when you name controls in the form they correspond to property
names in the business class, with + txt, lbl or whatever
in the base business class...
raie an event when any property you are interested in changes value
thats pretty much it (written at 3am so i may have missed a few bits!)
drop me an email to guy.omitthis@xxxxxxxxxxx and i will send you the code
when i have it fully tidied up
cheers
guy
.
- Follow-Ups:
- Re: i love reflection:)
- From: guy
- Re: i love reflection:)
- References:
- Re: i love reflection:)
- From: Cor Ligthert [MVP]
- Re: i love reflection:)
- From: spamsux
- Re: i love reflection:)
- Prev by Date: Re: NEWBIE question
- Next by Date: Re: Did we lose the RadioCheck property on menuitems
- Previous by thread: Re: i love reflection:)
- Next by thread: Re: i love reflection:)
- Index(es):
Relevant Pages
|