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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC master/child with LINQ

Thread ID:

Created:

Updated:

Platform:

Replies:

76696 Sep 19,2008 05:13 AM UTC Sep 22,2008 06:14 AM UTC WinForms 1
loading
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")

gridGroupingControl1.TableDescriptor.Relations.Add(parentToChildRelationDescriptor)
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:

\\MyDocuments\Syncfusion\EssentialStudio\6.3.0.25\Windows\Grid.Grouping.Windows\Samples\2.0\FeaturedSamples\LINQToSQLSample

Please let me know if you have any queries.

Regards,
Subhasheela R


CONFIRMATION

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.

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

;