StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
OK, so the type editor is working. If you are using 1.4.1 or 1.5, the business objects no longer act as "data sources" for grid data binding. There is a new component that you need to use called the BusinessBindingSource. If you don't have the BusinessBindingSource in your toolbox, you will need to recreate your toolbox tab. Once you drop a BusinessBindingSource on the form, you can set the BusinessObject property on the BusinessBindingSource and the BBS will show up in the DataSources tree in the same place as your untyped DataSet. We removed the IBindingListView interface from the business objects (the interface that makes them show up in that DataSources list) because there were some issues with implementing it on the business objects directly. So, we implemented the interface on a separate component and you use that separate component as a "wrapper" on the business object to allow the business object to be accessed like a data source.
|
|
|
StarkMike
|
|
Group: Forum Members
Posts: 436,
Visits: 944
|
I added an untyped data set to a StrataFrame form and here is the data sources window.
|
|
|
StarkMike
|
|
Group: Forum Members
Posts: 436,
Visits: 944
|
Ok I'll try that.
However, is the BusinessBindingSource something you guys use internally in your framework? I know it is a native .NET control or component. You keep mentioning it and in the time that I have been using StrataFrame I've never used one. Is that something you changed in 1.4?
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
It might be a problem in either the BusinessBindingSource, or within the type editor for the DataSource property. One way to tell whether the type editor is having issues is to add a DataSet to the form and see if the grid can see the DataSet as a selectable component within list of available data sources.
|
|
|
StarkMike
|
|
Group: Forum Members
Posts: 436,
Visits: 944
|
There are no outstanding errors or warnings in the error list for that form and here is what I found in the Designer file: Me.DivisionsBO1 = New STI.DivisionsBO(Me.components) ' 'DivisionsBO1 ' Me.DivisionsBO1.ParentContainer = Me Me.DivisionsBO1.SynchronizingObject = Me Friend WithEvents DivisionsBO1 As STI.DivisionsBO P.S. I'm not getting email alerts when you respond to my posts. In the Topic Subscription Notification Type I'm still choosing Immediate Notification of New Posts by Email.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
It sounds like you have errors in your form, which can cause this problem. If you bring up the error window, what are the errors in your application? Secondaly, if you open the Form.Designer.vb file, do you see the BO declarations in this file?
|
|
|
StarkMike
|
|
Group: Forum Members
Posts: 436,
Visits: 944
|
Hey Guys, Disregard my last post.... I re-read Trent's last post to me and I double checked and the form I dropped the BO's onto is a StrataFrame form and I'm still not seeing the BOs.
What next?
|
|
|
StarkMike
|
|
Group: Forum Members
Posts: 436,
Visits: 944
|
Well, you have to use a BusinessBindingSource to bind a business object as a data source (if you have v 1.4.1 or newer I believe). This is what Ben said and it confused me because I dont remeber having to do that before. Is that something that changed in 1.4?
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
I dropped it in an xtraReports layout, in the report designer. It was only a test, anyway. I don't think this is going to be the best practice to build reports. I have a feeling that the temp BO I heard from you in another thread will do it better. I'm now wondering where I will put the code to populate this "cursor", and them, how to bind these fields into xtraReports controls. Fun, fun, fun ...
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Ivan, The reason you got this message is because the form you dropped the business object on is not inherited from MicroFour.StrataFrame.UI.Windows.BaseForm or MicroFour.StrataFrame.UI.Windows.UserControl. The BaseForm is the root of all StrataFrame forms. Both the BaseForm and UserControl have an interface called IContainerControl that has methods and properties that allow a parent container control, such as a form or user control, to have business objects dropped on them and then to know exactly how to manage those instances (Form Saves, Undos, etc.). Bottom line, to resolve your error, just base your form off of something like: MicroFour.StrataFrame.UI.Windows.Forms.StandardForm Hope this makes sense
|
|
|