Master/Detail in two grids
Article relates to | Product | Author |
---|---|---|
Q2 2012 SP2 | RadGridView for WinForms | Julian Benkov |
Problem
This article will demonstrate how to display master/detail relation in two grids. The first grid will show the master data the second one the detail of the selected in the first grid row.
Solution
The solution is very simple - just subscribe to the CurrentRowChanged event of the master grid view and there get the rows associated with the current row's DataBoundItem and assign them as data source for the second grid.
The example uses the Categories and the Products tables of the NorthWind database.
A complete solution in C# and VB.NET can be found here.