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.

Grid hierarchical data structure (many-to-many)

Thread ID:

Created:

Updated:

Platform:

Replies:

11188 Feb 25,2004 11:43 PM Feb 29,2004 05:12 PM Windows Forms 1
loading
Tags: GridControl
Babu Mannaravalappil
Asked On February 25, 2004 11:43 PM

Hi, I have a Database and a corresponding dataset with a few tables. Some of the tables have many-to-many relations established by a link table. For example, a vendor supplies merchandise to many stores and a store purchases from many vendors. So, I have Vendors Table, I have Stores Table and I also have a StoresToVendors link table. StoresToVendors table stores the primary keys from the other two tables as foreign keys in two columns. Now, how can I create a Grid with two levels of hierarchical rows, one for the Store (Parent) and another for Vendors (Children), or vice versa, without showing the link table in the picture at all? What is the best and easiest way to do this? Can somebody point me to any sample C# code, if any? Any help is appreciated. Thanks. Babu

Administrator [Syncfusion]
Replied On February 29, 2004 05:12 PM

One way you can approach this is to define a relation between your CompanyTable (parent table) and your CompanyToVendorsTable (child table). But in the child table, instead of showing the records from the child table, use unbound columns to show records from the VendorsTable. This requires handling model.QueryCellInfo to populate the unbound columns directly from the VendorsTable. Here is a little sample. ManyToManyHierarchicalGrid_7641.zip

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.

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.

;