Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Problem with nested grid...

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Problem with nested grid...
Link Posted: 07-May-2007 09:21
I need some help and advise.  I have 2 table as shown below:

table 1

Piping
HVAC
Electrical

table 2
AA
AB
AC
AD

What I want to do is create a nested grid with each value of table 1 as parent node and then every value from table 2 as a child node, so the results would like something like below:

+ Piping
   -- AA
   -- AB
   -- AC
   -- AD
+ HVAC
   -- AA
   -- AB
   -- AC
   -- AD
+ Electrical
   -- AA
   -- AB
   -- AC
   -- AD

How would I be able to do this? I am using vb.net code

Thanks in advance

Simon
Link Posted: 07-May-2007 20:42
Do you want to display in each sublevel the same records from table2?
In that case you can specify in FlyGrid.Rows.DataSource your dataset that contains these tables, in FlyGrid.Rows.DataMember - the name of the table1, and in FlyGrid.Columns.NestedDataMember - the name of the table2.
Don't forget to initialize the root columns (FlyGrid.Columns)and nested columns (FlyGrid.Columns.NestedColumns) to correctly display data.
Link Posted: 08-May-2007 07:12
I am having a really hard time with trying to acheive this would it be possible for you to give me some sample code.

Thanks in advance

Simon