The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
DJDaniel Jebaraj Syncfusion Team 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?
ADAdministrator Syncfusion Team 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?
SRSigurd RingbakkenFebruary 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.