Hi Adam,
Greetings from Syncfusion Support.
Based on your query you need to select all the records in the Grid when you click on the header(selectAll) checkbox. To achieve your requirement we suggest you to enable PersistSelection property of Grid SelectionSettings and any one of the columns must be enabled with IsPrimaryKey as true.
Please refer the below code snippet for your reference.
var grid = new ej.grids.Grid({
dataSource: window.inventoryData,
allowPaging: true,
allowSelection: true,
selectionSettings: { persistSelection: true },
enableHover: false,
columns: [
{ type: 'checkbox', width: 50 },
{ field: 'Inventor', isPrimaryKey: true, headerText: 'Inventor Name', width: 180 },
{ field: 'NumberofPatentFamilies', headerText: 'No of Patent Families', width: 195, textAlign: 'Right' },
{ field: 'Country', headerText: 'Country', width: 120 },
{ field: 'Active', headerText: 'Active', width: 130 }
],
pageSettings: { pageCount: 2 }
}); |
Please find the below sample for more information.
Sample : https://stackblitz.com/edit/n3n91z-vosdtf?file=index.js
But in Remote data (Syncfusion Adaptors) when we enable paging only the first page records will be fetched from the server-side and binded to the Grid. When we move to the next page then only next page records will be fetched from the server side.
So, when we click on the header checkbox it will select only the current page records. It is the default behavior of an EJ2 Grid.
Please get back to us if you need further assistance.
Regards,
Shalini M.