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

How to get all tables name in ggc

Thread ID:





71859 Feb 17,2008 07:53 AM UTC Feb 18,2008 11:54 AM UTC WinForms 1
Tags: GridControl
Asked On February 17, 2008 07:53 AM UTC


1. I need to enumerate all table name in GridGroupingControl, how to get it all?

I can get only childtables with this code, but can't get it through grandchilds, etc.
'For Each table As GridTable In ggc.Table.RelatedTables'

2. I can only enable filter in parenttable with this code:
For Each gcd As GridColumnDescriptor In ggc.TableDescriptor.Columns
gcd.AllowFilter = True

How to add filters in childtables and grandchilds ?

Thanks for your assist.

Administrator [Syncfusion]
Replied On 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
i += 1
index += 1

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.



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

This page will automatically be redirected to the 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