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.
One more thing...I need it to be really really fast :)
ADAdministrator Syncfusion Team January 31, 2005 02:02 PM
Take a look at the \Syncfusion\Essential Suite\126.96.36.199\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:\188.8.131.52\Windows\Grid.Windows\Samples\DataBound\Hierarchical\GDBGTreeLines)
EVEvanFebruary 1, 2005 08:11 AM
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?
EVEvanFebruary 1, 2005 10:32 AM
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.