Home Forums WinForms controls Xceed Grid for WinForms Master/Detail grid – How to display related detail entry?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17242 |

    Hi,

    I followed the tutorial and did a 2 levels hierarchical master/detail grid. But the detail grid repeated for each parent entry. That’s not what I want. How can I make the detail grid to display related entries only? 

    I currently bind the master grid to the 1st Table of the dataset and detail grid to the 2nd Table of the dataset. The 2nd table contains an ID which is related to the 1st Table.

    This is what I got.

    The detail grid suppose to list the same CM_ID entries only. For example, Detail grid for CM_ID = 1000, should list down entry where CM_ID on the detail grid is same as Master grid.

    Could anyone please guide me on this?

     

    Imported from legacy forums. Posted by Mel (had 743 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi

    u need to create Relationship between two table like following

    dtLevel1.ChildRelations.Add(new DataRelation(“RelationName”, dtLevel1.Columns[“CM_ID”], dtLevel2.Columns[“CM_ID”]));

    Then Assign dtLevel DataTable To Grid’s ItemsSource

     

    Imported from legacy forums. Posted by Dharmesh (had 226 views)

    User (Old forums)
    Member
    Post count: 23064

    Thank you so much, Dharmesh. It  works now.

    Imported from legacy forums. Posted by Mae (had 1004 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.