New Posts New Posts RSS Feed: Question about DataSource objects
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Question about DataSource objects

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: Question about DataSource objects
    Posted: 16-Jul-2007 at 10:59am
I have a model project that I have added as a reference to my UI project.  When I want to setup a bindingsource to a specific business object I have to go through the procedure of creating a new datasource.  This has created a proliferation of datasource objects in my project that I don't really think are necessary (my 'thinking' may be the whole problem).  Couldn't I somehow work around this situation?  I see no data source folders or files anywhere in the Cabana application source code.
Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jul-2007 at 11:01am
When I configure a binding source to support a particular binding manager, I just set the DataSource property of the binding source to something that will populate it with the entities of interest.
 
For example, I might have a line of code that reads:
 
orderSummaryBindingSource.DataSource = mPm.GetEntities<OrderSummary>();
 
or perhaps
 
EntityList<OrderSummary> orders;
orders = mPm.GetEntities<OrderSummary>();
orderSummaryBindingSource.DataSource = orders;
 
where mPm is a PersistenceManager instance.
 
I guess I don't understand why you think you need to create distinct DataSource objects to populate binding sources.  If you could explain this to me then perhaps I would better understand your difficulty.
 
Back to Top
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jul-2007 at 11:04am
Shortly after I emailed you, I did the same construction in order to eliminate any kind of data source folder/file thing.  I tested it and it worked great.  I will need to go back to earlier code and try to determine what exactly was creating these files.  It may not even be related to DevForce, so I apologize for my premature cry for help.
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down