Implements Syncfusion Angular Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.
A comprehensive guide to implementing powerful, feature-rich data grids using Syncfusion's Angular Grid component. This skill covers all aspects of grid functionality from basic data binding to advanced features like virtual scrolling, hierarchical data, state management, and multi-format exports.
Use this skill when you need to:
| Requirement | Use TreeGrid | Use Grid |
|---|---|---|
| Data Structure | Hierarchical/Tree/Nested | Flat/Tabular |
| Parent-Child Relationships | ✅ Native support | ❌ No (use Detail Template) |
| Expand/Collapse Rows | ✅ Built-in | ❌ No |
| Nested Aggregates | ✅ Includes children | ✅ Flat only |
| Indent/Outdent Operations | ✅ Yes | ❌ No |
| Column Grouping | ❌ No (use Grid) | ✅ Yes |
| Performance (100K+ rows) | ✅Excellent | ✅ Excellent |
| Use Cases | Org charts, file systems, BoM | Orders, invoices, lists |
Grid's inbuilt API (137+ methods, 65+ events, 95+ properties) requires strict adherence to access patterns:
⚠️ Detailed rules for proper API usage are located in the reference guides — review the sections below based on your needs:
📄 Read: references/getting-started.md
📄 Read: references/data-binding.md
📄 Read: references/columns.md
Related — Advanced Column Features:
📄 Read: references/context-menu.md (context menu for columns)
📄 Read: references/row.md
📄 Read: references/selection.md
📄 Read: references/filtering.md
📄 Read: references/sorting.md
📄 Read: references/searching.md
📄 Read: references/paging.md
📄 Read: references/editing.md
⚠️ CRITICAL:
[isPrimaryKey]="true"is required on the key column — editing silently fails without it (no error thrown).
📄 Read: references/grouping.md
📄 Read: references/aggregates.md
📄 Read: references/excel-export.md
📄 Read: references/pdf-export.md
📄 Read: references/print.md
📄 Read: references/toolbar.md
📄 Read: references/clipboard.md
📄 Read: references/frozen.md
⚠️ Performance Warning:
rowDataBoundandqueryCellInfofire on every render/scroll — NEVER make API calls inside them. ⚠️ Conflict Risk: Do NOT add both a column[template]AND arowDataBoundhandler targeting the same field — produces duplicate, conflicting styling.
📄 Read: references/cell.md
📄 Read: references/context-menu.md
📄 Read: references/scrolling.md
⚠️ CRITICAL:
heightis required — scrolling is silently disabled without it (no error thrown). ⚠️ INCOMPATIBLE: Do NOT combineenableVirtualizationorenableInfiniteScrollingwithallowPaging— results are unpredictable.
| Rows | Mode | Key Config |
|---|---|---|
| < 1,000 | allowPaging | Page module |
| 1K – 100K | enableVirtualization + height | VirtualScroll, no paging |
| Continuous | enableInfiniteScrolling + height | InfiniteScroll |
| 100K+ grouped | enableVirtualization + lazyLoadGrouping | VirtualScroll, Group |
📄 Read: references/hierarchy-grid.md
📄 Read: references/state-management.md
📄 Read: references/adaptive.md
📄 Read: references/global-local.md
📄 Read: references/modules.md
📄 Read: references/adaptors.md
📄 Read: references/performance.md
📄 Read: references/accessibility.md
📄 Read: references/validation.md
📄 Read: references/command-column.md
📄 Read: references/localization.md
📄 Read: references/responsive-design.md
📄 Read: references/programmatic-api.md
setProperties() examples, export hooks, and cross-feature📄 Read: references/events-catalog.md
actionBegin to cancel or mutate before an action (args.cancel = true, args.data.field = value)actionComplete to react after (API call, toast, refresh, toolbar restore)actionFailure for error handlingargs.requestType to identify the action, see the requestType table in the events catalog📄 Read: references/advanced-tutorials.md
📄 Read: references/grid-properties.md
📄 Read: references/grid-methods.md
📄 Read: references/grid-events.md
📄 Read: references/test-case.md
import { Component, OnInit } from '@angular/core';
import { GridComponent } from '@syncfusion/ej2-angular-grids';
interface Employee {
EmployeeID: number;
FirstName: string;
LastName: string;
Title: string;
HireDate: Date;
ReportsTo: number;
Salary: number;
}
@Component({
selector: 'app-grid',
template: `
<ejs-grid [dataSource]="data" [allowPaging]="true"
[pageSettings]="{ pageSize: 12 }"
[allowSorting]="true"
[allowFiltering]="true">
<e-columns>
<e-column field="EmployeeID" headerText="ID" width="100"></e-column>
<e-column field="FirstName" headerText="First Name" width="120"></e-column>
<e-column field="LastName" headerText="Last Name" width="120"></e-column>
<e-column field="Title" headerText="Title" width="150"></e-column>
<e-column field="HireDate" headerText="Hire Date" type="date"
format="yMd" width="130"></e-column>
<e-column field="Salary" headerText="Salary" type="number"
format="C2" width="120"></e-column>
</e-columns>
</ejs-grid>
`
})
export class GridComponent implements OnInit {
data: Employee[] = [];
ngOnInit() {
this.loadEmployeeData();
}
loadEmployeeData() {
// Load your data here
this.data = [
{ EmployeeID: 1, FirstName: 'Nancy', LastName: 'Davolio', Title: 'Sales Representative',
HireDate: new Date(1992, 4, 1), ReportsTo: 2, Salary: 60000 },
{ EmployeeID: 2, FirstName: 'Andrew', LastName: 'Fuller', Title: 'Vice President Sales',
HireDate: new Date(1992, 8, 14), ReportsTo: null, Salary: 97000 },
// ... more data
];
}
}
Combine sorting, filtering, and paging for a complete data exploration experience:
<ejs-grid [dataSource]="data"
[allowSorting]="true"
[allowFiltering]="true"
[allowPaging]="true"
[pageSettings]="{ pageSize: 20 }">
<e-columns>
<e-column field="EmployeeID" headerText="ID" width="100"></e-column>
<e-column field="FirstName" headerText="First Name" width="120"></e-column>
<!-- more columns -->
</e-columns>
</ejs-grid>
Enable inline editing with form validation:
<ejs-grid [dataSource]="data"
[editSettings]="{ allowEditing: true, allowAdding: true, mode: 'Normal' }"
[toolbar]="['Add', 'Edit', 'Delete', 'Update', 'Cancel']">
<e-columns>
<e-column field="EmployeeID" headerText="ID" [isPrimaryKey]="true"
width="100"></e-column>
<e-column field="FirstName" headerText="First Name"
[validationRules]="{ required: true }" width="120"></e-column>
<!-- more columns -->
</e-columns>
</ejs-grid>
Enable both PDF and Excel exports with toolbar:
<ejs-grid [dataSource]="data"
[toolbar]="['PdfExport', 'ExcelExport']"
[allowPdfExport]='true'
[allowExcelExport]='true'
(toolbarClick)='toolbarClick($event)'>
<e-columns>
<!-- your columns -->
</e-columns>
</ejs-grid>
Optimize performance with virtual scrolling:
<ejs-grid [dataSource]="largeDataset"
[enableVirtualization]="true"
[pageSettings]="{ pageSize: 50 }">
<e-columns>
<!-- your columns -->
</e-columns>
</ejs-grid>
| Property | Type | Purpose | Common Values |
|---|---|---|---|
dataSource | Array/DataManager | Grid data | Employee[], RemoteDataBinding |
allowSorting | boolean | Enable sorting | true, false |
allowFiltering | boolean | Enable filtering | true, false |
allowPaging | boolean | Enable pagination | true, false |
allowGrouping | boolean | Enable grouping | true, false |
editSettings | object | Edit configuration | { mode: 'Inline' } |
pageSettings | object | Paging options | { pageSize: 12 } |
enableVirtualization | boolean | Virtual scrolling | true, false |
allowExcelExport | boolean | Excel export | true, false |
allowPdfExport | boolean | PDF export | true, false |
toolbar | array | Toolbar items | ['Add', 'Edit', 'Delete'] |
columns | array | Column definitions | [{ field, headerText }] |
height | string/number | Grid height | '400px', 'auto' |
Scenario 1: Employee Directory
Implement a searchable, sortable, filterable employee list with details on demand.
→ Combine: getting-started + data-binding + columns + selection + hierarchy-grid
Scenario 2: Data Entry Form
Build a grid for adding and editing records with validation.
→ Combine: editing + validation + toolbar + filtering
Scenario 3: Sales Report Dashboard
Create a highly customized grid with grouping, aggregates, and PDF export.
→ Combine: grouping + aggregates + pdf-export + style-and-appearance
Scenario 4: Real-time Data Monitor
Display streaming data with virtual scrolling and state persistence.
→ Combine: scrolling + state-management + data-binding + adaptive
Scenario 5: Multi-level Organization Chart
Show hierarchical org structure with detail rows for each level.
→ Combine: hierarchy-grid + row templates + cell styling