M
moondaddy
I have a form where I was using databinding to bind all of it's fields to a
business class. Now I'm converting it over to binding to a list object
which is a list of the same business objects.
Note: me.Me.CustName is a textbox in this form, "Me.CustName" is a property
in the business object, and oList is a reference to the list class which as
a collection of the business objects)
Me.CustName.DataBindings.Add("Text", oList, "CustName")
Rather than updating the business class with the new value in the textbox
(CustName) when it looses the focus and is forced to update, I want the
business class to update with every time the data is changed (as each letter
is keyed) so I added the event handler:
AddHandler CustName.TextChanged, AddressOf TextValChanged
and in that event Handler I used this line to pass the value back to the
business object:
objB.CustName= sender.Text
But now I'm binding to oList which is a list of objB and I cant use this
line:
oList.CustName= sender.Text
Question: When binding to oList, how can I update it (pass the current
value of CustName) with each key stroke?
Thanks.
business class. Now I'm converting it over to binding to a list object
which is a list of the same business objects.
Note: me.Me.CustName is a textbox in this form, "Me.CustName" is a property
in the business object, and oList is a reference to the list class which as
a collection of the business objects)
Me.CustName.DataBindings.Add("Text", oList, "CustName")
Rather than updating the business class with the new value in the textbox
(CustName) when it looses the focus and is forced to update, I want the
business class to update with every time the data is changed (as each letter
is keyed) so I added the event handler:
AddHandler CustName.TextChanged, AddressOf TextValChanged
and in that event Handler I used this line to pass the value back to the
business object:
objB.CustName= sender.Text
But now I'm binding to oList which is a list of objB and I cant use this
line:
oList.CustName= sender.Text
Question: When binding to oList, how can I update it (pass the current
value of CustName) with each key stroke?
Thanks.