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

Foreign keys

Thread ID:

Created:

Updated:

Platform:

Replies:

27351 Apr 11,2005 12:11 PM UTC Apr 12,2005 02:09 PM UTC Windows Forms 3
loading
Tags: Grouping
Rishi Tandon
Asked On April 11, 2005 12:11 PM UTC

Hi, I need to show 2 tables joined by a foreign key, within one grouping grid. Both the datatables are part of 1 dataset. They are joined together using GridRelationDescriptor. I am facing 3 issues 1. The master table does not show a default record, this has no entries in child table. 2. Only the relation column from the master table is visible on the grouping grid. 3. When i use the drop down, I see a complete list of records in the child table. The list in the drop down needs to be driven off of the value in COlumn1 of parent table. Any help will be greatly appreciated. Regards, Rishi

Administrator [Syncfusion]
Replied On April 11, 2005 09:46 PM UTC

Hi Rishi, I am not sure I understood your questions. But let me try. If you think I misunderstood pleae post more details. 1. Check out the ForeignKeyReference example. In the first row is an AddNew row. You can drop data from the related foreign table and add a row to the master table. How is this different in your case? 2. You can define the appearance of the related table using the GridRelationDescriptor.ChildTableDescriptor. You can add and remove columns. You can also modify the default set of columns that should be visible with Engine.ShowRelationFields. Try setting Engine.ShowRelationFields = ShowRelationFields.ShowAllRelatedFields; 3. I think you are referring here to a multiple foreign key scenario. Check out the MultipleColumnForeignKeys example. If you add multiple relation keys then the dropdown will be dependant on the first column in that table, e.g. GridRelationDescriptor parentToChildRelationDescriptor = new GridRelationDescriptor(); parentToChildRelationDescriptor.Name = "Child"; parentToChildRelationDescriptor.ChildTableName = "MyChildTable"; // same as SourceListSetEntry.Name for childTable (see below) parentToChildRelationDescriptor.RelationKind = RelationKind.ForeignKeyReference; parentToChildRelationDescriptor.RelationKeys.Add("ForeignCategoryID", "CategoryID"); parentToChildRelationDescriptor.RelationKeys.Add("ForeignInsideCategoryID", "InsideCategoryID"); Stefan >Hi, > >I need to show 2 tables joined by a foreign key, within one grouping grid. >Both the datatables are part of 1 dataset. They are joined together using GridRelationDescriptor. >I am facing 3 issues >1. The master table does not show a default record, this has no entries in child table. >2. Only the relation column from the master table is visible on the grouping grid. >3. When i use the drop down, I see a complete list of records in the child table. The list in the drop down needs to be driven off of the value in COlumn1 of parent table. > >Any help will be greatly appreciated. > >Regards, >Rishi >

Rishi Tandon
Replied On April 12, 2005 05:14 AM UTC

Hi Stefan, Please could you pass on the examples, you mention, to me. Thanks, Rishi

Administrator [Syncfusion]
Replied On April 12, 2005 02:09 PM UTC

Hi Rishi, you can find these samples in the following location of your Essential Suite 3.x installation: C:\Program Files\Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Grouping\ForeignKeyReference and C:\Program Files\Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Grouping\MultipleColumnForeignKeys Stefan >Hi Stefan, > >Please could you pass on the examples, you mention, to me. > >Thanks, >Rishi

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

;