Ticket Q450775
Visible to All Users

Master - detail - detail on two grids

created 12 years ago

I have a Dataset with tables Patient, Visit and Document. Patient is the parent of Visit with relation FK_Patient_Visit. Visit is the parent of Document with relation FK_Visit_Document.

Using BindingSources, XtraGrid1 is bound to Dataset.Patient, and XtraGrid2 is bound to FK_Patient_Visit.

XtraGrid2 displays Visits correctly based on the selected Patient. It also displays Documents correctly (as a detail of Visits), as long as ShowOnlyPredefinedDetails = false.

When I set ShowOnlyPredefinedDetails = true and try to Retrieve Fields, the detail GridView is not created and I am unsure how to bind the detail view manually. I have tried to create a second level GridView and set a column's field to, for example, fKPatientVisitBindingSource.DocumentType, but no matter what I do the child GridView is never displayed.

Can you tell me what I should do?

Thanks.

Comments (3)
DevExpress Support Team 12 years ago

    Hi,
    Thank you for your message.
    I have created a small sample based upon your description, and it operates as expected here. That is, I have a DataSet with three tables: CustomerInfo, Detail, and DetailInfo. The CustomerInfo table has a one-to-many relationship with the Detail table. In its turn, the Detail table has a one-to-many relationship with the DetailInfo one. I have created two BindingSource components. The first one's DataSource property is set to DataSet and the DataMember property - to "CustomerInfo". The second BindingSource is bound to the first BindingSource, and its DataMember property is set to the relationship name ("CustomerInfo_Detail"). A grid is bound to the second BindingSource. This way, if I click the Retrieve Details button, a corresponding detail level is created.
    I have attached this sample here, so that you can look at it. You can delete a detail level there and click the Retrieve Fields button to see the result.
    In addition, I recommend that you review the Level Designer help article to learn how to create detail levels based upon relationships.
    If the issue is not resolved, please modify my sample to show it. We will do our best to provide you with the best support.
    I am looking forward to your response.

      Thank you for the example. Although it did not exactly mimic my situation - I have two grids, with three levels - it provided enough information for me to solve my problem. It had been a while since I worked with WinForms controls, so the Level Designer refresher was a good suggestion.
      The issue is resolved.

      DevExpress Support Team 12 years ago

        Hi,
        Thank you for informing us that the issue has been resolved. Please do not hesitate to contact us in case of any difficulty. We will be happy to help you! :)

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.