Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Master-Detail

Contact Name 
Company Name 
City 
Country 
CollapseMaria AndersAlfreds FutterkisteBerlinGermany
 Contact Phone: 030-0074321, Fax: 030-0076545

Order ID 
Order Date 
Ship Name 
Quantity 
Unit Price 
Total 
110114/9/2020Alfred's Futterkiste40$13.25$530.00
110114/9/2020Alfred's Futterkiste20$21.50$430.00
1069210/3/2019Alfred's Futterkiste20$43.90$878.00
1070210/13/2019Alfred's Futterkiste6$10.00$60.00
1070210/13/2019Alfred's Futterkiste15$18.00$270.00
106438/25/2019Alfreds Futterkiste15$45.60$684.00
106438/25/2019Alfreds Futterkiste21$18.00$378.00
106438/25/2019Alfreds Futterkiste2$12.00$24.00
108351/15/2020Alfred's Futterkiste15$55.00$825.00
108351/15/2020Alfred's Futterkiste2$13.00$26.00
   Sum=174 Sum=$4,596.20
Page 1 of 2 (12 items)Prev12Next
ExpandAna TrujilloAna Trujillo Emparedados y heladosMéxico D.F.Mexico
ExpandAntonio MorenoAntonio Moreno TaqueríaMéxico D.F.Mexico
ExpandThomas HardyAround the HornLondonUnited Kingdom
ExpandChristina BerglundBerglunds snabbköpLuleåSweden
ExpandHanna MoosBlauer See DelikatessenMannheimGermany
ExpandFrédérique CiteauxBlondesddsl père et filsStrasbourgFrance
ExpandMartín SommerBólido Comidas preparadasMadridSpain
ExpandLaurence LebihanBon app'MarseilleFrance
ExpandElizabeth LincolnBottom-Dollar MarketsTsawassenCanada
Page 1 of 10 (91 items)Prev12345678910Next


The DevExpress ASP.NET MVC Grid View supports master-detail data presentation of any complexity.

This demo shows how to create a simple master-detail relationship between two tables. All you have to do is to:

  • Use two Grid View extensions.
  • Bind the first grid (master grid) to the master data source and enable the grid's SettingsDetail.ShowDetailRow option.
  • Place the second grid (detail grid) into the master grid's detail row template created via the SetDetailRowTemplateContent method.
  • Assign a unique (dynamically generated) name to the Name property of the detail grid and set its SettingsDetail.MasterGridName property to the master grid's name.
  • Bind the detail grid to the detail data source whose data is retrieved in a controller action based upon the corresponding master row ID passed via a ViewData parameter.

By default, end-users can expand several master rows simultaneously. This behavior is controlled by the SettingsDetail.AllowOnlyOneMasterRowExpanded option.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxGridViewDemos