StrataFrame Forum

Why do I keep loosing BO in the IDE data source?

http://forum.strataframe.net/Topic9828.aspx

By Ben Hayat - 6/28/2007

I list my BOs in the "DataSource" pane for field referencing. But I keep loosing BOs in the datasource and I have to go back and add them again. I can't find any pattern as what I do, that the IDE looses the BO.



Has anyone run into this and has any solution?



Thanks!
By Greg McGuffey - 6/28/2007

You can put BOs in the data source pane?? BlinkPinchUnsureWow
By Ben Hayat - 6/28/2007

Greg McGuffey (06/28/2007)
You can put BOs in the data source pane?? BlinkPinchUnsureWow




Yes Sir! I was asking how I can see my BO fields at design time and Ben showed me that I can put BOs in the datasaource pane and you can click on each + next to BO and will show you all the fields.



The problem that I run into, They keep falling off the pane and I have to add them back again.
By Keith Chisarik - 6/28/2007

/facepalm
By Ben Hayat - 6/28/2007

Keith Chisarik (06/28/2007)
/facepalm




Can you explain that?
By StrataFrame Team - 6/29/2007

My guess of /facepalm is that it's what you do when you let out a big sigh... you put your head down and cover your face with your hand(s).  Hence, face-to-palm or /facepalm.  Wink
By StrataFrame Team - 6/29/2007

As for getting business objects in the data source pane, you can only add types or special DDEX objects to the Data Sources pane (such as SQL tables).  But, if you want to add a business object, you can either add the data source as a type (you select object from the Add New Data Source wizard) or you can create a wrapper BusinessBindingSource to go along with your business object.  To do so, you can create a new class, inherit from BusinessBindingSource, and in the constructor, set the BusinessObject property to a new instance of the business object type that you want to have in the list.  Then, go through the Add New Data Source Wizard and just like adding the BO directly, select Object and find your type in the tree view of available types.
By Ben Hayat - 6/29/2007

Ben, Thank you very much for explaning both points. Although I usually don't put my palm on my face (and that's why I didn't get the comment), I tend to kick the computer...Smile



As far as the BO on the DataSource Pane goes, I do have BBS for all the BOs and I use the wizard to add them and they stay on for a while and then they disappear.



I "think" I've found the reason. I had set my VS to reload the last project at startup and seems like I ran into serveral problems, i.e, any SF that used Themes, would not show the Theme again in IDE unless I had to go to SF References and reset the Theme again. I now changed the Startup to nothing and I manually load the project and things look normal now, including the BOs in DataSource Pane!



I always welcome your great inputs!
By StrataFrame Team - 7/2/2007

That's good to know about the auto-loading of a project... my guess would be that some of the DTE events (Design-Time Extensibility, the managed interface we tie into in order to communicate with Visual Studio) are not firing or are more likely not being attached to before the project is loaded.  I'm not sure there's a way around that... I think the project might get loaded before our add-in if you've got it set to auto-load.
By Larry Caylor - 7/19/2007

Just thought I'd pass along an issue I ran into when adding BOs the data source pane that may save someone else some time and frustration. I had added a number of BOs using the data source wizard early on in my current project. Recently I added a form that includes a BO, BusinessBindingSource and Infragistics grid. When I tried to select a data source for the grid, VS instantly crashed with no error messages. Since I've been having some designer problems with VS lately it took awhile to find the cause of the problem. But after some serious swearing and keyboard poundingCrazy, I remembered the objects in the data source pane and deleted them; problem solved. The objects that were added were not wrapped by BusinessBindingSource, which may make a difference but I haven't had the time to play around with it to see what happens.

-Larry

By StrataFrame Team - 7/20/2007

If you add a raw business object to the Data Sources pane, I can see where it would cause problems, because it doesn't implement IList.  However, adding a BusinessBindingSource that wraps a business object shouldn't cause you any problems, since it implements IList and IBindingList, etc.