I am currently rewriting our CRM product using SF and require this ability on 12 grids. Our current CRM uses LLBLGen for data access and the hierarchical data structure is already built into the business object class. I can't seem to figure out how to make this work using the SF BO's. An example would be very helpful or even some direction on how to make it work would help as well.
Thanks
Tim
We have actually been trying to come up with a "reasonable" and simple solution. At the moment it requires a bit of work just due to the fact of how the UltraGrid bands are expecting to interact with the objects. I know that Ben had played with this quite a while the other day and we do not have a straight forward answer on this topic yet.
Public Sub New() MyBase.New() Me.BusinessObject = New CustomersBO() End SubEnd Class
Public Class MyOrdersBBS Inherits MicroFour.StrataFrame.Business.BusinessBindingSource
Public Sub New() MyBase.New() Me.BusinessObject = New OrdersBO() End SubEnd Class
Public Class CustomersBO Inherits MicroFour.StrataFrame.Business.BusinessLayer
Private Shared _OrdersBBS As New MyOrdersBBS Public ReadOnly Property Orders() As MyOrdersBBS Get Dim lcFilter As String = "or_cust_pk=" & Me.cust_pk.ToString() If Not _OrdersBBS.BusinessObject.Filter.Equals(lcFilter) Then _OrdersBBS.BusinessObject.Filter = lcFilter End If Return _OrdersBBS End Get End Property Private Sub CustomersBO_CurrentDataTableRefilled() Handles Me.CurrentDataTableRefilled If Not Me.DesignMode Then _OrdersBBS.BusinessObject.FillByParent(Me) End If End SubEnd Class
Then when you bind the CustomersBBS you will have the orders, etc. This will obviously take some "tweaking" and I have not tested it on a grid. But it might be a different approach to try. You will probably have to take into account the navigated event to apply the filter since this is associated with a grid. But it is just a thought.
Basically you drag and drop your business objects onto a data set and then drag the dataset onto the form and set the datasource of the grid or report. I haven't had any problems using it so far actually I worked on it over the last week and a little over the weekend.