Master and details devexpress grid wuth SF BO


Author
Message
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Any sample code to show how to have master and details BOs shown in XtraGrid (in same grid)?



Thank you
Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Yes, you can chanin these together.  So you may have a CustomersBBS and a CustomerOrdersBBS.  Within the CustomersBBS you can create a property that exposes the CustomerOrdersBBS.  There are two hitches that you have to account for.  First, the private field that exposes the child needs to be shared and second, you have to manually filter out the child records when returning the child object.

Public Class CustomersBBS
    Inherits BusinessBindingSource

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 Get
End Property

End Class

This is what we do for all of our reporting and have some very deep and complex relationships and it has worked out great!

Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Trent,

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.

Paul

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I will see if I can't get a sample created for the next build so that it is a bit more in-depth.  This is the approach that we use and it has worked well.
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Peter,

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 Smile.

Paul

Attachments
Dev_Express.zip (232 views, 104.00 KB)
Infragistics.zip (212 views, 100.00 KB)
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

After created BBS, how to set it to xtragrid to show master details?



Thank you
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Chan - 18 Years Ago
StrataFrame Team - 18 Years Ago
Paul Chase - 18 Years Ago
Robin J Giltner - 18 Years Ago
Paul Chase - 18 Years Ago
Chan - 18 Years Ago
Paul Chase - 18 Years Ago
                     hi,
I have reattach another sample.

Thank you.
Chan - 18 Years Ago
                         ok i'll try to take a look at it
Paul Chase - 18 Years Ago
                             Paul's example and description of how to use a multi-detail band on...
Trent L. Taylor - 18 Years Ago
                                 Trent, Does that allow you to do master detail binding? In other...
Paul Chase - 18 Years Ago
                                     Yes, you can chanin these together. So you may have a CustomersBBS and...
Trent L. Taylor - 18 Years Ago
                                         Trent, I got really busy yesterday so wasn't able to spend much time...
Paul Chase - 18 Years Ago
                                             I will see if I can't get a sample created for the next build so that...
Trent L. Taylor - 18 Years Ago
                                             Peter, I got really busy yesterdayso didn't have a chance to post...
Paul Chase - 18 Years Ago
                                         Hi,
After created BBS, how to set it to xtragrid to show master...
Chan - 18 Years Ago
                             Hi,
I finally able to make xtragrid recognize my dataset and...
Chan - 18 Years Ago
                                 Is there an InnerException to that exception? It might give you more...
StrataFrame Team - 18 Years Ago
                                     [quote][b]Ben Chase (11/08/2007)[/b][hr]Is there an InnerException to...
Chan - 18 Years Ago
                                         Chan the inner exception still would be helpful to see what is going...
Paul Chase - 18 Years Ago
Peter Jones - 18 Years Ago
Paul Chase - 18 Years Ago
Peter Jones - 18 Years Ago
Peter Jones - 18 Years Ago
Paul Chase - 18 Years Ago
Richard Keller - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Richard Keller - 18 Years Ago
Trent L. Taylor - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search