We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC master/child with LINQ

Thread ID:





76696 Sep 19,2008 05:13 AM UTC Sep 22,2008 06:14 AM UTC WinForms 1
Tags: GridControl
Munteanu Gabriel
Asked On September 19, 2008 05:13 AM UTC

Why it doesn't worK?
I see only the parent row, not the child

It worked fine with dataset / datatable

Private db As New DataClasses1DataContext

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim parentQry = From parent In db.Customers _
Select parent.CustomerID, parent.CustomerName
Dim childQry = From child In db.Orders _
Select child.CustomerID, child.OrderDate, child.OrderID

Dim parentToChildRelationDescriptor As New GridRelationDescriptor()
parentToChildRelationDescriptor.ChildTableName = "MyChildTable" '
parentToChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails
parentToChildRelationDescriptor.RelationKeys.Add("CustomerID", "CustomerID")

Me.GridGroupingControl1.Engine.SourceListSet.Add("MyParentTable", parentQry)
Me.GridGroupingControl1.Engine.SourceListSet.Add("MyChildTable", childqry)

Me.GridGroupingControl1.DataSource = parentQry

End Sub 'Form1_Load

SubhaSheela R [Syncfusion]
Replied On September 22, 2008 06:14 AM UTC

Hi Gabi,

Thanks for your interest in Syncfusion products.

You can refer our shipped browser sample that allows the user to build data relations, such as ListItemReference, MasterDetail and Many to Many, using linq queries.

Here is the path:


Please let me know if you have any queries.

Subhasheela R


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon