Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Master/details with objects

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

Master/details with objects
Link Posted: 05-Dec-2006 01:24
hi,

I have 2 object 'Procedure' and 'Action'. The 'Procedure' class has a property with a list of 'Actions'.

I want to create a grid with Procedure as mastertable and Action as NestedTable.  I used to 'Binding to objects properties' to start but i'm not able to add a nested table for the details.

Any idea?

thx

Stijn
Link Posted: 05-Dec-2006 11:19
You can organize DataTable to bind to FlyGrid like following
2 Columns -
1) Procedure field, contains Procedure object
2) Actions field, contains Actions list object
as source of nested columns use Actions field name:
[c#]
//create and fill ProceduresTable as described above
DataTable proceduresTable = FillProceduresTable();
//add columns to the flyGrid.Columns and flyGrid.Columns.NestedColumns
SetupColumns();
flyGrid.Rows.DataSource = proceduresTable;
flyGrid.Columns.NestedDataMember = \"Actions\";