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. Image for the cookie policy date

Nesting multiple tables

Hello,

How do I make more than 1 parent/child relation in GridGrouping?
The design of the nested tables would be:
table0 -> table1
table1 -> table 2
table1 -> table 3
table1 -> table n


I`m trying this way:


Dim dtArea As DataTable = dsInseridos.Tables(0)
Dim dtRegistro As DataTable = dsInseridos.Tables(1)
Dim AtributosRelation As GridRelationDescriptor = New GridRelationDescriptor()


AtributosRelation.RelationKind = RelationKind.RelatedMasterDetails
AtributosRelation.ChildTableName = "Registros"
AtributosRelation.RelationKeys.Add("ID_EXTRACAO_AREA", "id_extracao_area")
dtgInseridos.TableDescriptor.Relations.Add(AtributosRelation)
dtgInseridos.Engine.SourceListSet.Add("Areas", dtArea)
dtgInseridos.Engine.SourceListSet.Add("Registros", dtRegistro)

For count As Integer = 2 To dsInseridos.Tables.Count - 1

AtributosRelation = New GridRelationDescriptor()
AtributosRelation.RelationKind = RelationKind.RelatedMasterDetails
AtributosRelation.ChildTableName = "Atributos" & count
AtributosRelation.RelationKeys.Add("Registros.uniqueIdentifier", "Atributos" & count & ".UNIQUEIDENTIFIER")
dtgInseridos.TableDescriptor.Relations.Add(AtributosRelation)

dtgInseridos.Engine.SourceListSet.Add("Atributos" & count, dsInseridos.Tables(count))
Next





1 Reply

JJ Jisha Joy Syncfusion Team January 18, 2011 12:15 PM UTC

Hi Ivan,


The GridGroupingControl has the capability of binding several related tables.

Please refer to the following sample under "Relations And Hierarchy" from our sample browser,


C:\Syncfusion\8.4.0.10\Windows\Grid.Grouping.Windows\Samples\2.0\Relations And Hierarchy

Regards,
Jisha


Loader.
Live Chat Icon For mobile
Up arrow icon