{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "grid-detail-template",
  "framework": "angular",
  "type": "registry:component",
  "component": "Grid",
  "variant": "detail-template",
  "dependencies": [
    "@syncfusion/ej2-angular-grids"
  ],
  "description": "Data grid with a detail row template that expands a row to reveal the shipped order lines and totals beneath it.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/angular/llms.txt",
    "skillPack": "syncfusion/angular-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/angular/grid-detail-template.md"
  },
  "files": [
    {
      "target": "src/components/grid-detail-template/grid.component.html",
      "content": "<div style=\"margin: 50px 90px\">\n  <ejs-grid [dataSource]='data' height='460' [allowPaging]='true' [pageSettings]='pageSettings' gridLines='Horizontal'>\n    <ng-template #detailTemplate let-data>\n      <div style=\"display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:16px;padding:16px 24px;background:#f8fafc\">\n        <div style=\"background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px\">\n          <h5 style=\"margin:0 0 12px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#64748b\">Shipment timeline</h5>\n          <div style=\"display:flex;align-items:flex-start;gap:12px;margin-bottom:14px\">\n            <span style=\"width:10px;height:10px;margin-top:5px;border-radius:50%;background:#6366f1;box-shadow:0 0 0 4px #e0e7ff;flex-shrink:0\"></span>\n            <div>\n              <div style=\"font-weight:600;color:#0f172a\">Order placed</div>\n              <div style=\"font-size:12px;color:#64748b\">{{ data.OrderDate | date: 'mediumDate' }}</div>\n            </div>\n          </div>\n          <div style=\"display:flex;align-items:flex-start;gap:12px\">\n            <span style=\"width:10px;height:10px;margin-top:5px;border-radius:50%;background:#6366f1;box-shadow:0 0 0 4px #e0e7ff;flex-shrink:0\"></span>\n            <div>\n              <div style=\"font-weight:600;color:#0f172a\">Shipped</div>\n              <div style=\"font-size:12px;color:#64748b\">{{ data.ShippedDate | date: 'mediumDate' }} · {{ days(data) }} days after order</div>\n            </div>\n          </div>\n        </div>\n        <div style=\"background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px\">\n          <h5 style=\"margin:0 0 12px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#64748b\">Delivery address</h5>\n          <div style=\"font-weight:600;color:#0f172a\">{{ data.ShipName }}</div>\n          <div style=\"color:#475569;margin-top:4px\">{{ data.ShipAddress }}</div>\n          <div style=\"color:#475569\">{{ data.ShipCity }}, {{ data.ShipCountry }}</div>\n        </div>\n        <div style=\"background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px\">\n          <h5 style=\"margin:0 0 12px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#64748b\">Freight charge</h5>\n          <div style=\"font-size:28px;font-weight:700;color:#0f172a\">{{ data.Freight | currency }}</div>\n          <div style=\"font-size:12px;color:#64748b;margin-top:4px\">Customer {{ data.CustomerID }}</div>\n        </div>\n      </div>\n    </ng-template>\n    <e-columns>\n      <e-column field='OrderID' headerText='Order' width='110' isPrimaryKey='true'></e-column>\n      <e-column field='ShipName' headerText='Ship To' width='240'></e-column>\n      <e-column field='ShipCity' headerText='City' width='160'></e-column>\n      <e-column field='ShipCountry' headerText='Country' width='150'></e-column>\n      <e-column field='Freight' headerText='Freight' width='120' format='C2' textAlign='Right'></e-column>\n    </e-columns>\n  </ejs-grid>\n</div>"
    },
    {
      "target": "src/components/grid-detail-template/grid.component.ts",
      "content": "import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GridModule, PageService, DetailRowService } from '@syncfusion/ej2-angular-grids';\nimport { orderData } from '../datasource/grid-data';\n\n@Component({\n  selector: 'app-grid-detail-template',\n  standalone: true,\n  imports: [CommonModule, GridModule],\n  providers: [PageService, DetailRowService],\n  templateUrl: './grid.component.html'\n})\nexport class DetailTemplateComponent {\n  public data: Object[] = orderData;\n  public pageSettings = { pageSize: 8 };\n\n  public days(o: any): number {\n    return Math.max(0, Math.round((new Date(o.ShippedDate).getTime() - new Date(o.OrderDate).getTime()) / 86400000));\n  }\n}"
    }
  ]
}