AD
Administrator
Syncfusion Team
February 18, 2008 11:54 AM UTC
Hi Harry,
Thank you for your interest in Syncfusion Products.
1) Currently it is not possible to retrieve the Grand Child table names using ggc.Table.RelatedTables. As a work around, please find the following code snippet that retrieves the child table and grand child table name.
Dim engine As GridEngine = gridGroupingControl1.Engine
Dim parentTableDescriptor As GridTableDescriptor = CType(engine.TableDescriptor, GridTableDescriptor)
Dim index As Integer = 0
Do While index < parentTableDescriptor.Relations.Count
Dim str As String = parentTableDescriptor.Relations(index).Name
Dim t As TableDescriptor = Me.gridGroupingControl1.GetTableDescriptor(str)
Dim i As Integer = 0
Do While i < t.Relations.Count
Console.WriteLine(t.Relations(i).Name)
i += 1
Loop
index += 1
Loop
2) To set filter for Child and Grand Child Table:
To have filters in nested tables and in child tables, we need to set NestedTableGroupOptions.ShowFilterBar property to true. The following code snippet sets filterbar for parent, child and grand child.
Me.gridGroupingControl1.NestedTableGroupOptions.ShowFilterBar = True
Dim engine As GridEngine = Me.gridGroupingControl1.Engine
Dim parentTableDescriptor As GridTableDescriptor = CType(engine.TableDescriptor, GridTableDescriptor)
parentTableDescriptor.Columns(0).AllowFilter = True
Dim parentToChildRelationDescriptor As RelationDescriptor = parentTableDescriptor.Relations("ChildTable")
Dim childTableDescriptor As GridTableDescriptor = CType(parentToChildRelationDescriptor.ChildTableDescriptor, GridTableDescriptor)
childTableDescriptor.Columns(0).AllowFilter = True
Dim childToGrandChildRelationDescriptor As RelationDescriptor = childTableDescriptor.Relations("GrandChildTable")
Dim grandChildTableDescriptor As GridTableDescriptor = CType(childToGrandChildRelationDescriptor.ChildTableDescriptor, GridTableDescriptor)
grandChildTableDescriptor.Columns(0).AllowFilter = True
Please let me know if any concerns.
Regards,
Fathima