Home Forums WinForms controls Xceed Grid for WinForms Master detail using collections Reply To: Master detail using collections

User (Old forums)
Member
Post count: 23064

What I described applies to a list, not to a DataSet.  If you design two DataTable, then you can simply add a relationship between the two table on a common field, and the grid will be able to show the hierarchical data.

e.g.:  Assume two data tables, Supplier (master) and Product (detail), and a relationship between the two on the SupplierID field called “SupplierProduct”.  Assume a DataSet build form those tables called SPDataSet.

Master.SetDataBinding( SPDataSet.Supplier, “” );

Detail.SetDataBinding( SPDataSet.Supplier, “SupplierProduct” );

Here is more information from our help documentation :

http://doc.xceedsoft.com/products/XceedGrid/Data_binding.html
http://doc.xceedsoft.com/products/XceedGrid/Creating%20a%20dataset%20using%20the%20BindingSource%20class.html
http://doc.xceedsoft.com/products/XceedGrid/Master_Detail.html
http://doc.xceedsoft.com/products/XceedGrid/Building_a_bound_hierarchical_master_detail_grid.html

Imported from legacy forums. Posted by André (had 4504 views)