Binding objects ?

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
 
B

Brock Allen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top