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. Image for the cookie policy date

Hierarchy Issues

I have two tables that I want to show in parent/child rows in one grid. Both tables are backed by a DataSource which always contain more columns than I want to show. This is not negotiable. Parent DataSource contains columns A, B, C, D, E, F and Child DataSource contains columns A, C, D where A is the unique ID. In the grid, I want to hide columns A, E, F and show columns B, C, D. The child rows should just have an empty cell for column B. Please let me know the best approach to show this data. I have the latest version of the Essential Suite.

4 Replies

EV Evan January 31, 2005 05:56 PM UTC

One more thing...I need it to be really really fast :)

AD Administrator Syncfusion Team January 31, 2005 07:02 PM UTC

Take a look at the \Syncfusion\Essential Suite\\Windows\Grid.Windows\Samples\DataBound\Hierarchical\ExpandGrid sample. You can use the level.LayoutColumns to control the columns in each hierarchy. (You can also get teh tree look as in this sample if this is what you want:\\Windows\Grid.Windows\Samples\DataBound\Hierarchical\GDBGTreeLines)

EV Evan February 1, 2005 01:11 PM UTC

I getting a little further. I''m doing one thing that is different than this example that I''m having a little trouble with. I have a button that refreshes the underlying DataSource. Sometimes there is one table and sometimes there are two tables in the DataSet. If there are two, I create the relationship. If there is only one, I just show the one table with no relationships. I start with one table, everything is good. I click the button so that there are two tables, and everything looks ok. When I go back to one table, the first column mysteriously disappears from my grid. I looked at all internal variables in the debugger, and all looks good. Any ideas?

EV Evan February 1, 2005 03:32 PM UTC

I may have figured it out. I think somehow behind the scenes, when the relationship is cleared/reset, the first column is removed/hidden which is supposed to be the plus/minus column. In my situation, there is no more parent/child relation so this column is not there anymore. The first column that the user is supposed to see is the one being removed/hidden.

Live Chat Icon For mobile
Up arrow icon