Glad you figured out the versioning thing kinda thought it was something like that
I think all of your questions are things I have added after I posted the sample app, At first the basic idea was to be able to use the dataset class with Xtra Reports and for read-only master-Detail grids to allow a "drill down" capability. I was mainly interested in being able to have access to all the strong typed fields at design time because it makes report design alot easier and I was happy with that!
After having some issues with the business binding source I decided to try to make this dataset class stay in sync with the business objects (read-write),anyways I think I have it working for the most part but it may still be a little bit buggy I don't remember where I left off Friday but I'll try to post what I have so far a bit later today if I can.
Paul
I saw 7.2 and I thought our versions where the same but you are 7.2.2 while I'm still using 7.2.1. Anyway I can see things now and what you've done looks really good - I will certainly take a much closer look because the inbuilt Parent/Child stuff in DevExpress always seemed like a very clean UI to me. A couple of questions though:
1) When I look in the code I see only boCustomer is exposed. Could all the bo's be dropped on the form and everything would work ok?
2) In the screen shots I see the SF toolbar is on the form. Does that work ok in whatever grid view has focus?
3) I take it the general flow is the BOs are populated as normal and, within DataSetBase (very clever BTW), the relations are created (using info from the BOs) and the data loaded for use in the various grids. If this is so how do changes in DsCustomerOrders dataset make their way back into the BO's for saving to the database?
Cheers, Peter
The project doesn't have the business objects that you are using in the dataset so I can't easily see what the issue is.
Are you saying the dataset does not show up on your toolbox?
Here are the steps that should make this work
Create a class that inherits from datasetbase
drop business objects on the new class
override relations if needed
Rebuild solution
should have new class in toolbox,
drag new class onto form or report from toolbox and set data source and member
Let's take the report approach as this will be what I believe everyone is trying to accomplish here. We have a reporting assembly that has a data source for each report that we create. Our base data source inherits off of the BusinessBindingSource, we also inherit the BO we plan to use off of the primary BO so that we can add any custom fields without making a mess of the original BO.
'-- Add any custom Fill methods to retrieve data specific to the report (supports INNER JOINS, etc)
'-- Add any custom fields that may be specific to the report
End ClassPublic Class MyBaseDataSource Inherits BusinessBindingSource
Private _ReportBO As New MyReport_CustomersBO
Public Sub New() '-- Attach the data source to the binding source Me.BusinessObject = _ReportsBOEnd Sub
End Class
Does that allow you to do master detail binding?
In other words
Customer-->
Orders-->
Order Items
Private Shared _CustomerOrdersBBS As New CustomerOrdersBBS()
Public ReadOnly Property CustomerOrders Get '-- Filter out the child records _CustomerOrdersBBS.BusinessObject.Filter = "or_cust_pk=" & Me.BusinessObject.cust_pk.ToString()
'-- Return the filtered BO Return _CustomerOrdersBBS End GetEnd Property
This is what we do for all of our reporting and have some very deep and complex relationships and it has worked out great!
I got really busy yesterday so wasn't able to spend much time looking at this. Is there anyway you can create a sample of how to use the BBS to create a master detail grid?
I had some issues using the BBS as a binding source that was discussed in another thread. Ben gave me some good suggestions on how to get around the issues I faced but I ended up using this approach to grid binding as it meant I did not have to refactor and then retest quite a bit of logic.
Anyways it would be great to see an sample of how it would work using a BBS.
I got really busy yesterday so didn't have a chance to post this, this is an editable version of the data set class, basically what I am trying to do is to keep the business objects on the form in sync with the data tables in the data set.
For the most part I think it will work ok but there still may be some gotcha's I haven't ran across. I also threw in a report so you can see how that works.
Anyways I hope this helps out anyone that is looking to do this sort of thing.
I also am posting an infragistics 2007 volume1 version just cause it was easy enough to do .