# grid-row-template

> Data grid with a row template that renders a full order card per row with customer avatar, ship-to details, and status chip.

**Framework:** vue  **Component:** Grid  **Variant:** row-template

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/vue/grid-row-template.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-vue-grids
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/grid-row-template/Grid.vue

```vue
<template>
<div class="col-lg-12">
  <div class="control-section">
    <ejs-grid :dataSource="data" :rowTemplate="'rowTemplate'" width="auto" height="460" gridLines="Horizontal">
      <e-columns>
        <e-column headerText="ORDER LIST" textAlign="Center" field="CustomerName"></e-column>
      </e-columns>
      <template v-slot:rowTemplate="{ data }">
        <tr>
          <td class="e-order-cell" style="padding:0;border-bottom:1px solid #e0e0e0">
            <div style="display:flex;align-items:flex-start;gap:48px;padding:28px 40px">
              <div :style="{ background: color(data.CustomerID) }" style="width:110px;height:110px;border-radius:50%;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0">
                <span style="font-size:32px;font-weight:700;line-height:1">{{ initials(data.CustomerName) }}</span>
                <span style="font-size:12px;opacity:.9;margin-top:6px">#{{ data.OrderID }}</span>
              </div>
              <div style="display:flex;flex-direction:column;min-width:0;text-align:left;font-size:17px;line-height:1.5;color:#333">
                <div style="margin-bottom:14px">
                  <span style="font-weight:700;margin-right:10px">{{ data.CustomerName }}</span>
                  <span style="font-weight:300">({{ data.CustomerID }})</span>
                </div>
                <div style="margin-bottom:14px">{{ data.ShipAddress }}, {{ data.ShipCity }}</div>
                <div class="e-chip-list e-outline" style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px">
                  <div class="e-chip"><span class="e-chip-text">{{ data.ShipCity }}</span></div>
                  <div class="e-chip"><span class="e-chip-text">{{ data.ShipCountry }}</span></div>
                  <div class="e-chip"><span class="e-chip-text">{{ status(data) }} · {{ days(data) }}d</span></div>
                </div>
                <div>
                  <span style="font-weight:300;font-size:18px">Freight</span>
                  <span style="font-size:32px;font-weight:500;margin-left:6px">${{ Number(data.Freight).toFixed(2) }}</span>
                </div>
              </div>
            </div>
          </td>
        </tr>
      </template>
    </ejs-grid>
  </div>
</div>
</template>

<script lang="ts">
import { GridComponent, ColumnDirective, ColumnsDirective } from "@syncfusion/ej2-vue-grids";
import { orderData } from '../datasource/grid-data';

const palette = ['#6366f1', '#0ea5e9', '#10b981', '#f59e0b', '#ec4899', '#8b5cf6'];

export default {
  components: { 'ejs-grid': GridComponent, 'e-column': ColumnDirective, 'e-columns': ColumnsDirective },
  data: function() {
    return { data: orderData };
  },
  methods: {
    color: (text: string) => palette[[...text].reduce((s, c) => s + c.charCodeAt(0), 0) % palette.length],
    initials: (name: string) => name.trim().split(/\s+/).map(p => p[0]).slice(0, 2).join('').toUpperCase(),
    days: (o: any) => Math.max(0, Math.round((new Date(o.ShippedDate).getTime() - new Date(o.OrderDate).getTime()) / 86400000)),
    status(o: any) {
      const d = (this as any).days(o);
      return d <= 5 ? 'Fast' : d <= 10 ? 'On time' : 'Delayed';
    }
  }
}
</script>
```
