{
    "componentChunkName": "component---src-templates-doc-page-jsx",
    "path": "/angular-data-grid/master-detail/",
    "result": {"data":{"markdownRemark":{"htmlAst":{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"video-section","properties":{"id":"8OeJn75or2w","title":"Master / Detail Video Tutorial","header":"true"},"children":[{"type":"text","value":"\n    Master Detail refers to a top level grid called a Master Grid having rows that expand. When the row is expanded, another grid is displayed with more details related to the expanded row. The grid that appears is known as the Detail Grid.\n"}]},{"type":"element","tagName":"h2","properties":{"id":"enabling-master--detail","style":"position:relative;"},"children":[{"type":"text","value":"Enabling Master / Detail"},{"type":"element","tagName":"a","properties":{"href":"#enabling-master--detail","ariaLabel":"enabling master  detail permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Master / Detail can be enabled using the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"masterDetail"}]},{"type":"text","value":" grid option with detail rows configured using\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"detailCellRendererParams"}]},{"type":"text","value":" as shown below:"}]},{"type":"element","tagName":"snippet","properties":{"spacebetweenproperties":"true"},"children":[{"type":"text","value":"\n| const gridOptions = {\n|     // enable Master / Detail\n|     masterDetail: true,\n| \n|     // the first Column is configured to use agGroupCellRenderer\n|     columnDefs: [\n|         { field: 'name', cellRenderer: 'agGroupCellRenderer' },\n|         { field: 'account' }\n|     ],\n| \n|     // provide Detail Cell Renderer Params\n|     detailCellRendererParams: {\n|         // provide the Grid Options to use on the Detail Grid\n|         detailGridOptions: {\n|             columnDefs: [\n|                 { field: 'callId' },\n|                 { field: 'direction' },\n|                 { field: 'number'}\n|             ]\n|         },\n|         // get the rows for each Detail Grid\n|         getDetailRowData: params => {\n|             params.successCallback(params.data.callRecords);\n|         }\n|     }\n| }\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The example below shows a simple Master / Detail with all the above configured."}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Set the grid property "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"masterDetail=true"}]},{"type":"text","value":". This tells the grid to allow expanding rows to display Detail Grids."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Set the Cell Renderer on one Master Grid column to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"agGroupCellRenderer"}]},{"type":"text","value":". This tells the grid to use the Group Cell Renderer which in turn includes the expand / collapse functionality for that column."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Set the Detail Cell Renderer* parameter "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"detailGridOptions"}]},{"type":"text","value":". This contains configuration for the Detail Grid such as what columns to display and what grid features you want enabled inside the Detail Grid."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Provide a callback via the Detail Cell Renderer* parameter "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"getDetailRowData"}]},{"type":"text","value":". The callback is called for each Detail Grid and sets the rows to display in each Detail Grid."}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{"className":["custom-block","note"]},"children":[{"type":"element","tagName":"div","properties":{"className":["custom-block-body"]},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To learn more about "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"detailCellRendererParams"}]},{"type":"text","value":" configuration see the\n"},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/master-detail-grids/"},"children":[{"type":"text","value":"Detail Grids"}]},{"type":"text","value":" section."}]}]}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Master Detail Example","name":"simple","type":"generated","options":"{ \"enterprise\": true, \"exampleHeight\": 535, \"modules\": [\"clientside\", \"masterdetail\", \"menu\", \"columnpanel\"] }"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"row-models","style":"position:relative;"},"children":[{"type":"text","value":"Row Models"},{"type":"element","tagName":"a","properties":{"href":"#row-models","ariaLabel":"row models permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When using Master / Detail the Master Grid must be using either the "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/client-side-model/"},"children":[{"type":"text","value":"Client-Side"}]},{"type":"text","value":" or "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/server-side-model-master-detail/"},"children":[{"type":"text","value":"Server-Side"}]},{"type":"text","value":" Row Models. It is not supported with the "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/viewport/"},"children":[{"type":"text","value":"Viewport"}]},{"type":"text","value":" or "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/infinite-scrolling/"},"children":[{"type":"text","value":"Infinite"}]},{"type":"text","value":" Row Models."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The Detail Grid on the other hand can use any Row Model."}]},{"type":"element","tagName":"h2","properties":{"id":"api-reference","style":"position:relative;"},"children":[{"type":"text","value":"API Reference"},{"type":"element","tagName":"a","properties":{"href":"#api-reference","ariaLabel":"api reference permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"h3","properties":{"id":"master-detail-properties","style":"position:relative;"},"children":[{"type":"text","value":"Master Detail Properties"},{"type":"element","tagName":"a","properties":{"href":"#master-detail-properties","ariaLabel":"master detail properties permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Top level Master Detail properties available on the Grid Options:"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-options/properties.json","section":"masterDetail"},"children":[]}]},{"type":"element","tagName":"h3","properties":{"id":"detail-cell-renderer-params","style":"position:relative;"},"children":[{"type":"text","value":"Detail Cell Renderer Params"},{"type":"element","tagName":"a","properties":{"href":"#detail-cell-renderer-params","ariaLabel":"detail cell renderer params permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Detail Cell Renderer parameters available on the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"detailCellRendererParams"}]},{"type":"text","value":" object:"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"interface-documentation","properties":{"interfacename":"IDetailCellRendererParams","names":"[\"detailGridOptions\", \"getDetailRowData\", \"template\", \"refreshStrategy\"]"},"children":[]}]}]},"frontmatter":{"title":"Master / Detail","version":null,"enterprise":true,"sideMenu":null,"description":null},"headings":[{"id":"enabling-master--detail","depth":2,"value":"Enabling Master / Detail"},{"id":"row-models","depth":2,"value":"Row Models"},{"id":"api-reference","depth":2,"value":"API Reference"},{"id":"master-detail-properties","depth":3,"value":"Master Detail Properties"},{"id":"detail-cell-renderer-params","depth":3,"value":"Detail Cell Renderer Params"}]}},"pageContext":{"frameworks":["javascript","react","angular","vue"],"framework":"angular","srcPath":"/master-detail","pageName":"master-detail"}},
    "staticQueryHashes": ["1766026005","699667431","940729948"]}