How can I help you?
Getting Started with Angular Grid Component
20 May 20268 minutes to read
This guide demonstrates how to set up and configure the Syncfusion Angular Grid component, from initial installation through enabling core features like paging, sorting, filtering, and grouping.
Note: This guide supports Angular 21 and other recent Angular versions. For detailed compatibility with other Angular versions, please refer to the Angular version support matrix. Starting from Angular 19, standalone components are the default, and this guide reflects that architecture.
Ready to streamline your Syncfusion® Angular development? Discover the full potential of Syncfusion® Angular components with Syncfusion® AI Coding Assistant. Effortlessly integrate, configure, and enhance your projects with intelligent, context-aware code suggestions, streamlined setups, and real-time insights all seamlessly integrated into your preferred AI-powered IDEs like VS Code, Cursor, Syncfusion® CodeStudio and more. Explore Syncfusion® AI Coding Assistant
To get started quickly with Angular Grid using CLI and Schematics, you can check on this video:
Prerequisites
Ensure your development environment meets the System Requirements for Syncfusion® Angular UI Components.
Setup the Angular application
A straightforward approach to beginning with Angular is to create a new application using the Angular CLI. Install Angular CLI globally with the following command:
npm install -g @angular/cliAngular 21 Standalone Architecture: Standalone components are the default in Angular 21. This guide uses the modern standalone architecture. If you need more information about the standalone architecture, refer to the Standalone Guide.
Create a new application
With Angular CLI installed, execute this command to generate a new application:
ng new syncfusion-angular-app- This command will prompt you to configure settings like enabling Angular routing and choosing a stylesheet format.
? Which stylesheet format would you like to use? (Use arrow keys)
> CSS [ https://developer.mozilla.org/docs/Web/CSS ]
Sass (SCSS) [ https://sass-lang.com/documentation/syntax#scss ]
Sass (Indented) [ https://sass-lang.com/documentation/syntax#the-indented-syntax ]
Less [ http://lesscss.org ]- By default, a CSS-based application is created. Use SCSS if required:
ng new syncfusion-angular-app --style=scss- During project setup, when prompted for the Server-side rendering (SSR) option, choose the appropriate configuration.

- Select the required AI tool or ‘none’ if you do not need any AI tool.

- Navigate to your newly created application directory:
cd syncfusion-angular-appNote: In Angular 19 and below, it uses
app.component.ts,app.component.html,app.component.cssetc. In Angular 20+, the CLI generates a simpler structure withsrc/app/app.ts,app.html, andapp.css(no.component.suffixes).
Adding Syncfusion® Angular Grid packages
To install the Grid component, use the following command:
npm install @syncfusion/ej2-angular-grids --saveAdding CSS reference
The following CSS files are available in the ../node_modules/@syncfusion package folder. Add these as references in src/styles.css
@import '../node_modules/@syncfusion/ej2-base/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-calendars/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-notifications/styles/material3.css';
@import '../node_modules/@syncfusion/ej2-angular-grids/styles/material3.css';For using SCSS styles, refer to this guide.
Add Grid component
Modify the template in the src/app/app.ts file to render the grid component. Add the Angular Grid by using <ejs-grid> selector in template section of the app.ts file.
import { Component } from '@angular/core';
import { GridModule } from '@syncfusion/ej2-angular-grids';
// Defines the data to be displayed in the Grid.
const data: object[] = [
{ OrderID: 10248, CustomerName: 'Ana Trujillo', OrderDate: new Date(2025, 0, 12), ShipCountry: 'France', Freight: 32.38 },
{ OrderID: 10249, CustomerName: 'Martin Sommer', OrderDate: new Date(2025, 0, 15), ShipCountry: 'Germany', Freight: 11.61 },
{ OrderID: 10250, CustomerName: 'Thomas Hardy', OrderDate: new Date(2025, 1, 5), ShipCountry: 'Brazil', Freight: 65.83 },
{ OrderID: 10251, CustomerName: 'Elizabeth Lincoln', OrderDate: new Date(2025, 1, 18), ShipCountry: 'France', Freight: 41.34 },
{ OrderID: 10252, CustomerName: 'Victoria Ashworth', OrderDate: new Date(2025, 2, 10), ShipCountry: 'Belgium', Freight: 51.30 },
{ OrderID: 10253, CustomerName: 'Martine Rance', OrderDate: new Date(2025, 2, 22), ShipCountry: 'Brazil', Freight: 58.17 }
]
@Component({
imports: [GridModule],
standalone: true,
selector: 'app-root',
template: `
<!-- Assigns the dataset to the Grid component -->
<ejs-grid [dataSource]='data'>
<!-- Define the columns to be displayed -->
<e-columns>
<e-column field='OrderID' headerText='Order ID' textAlign='Right' width=90></e-column>
<e-column field='CustomerName' headerText='Customer Name' width=100></e-column>
<e-column field='OrderDate' headerText='Order Date' textAlign='Right' format='yMd' width=100></e-column>
<e-column field='Freight' headerText='Freight' textAlign='Right' format='C2' width=120></e-column>
<e-column field='ShipCountry' headerText='Ship Country' width=100></e-column>
</e-columns>
</ejs-grid>
`
})
export class App {
public data: object[] = data;
}import { bootstrapApplication } from '@angular/platform-browser';
import { App } from './app';
import 'zone.js';
bootstrapApplication(App).catch((err) => console.error(err));Run the application
ng serve --openSee also
- Grid Feature Modules
- How to get current query in Angular Grid
- Apply Grid Localization from external JSON file in Angular Grid
- How to render the Syncfusion Grid in jHipster spring boot Angular App
- Calculate Height of Angular Grid
- How to set tabindex for input element and NumericTextBox in Angular Grid
- How to toggle between List and Grid View in Angular?
- How to get started easily with an example of Syncfusion angular 6 data grid/datatable?
- How to render Angular Grid with material theme
- Getting Started ASP.NET Core with Angular using Project Template
- Getting Started with Angular CLI as Front end in ASP.NET MVC
- Getting Started with Ionic and Angular
- Getting Started with Angular and Electron
- How to get started easily with Syncfusion angular 9 data grid?
- How to get started easily with Syncfusion angular 8 data grid?
- How to handle errors in Angular Grid component?
- How to get started easily with Syncfusion Angular 7 Data Grid/DataTable?
- How to get started easily with an example of Syncfusion angular 5 data grid?
- How to get started easily with Syncfusion angular 4 data grid?