Angular UI Components Documentation
jqxGrid sorts, filters and pages on its own once you turn those features on. This tutorial goes a step further: the component reads the grid's state into a signal to show a summary line, and controls the grid from its own search box and buttons.
It also explains the rule that keeps the grid's state intact in an Angular component: bind the grid's inputs to values that do not change, and change the grid through its methods.

Use an Angular CLI app set up as in Angular CLI with jQWidgets. Bind the Angular Grid to data explains the data adapter used here.
sortable lets users sort by clicking a column header. filterable with showfilterrow adds a row of filter inputs under the headers, and each column's filtertype picks the input: text by default, checkedlist for a list of values, number for numbers, range for a date range. pageable adds a pager, and pagesizeoptions lists the page sizes a user can pick.
<jqxGrid #grid
[theme]="'fluent'"
[width]="'100%'"
[autoheight]="true"
[source]="source"
[columns]="columns"
[sortable]="true"
[filterable]="true"
[showfilterrow]="true"
[pageable]="true"
[pagesize]="10"
[pagesizeoptions]="pagesizeoptions"
(onBindingcomplete)="describe()"
(onSort)="describe()"
(onFilter)="describe()"
(onPagechanged)="describe()"
(onPagesizechanged)="describe()">
</jqxGrid>
export class App {
// …
readonly columns: jqwidgets.GridColumn[] = [
{ text: 'Customer', datafield: 'customer', width: 200 },
{ text: 'Product', datafield: 'product', width: 140, filtertype: 'checkedlist' },
{ text: 'Quantity', datafield: 'quantity', width: 100, cellsalign: 'right', align: 'right', filtertype: 'number' },
{ text: 'Price', datafield: 'price', width: 100, cellsalign: 'right', align: 'right', cellsformat: 'c2', filtertype: 'number' },
{ text: 'Date', datafield: 'date', cellsformat: 'yyyy-MM-dd', filtertype: 'range' }
];
// …
}
jqwidgets.GridColumn is the column type from the typings that come with jqwidgets-ng; with it, the editor checks the column options as you type them.
In jqwidgets-ng 27.1.0 and earlier, a change of any input of <jqxGrid> makes the component apply all of its object inputs to the widget again, [source] and [columns] among them. The grid then binds its data again and drops its sort, filters and page. Measured: with the grid sorted and on page 2, changing [editable], [theme] or [pagesize] through a signal each caused a new binding, and the grid was back on page 1, not sorted.
So bind the grid's inputs to values that are created once: fields of the component, as here, or constants. The rest of the component can change as often as it likes; signals such as the status line and the search text are not inputs of the grid, so the grid does not notice them. Two things to avoid:
[pagesize]="pageSize()". To change an option while the app runs, call the grid's method instead: this.grid().editable(true) or this.grid().theme('fluent-dark') change that option only, and the grid keeps its sort and page; this.grid().pagesize(25) keeps the sort and goes to the first page.[source]="makeSource()". Angular calls it on every change detection pass, each call returns a new adapter, and the grid binds again each time. A computed() signal returns the same adapter until its inputs change.The grid's state belongs to the grid. The component asks for it when it needs it, which is the next step.
The grid raises bindingcomplete, sort, filter, pagechanged and pagesizechanged; the component exposes them as the outputs (onBindingcomplete), (onSort) and so on. The template answers each with the same method, which asks the grid for its current state through the signal query and stores a summary in a signal:
export class App {
// …
// What the grid shows now: read from the grid each time it binds, sorts, filters or pages.
describe(): void {
const grid = this.grid();
const paging = grid.getpaginginformation();
const sort = grid.getsortinformation();
const rows = grid.getdatainformation().rowscount;
const sorted = sort.sortcolumn ? `sorted by ${sort.sortcolumn} ${sort.sortdirection.ascending ? 'ascending' : 'descending'}` : 'not sorted';
this.status.set(`${rows} orders, page ${Number(paging.pagenum) + 1} of ${paging.pagescount}, ${sorted}`);
}
// …
}
(onBindingcomplete) fires once while the grid is created, because jqwidgets-ng attaches the outputs before it creates the widget, and this.grid() already works in that handler. The status line is therefore filled from the start.
Any grid method can be called through the signal query. A search box of the component's own becomes a filter on the Customer column: removefilter drops the previous one without redrawing, addfilter adds a filter group, and applyfilters runs them.
export class App {
// …
// A customer search box of the app's own, applied as a grid filter on one column.
searchCustomers(text: string): void {
this.search.set(text);
const grid = this.grid();
grid.removefilter('customer', false);
if (text) {
const group = new jqx.filter();
group.addfilter(0, group.createfilter('stringfilter', text, 'contains'));
grid.addfilter('customer', group);
}
grid.applyfilters();
}
// …
}
<label>
Customer contains
<input #box [value]="search()" (input)="searchCustomers(box.value)" />
</label>
Sorting and paging work the same way: sortby('quantity', 'desc'), gotopage(0), and to undo everything clearfilters() and removesort().
src/app/app.ts:
import { Component, signal, viewChild } from '@angular/core';
import { jqxGridComponent, jqxGridModule } from 'jqwidgets-ng/jqxgrid';
interface Order {
id: number;
customer: string;
product: string;
quantity: number;
price: number;
date: Date;
}
const customers = [
'Alfreds Futterkiste',
'Bon app',
'Ernst Handel',
'Frankenversand',
'Königlich Essen',
'Que Delícia',
'Wartian Herkku',
'Wilman Kala'
];
const products = ['Chai', 'Chang', 'Ikura', 'Konbu', 'Tofu', 'Pavlova', 'Gnocchi', 'Mascarpone'];
// 500 sample orders in 2026, the same on every load.
function makeOrders(count: number): Order[] {
const start = new Date(2026, 0, 1).getTime();
const day = 24 * 60 * 60 * 1000;
return Array.from({ length: count }, (_, i) => ({
id: i + 1,
customer: customers[(i * 7) % customers.length],
product: products[(i * 5) % products.length],
quantity: 1 + ((i * 13) % 20),
price: Math.round((2 + ((i * 37) % 45) + ((i * 11) % 100) / 100) * 100) / 100,
date: new Date(start + ((i * 3) % 270) * day)
}));
}
@Component({ selector: 'app-root', imports: [jqxGridModule], templateUrl: './app.html' })
export class App {
readonly grid = viewChild.required<jqxGridComponent>('grid');
readonly status = signal('');
readonly search = signal('');
// The grid's inputs: created once and never replaced, so the grid keeps its sort,
// filters and page while the rest of the component changes.
readonly source = new jqx.dataAdapter({
localdata: makeOrders(500),
datatype: 'array',
id: 'id',
datafields: [
{ name: 'customer', type: 'string' },
{ name: 'product', type: 'string' },
{ name: 'quantity', type: 'number' },
{ name: 'price', type: 'number' },
{ name: 'date', type: 'date' }
]
});
readonly columns: jqwidgets.GridColumn[] = [
{ text: 'Customer', datafield: 'customer', width: 200 },
{ text: 'Product', datafield: 'product', width: 140, filtertype: 'checkedlist' },
{
text: 'Quantity',
datafield: 'quantity',
width: 100,
cellsalign: 'right',
align: 'right',
filtertype: 'number'
},
{
text: 'Price',
datafield: 'price',
width: 100,
cellsalign: 'right',
align: 'right',
cellsformat: 'c2',
filtertype: 'number'
},
{ text: 'Date', datafield: 'date', cellsformat: 'yyyy-MM-dd', filtertype: 'range' }
];
readonly pagesizeoptions = ['10', '25', '50'];
// What the grid shows now: read from the grid each time it binds, sorts, filters or pages.
describe(): void {
const grid = this.grid();
const paging = grid.getpaginginformation();
const sort = grid.getsortinformation();
const rows = grid.getdatainformation().rowscount;
const sorted = sort.sortcolumn
? `sorted by ${sort.sortcolumn} ${sort.sortdirection.ascending ? 'ascending' : 'descending'}`
: 'not sorted';
this.status.set(
`${rows} orders, page ${Number(paging.pagenum) + 1} of ${paging.pagescount}, ${sorted}`
);
}
// A customer search box of the app's own, applied as a grid filter on one column.
searchCustomers(text: string): void {
this.search.set(text);
const grid = this.grid();
grid.removefilter('customer', false);
if (text) {
const group = new jqx.filter();
group.addfilter(0, group.createfilter('stringfilter', text, 'contains'));
grid.addfilter('customer', group);
}
grid.applyfilters();
}
showLargestOrders(): void {
this.grid().sortby('quantity', 'desc');
this.grid().gotopage(0);
}
reset(): void {
this.search.set('');
this.grid().clearfilters();
this.grid().removesort();
this.grid().gotopage(0);
}
}
src/app/app.html:
<h1>Orders</h1>
<p>
<label>
Customer contains
<input #box [value]="search()" (input)="searchCustomers(box.value)" />
</label>
<button type="button" (click)="showLargestOrders()">Largest orders first</button>
<button type="button" (click)="reset()">Reset</button>
</p>
<p aria-live="polite">{{ status() }}</p>
<jqxGrid #grid
[theme]="'fluent'"
[width]="'100%'"
[autoheight]="true"
[source]="source"
[columns]="columns"
[sortable]="true"
[filterable]="true"
[showfilterrow]="true"
[pageable]="true"
[pagesize]="10"
[pagesizeoptions]="pagesizeoptions"
(onBindingcomplete)="describe()"
(onSort)="describe()"
(onFilter)="describe()"
(onPagechanged)="describe()"
(onPagesizechanged)="describe()">
</jqxGrid>
The status line reads 500 orders, page 1 of 50, not sorted. Type part of a customer's name, for example ernst: the grid shows 62 of the 500 orders and the line reads 62 orders, page 1 of 7, not sorted. Largest orders first sorts by quantity, and Reset clears the filter and the sort.