GIJGO
Run Example
Close Window
<!DOCTYPE html> <html> <head> <title>Nested jQuery Grids</title> <meta charset="utf-8" /> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <script src="https://unpkg.com/gijgo@1.9.14/js/gijgo.min.js" type="text/javascript"></script> <link href="https://unpkg.com/gijgo@1.9.14/css/gijgo.min.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="container-full"> <div class="row"> <div class="col-xs-12"> <table id="grid"></table> </div> </div> </div> <script type="text/javascript"> $(document).ready(function () { var grid = $('#grid').grid({ primaryKey: 'ID', dataSource: '/Players/Get', columns: [ { field: 'ID', width: 56 }, { field: 'Name' }, { field: 'PlaceOfBirth', title: 'Place Of Birth' } ], detailTemplate: '<div><table/></div>' }); grid.on('detailExpand', function (e, $detailWrapper, id) { $detailWrapper.find('table').grid({ params: { playerId: id }, dataSource: '/Players/GetTeams', autoGenerateColumns: true, pager: { limit: 5 } }); }); grid.on('detailCollapse', function (e, $detailWrapper, id) { $detailWrapper.find('table').grid('destroy', true, true); }); }); </script> </body> </html>