Binding objects ?

  • Thread starter Thread starter Jarod
  • Start date Start date
J

Jarod

Hey
I have class Budget that has property Company. This property is of type
Company ( another class ). I want to use objectDataSource and I override
ToString in company. But to edit this I have DropDownList of Company
objects, and there is problem how to set it object back ? I could copy
properties of company to Budget class using Company but it's not good design
:) I will show example of what I need:

class Company {};
budgetObject.Company <- this must be bound and updated using
objectDataSource

There is detailsView bounded to budgetObject. But there is problem on
updating it. How to do it with Company object as a property ?
Jarod
 
The declarative databinding "out of the box" works with just primitives off
of a single object, but there are events off of the ObjectDataSource such
as ObjectCreated so you can "fix it up" as necessary and also Updating, Inserting,
etc... just prior to sending it into the data access class.

-Brock
http://staff.develop.com/ballen
 
Back
Top