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: Finding column descriptors added by ForeignKeyReference relation

Thread ID:

Created:

Updated:

Platform:

Replies:

25324 Feb 24,2005 01:20 PM UTC Feb 25,2005 11:00 AM UTC WinForms 3
loading
Tags: GridControl
Sigurd Ringbakken
Asked On February 24, 2005 01:20 PM UTC

When adding a ForeignKeyReference relation to a table descriptor, the table is extended with columns from the child table. The columns are prefixed with the name of the relation descriptor. Is there an easy way to find these column descriptors?

Daniel Jebaraj [Syncfusion]
Replied On February 25, 2005 12:19 AM UTC

Test. Please ignore update. >When adding a ForeignKeyReference relation to a table descriptor, the table is extended with columns from the child table. The columns are prefixed with the name of the relation descriptor. Is there an easy way to find these column descriptors?

Administrator [Syncfusion]
Replied On February 25, 2005 12:53 AM UTC

Hi Sigurd, you can loop through all the columns of the related table when you access the ChildTableDescriptor of the RelationDesriptor, e.g. in the ForeignKeyReference example: this.gridGroupingControl1.DataSource = table; mainTd.Name = "ForeignKeyReference"; mainTd.Columns.LoadDefault(); foreach (RelationDescriptor rd in mainTd.Relations) { if (rd.RelationKind == RelationKind.ForeignKeyReference) { foreach (FieldDescriptor fd in rd.ChildTableDescriptor.Fields) { string name = countriesRd.Name + "_" + fd.Name; GridColumnDescriptor cd = mainTd.Columns.FindByMappingName(name); if (cd != null) Console.WriteLine(cd.Name); } } } Stefan >When adding a ForeignKeyReference relation to a table descriptor, the table is extended with columns from the child table. The columns are prefixed with the name of the relation descriptor. Is there an easy way to find these column descriptors?

Sigurd Ringbakken
Replied On February 25, 2005 11:00 AM UTC

>you can loop through all the columns of the related table when you access the ChildTableDescriptor of the RelationDesriptor, e.g. in the ForeignKeyReference example: Yes, but I was hoping I could avoid that and rather find them in a collection somewhere.

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

;