Hierarchical data (UltraGrid)


Author
Message
Tim Dol
Tim Dol
StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
In one of the forum posts back on February, Trent mentioned that you guys planned to release a sample  showing how to create children bands within the Infragistics Ultragrid using the SF BOs. 

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

Tim Dol
Tim Dol
StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Just wondering if I can get confirmation on this issue. I still can't get this to work and want to know if it's possible, and if so, how to make it work.

Thanks

Tim

Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.

Tim Dol
Tim Dol
StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)StrataFrame User (398 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Trent, thank you for the update and I appeciate all the effort. I'm crossing my fingers...

Tim

Bastian Töpfer
Bastian Töpfer
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 32, Visits: 107
Any news on that topic?
Paul Chase
Paul Chase
Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
What I did was create a class the inherits from data set and implements Icontainer control. I then use this as a datasource for the grid. I am only using it read only and not for data entry but I suppose that you could. 
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
One option that may work as well is creating a custom data source that inherits the BBS (BusinessBindingSource) then create child properties that expose other BBS classes.  This is the approach that we have taken with our reports and I have not tested it on this grid.  We ended up create a custom object model for all of our complicated grid interaction that has the logic to go and update the BOs.  But what I am talking about above would be something like this:

Public Class MyCustomersBBS
    Inherits MicroFour.StrataFrame.Business.BusinessBindingSource

    Public Sub New()
        MyBase.New()
        Me.BusinessObject = New CustomersBO()
    End Sub
End Class

Public Class MyOrdersBBS
    Inherits MicroFour.StrataFrame.Business.BusinessBindingSource

    Public Sub New()
        MyBase.New()
        Me.BusinessObject = New OrdersBO()
    End Sub
End 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 Sub
End 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. Smile

Paul Chase
Paul Chase
Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)Advanced StrataFrame User (574 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Here is a sample using both the Infragistics and Dev Ex grid and the SF Sample Data.

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.

Attachments
DataSetSample.zip (214 views, 864.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search