Displaying GridView Master Detail so that the details are shown below each master

0

I use the ASP.NET GridView control to display information from two tables that have a master-detail relationship. Table 1: Purchase (IDCompra, DataCompra and ValorCompra) and Table 2: PurchaseItem (IDCompraItem, Name, Quantity).

I would like to display a list page in something like this:

1 - 03/04/2016 - $ 100.00

  • 4 - Pen - 20 units

  • 6 - Pencils - 10 units

  • 7 - Rubber - 5 units

2 - 03/04/2016 - $ 50.00

  • 9 - pointer - 3 units

  • 10 - Pencils - 2 units

3 - 04/04/2016 - $ 5.00

  • 15 - Paper - 3 boxes

I could do this with bootstrap? As? Is there another way?

    
asked by anonymous 03.04.2016 / 21:59

1 answer

0

Take a look at the link below, it's a bit different because it only shows if you expand: link

What it does is create a GridView (table) and create within it a template field with another GridView. This code uses javascript to show and hide the subGrid.

    
06.04.2016 / 05:48