Angular UI Components Documentation
This tutorial puts 100,000 rows in an Angular grid and moves twenty of their prices every second, while a clock on the page changes every second too. It covers what keeps such a grid fast: let it virtualize, keep its inputs constant, change cells instead of replacing the data, and let Angular run change detection only when a signal changes.

Use an Angular CLI app set up as in Angular CLI with jQWidgets. The timings below were measured with a production build (ng serve --configuration production) in Chromium on a desktop PC; yours will differ, but the proportions hold.
With a fixed height, the grid creates elements only for the rows in view (16 here) and reuses them as you scroll, whatever the number of rows. autoheight makes the grid as tall as its rows, so it has to create every row of the page: keep it for small tables or with paging.
<jqxGrid #grid
[theme]="'fluent'"
[width]="'100%'"
[height]="520"
[source]="source"
[columns]="columns"
[sortable]="true"
[filterable]="true"
[columnsresize]="true">
</jqxGrid>
The 100,000 rows are made once, when the module loads, and the adapter once, with the component. The page shows its first rows about 0.8 seconds after it starts loading, and a click on a column header sorts all 100,000 rows in about half a second.
The page has a clock: a signal set every second. Angular refreshes the text that reads it, and nothing else. The grid's inputs are fields that never change, so the clock never reaches the grid; a changing input would make jqwidgets-ng apply the source again and bind all 100,000 rows (see Sorting, filtering and paging).
export class App {
// …
constructor() {
// A clock that changes a signal every second. Angular refreshes the text that reads
// it; the grid is not touched. The timer stops when the component is destroyed.
const clock = setInterval(() => this.now.set(new Date()), 1000);
inject(DestroyRef).onDestroy(() => clearInterval(clock));
// …
}
// …
}
The timer is the component's to stop: DestroyRef.onDestroy clears it when the component is destroyed. The grid component destroys its own widget.
To change a few values, set the cells: setcellvalue for each changed cell, between beginupdate() and endupdate() so that the grid draws once. getrowboundindexbyid finds a row's index from its id, given as a string.
export class App {
// …
// Twenty of the watched rows change. Only the changed cells are set, between beginupdate
// and endupdate, so the grid draws once for all of them.
tick(): void {
const grid = this.grid();
const started = performance.now();
grid.beginupdate();
for (let n = 0; n < 20; n++) {
const id = String(1 + Math.floor(Math.random() * WATCHED));
const index = grid.getrowboundindexbyid(id);
const change = Math.round((Math.random() - 0.5) * 200) / 100;
grid.setcellvalue(index, 'price', Math.max(1, grid.getcellvalue(index, 'price') + change));
grid.setcellvalue(index, 'change', change);
}
grid.endupdate();
this.lastUpdate.set(`20 rows updated in ${(performance.now() - started).toFixed(1)} ms`);
}
}
Measured with the 100,000 rows: twenty rows take about 10 milliseconds (between 6 and 18). One updaterow call for each of the twenty rows took about 3 seconds, and updatebounddata(), which binds all the rows again as a new source would, about 0.3 seconds.
The live updates run while the live signal is true. An effect starts the timer, and its onCleanup stops it when live changes again and when the component is destroyed:
export class App {
// …
constructor() {
// …
// While live() is true, one update a second. onCleanup stops the timer when live()
// changes again and when the component is destroyed.
effect((onCleanup) => {
if (!this.live()) {
return;
}
const timer = setInterval(() => this.tick(), 1000);
onCleanup(() => clearInterval(timer));
});
}
// …
}
The Change column colours itself with cellclassname. Add the two classes to src/styles.css: as in Custom cell rendering, a component's own styles do not reach the cells the grid creates.
.up { color: #15803d !important; }
.down { color: #b91c1c !important; }
A new Angular 22 app has no zone.js. Angular runs change detection when a signal that a template reads changes, or after an event bound in a template, and its components are OnPush by default. The grid listens to many DOM events of its own (mouse moves, wheel, scroll), and those start nothing in Angular.
Measured with the mouse over the grid, 40 moves and wheel steps: the zoneless app ran 4 change detection passes in that time, the ones the clock caused. The same app with zone.js (provideZoneChangeDetection()) ran 174, one after each event zone.js saw. Each pass was cheap here, 4.5 milliseconds for all 174, because the component is small and OnPush; in an app with many components checked eagerly they cost more. If your app still uses zone.js, this is one more reason to move to zoneless change detection.
src/app/app.ts:
import { DatePipe } from '@angular/common';
import { Component, DestroyRef, effect, inject, signal, viewChild } from '@angular/core';
import { jqxGridComponent, jqxGridModule } from 'jqwidgets-ng/jqxgrid';
interface Quote {
id: number;
symbol: string;
exchange: string;
price: number;
change: number;
volume: number;
}
const ROWS = 100_000;
// The live feed moves the prices of the first 200 symbols, the ones in view.
const WATCHED = 200;
const exchanges = ['NYSE', 'NASDAQ', 'LSE', 'XETRA', 'TSE'];
// 100,000 rows, made once when the module loads.
const quotes: Quote[] = Array.from({ length: ROWS }, (_, i) => ({
id: i + 1,
symbol: `SYM${String(i + 1).padStart(6, '0')}`,
exchange: exchanges[i % exchanges.length],
price: Math.round((10 + ((i * 7919) % 99000) / 100) * 100) / 100,
change: 0,
volume: (i * 104729) % 5_000_000
}));
@Component({ selector: 'app-root', imports: [jqxGridModule, DatePipe], templateUrl: './app.html' })
export class App {
readonly grid = viewChild.required<jqxGridComponent>('grid');
readonly rowCount = ROWS;
readonly now = signal(new Date());
readonly live = signal(false);
readonly lastUpdate = signal('');
// The grid's inputs never change: the clock and the live updates leave them alone.
readonly source = new jqx.dataAdapter({
localdata: quotes,
datatype: 'array',
id: 'id',
datafields: [
{ name: 'id', type: 'number' },
{ name: 'symbol', type: 'string' },
{ name: 'exchange', type: 'string' },
{ name: 'price', type: 'number' },
{ name: 'change', type: 'number' },
{ name: 'volume', type: 'number' }
]
});
readonly columns: jqwidgets.GridColumn[] = [
{ text: 'Symbol', datafield: 'symbol', width: 140 },
{ text: 'Exchange', datafield: 'exchange', width: 110 },
{
text: 'Price',
datafield: 'price',
width: 120,
cellsformat: 'f2',
cellsalign: 'right',
align: 'right'
},
{
text: 'Change',
datafield: 'change',
width: 110,
cellsformat: 'f2',
cellsalign: 'right',
align: 'right',
cellclassname: (_row: number, _field: string, value: number) =>
value > 0 ? 'up' : value < 0 ? 'down' : ''
},
{
text: 'Volume',
datafield: 'volume',
cellsformat: 'n0',
cellsalign: 'right',
align: 'right'
}
];
constructor() {
// A clock that changes a signal every second. Angular refreshes the text that reads
// it; the grid is not touched. The timer stops when the component is destroyed.
const clock = setInterval(() => this.now.set(new Date()), 1000);
inject(DestroyRef).onDestroy(() => clearInterval(clock));
// While live() is true, one update a second. onCleanup stops the timer when live()
// changes again and when the component is destroyed.
effect((onCleanup) => {
if (!this.live()) {
return;
}
const timer = setInterval(() => this.tick(), 1000);
onCleanup(() => clearInterval(timer));
});
}
// Twenty of the watched rows change. Only the changed cells are set, between beginupdate
// and endupdate, so the grid draws once for all of them.
tick(): void {
const grid = this.grid();
const started = performance.now();
grid.beginupdate();
for (let n = 0; n < 20; n++) {
const id = String(1 + Math.floor(Math.random() * WATCHED));
const index = grid.getrowboundindexbyid(id);
const change = Math.round((Math.random() - 0.5) * 200) / 100;
grid.setcellvalue(
index,
'price',
Math.max(1, grid.getcellvalue(index, 'price') + change)
);
grid.setcellvalue(index, 'change', change);
}
grid.endupdate();
this.lastUpdate.set(`20 rows updated in ${(performance.now() - started).toFixed(1)} ms`);
}
}
src/app/app.html:
<h1>Quotes</h1>
<p>
{{ rowCount.toLocaleString('en-US') }} rows · {{ now() | date: 'HH:mm:ss' }}
<button type="button" (click)="live.set(!live())">{{ live() ? 'Stop live updates' : 'Start live updates' }}</button>
<span aria-live="off">{{ lastUpdate() }}</span>
</p>
<jqxGrid #grid
[theme]="'fluent'"
[width]="'100%'"
[height]="520"
[source]="source"
[columns]="columns"
[sortable]="true"
[filterable]="true"
[columnsresize]="true">
</jqxGrid>
The grid opens with 100,000 rows, and scrolling, sorting and filtering work on all of them. Start live updates moves twenty of the first two hundred prices each second, and the line next to the button gives the time each update took. Stop live updates stops them.