IgGrid seem not support paging in angular context. I have a angular service to load data by paging. I will call method in this service to bind data to igGrid.
I've setup grid enable paging features:
$scope.gridOptions = { dataSource: dataSource, width: "100%", height: "400px", primaryKey: "id", autoCommit: true, autoGenerateColumns: false, autoAdjustHeight: true, columns: columnsTranslated, features: [{ name: "Paging", type: "local", pageSize: pageSize, showPageSizeDropDown: false }] }
And dataSource= angularService.getData(pageindex,pageSize);
But I don't know how I can specify total number of record/total for this case.
I don't want grid bind directly to data source by an URL because I want to pre-process data in angularService before it is received on client.
Hello,
Your dataSource should have a property field (if it doesn't already has such) which contains information about the total records count and this property should be passed to igGridPaging with the recordCountKey option.
As understand datasource = angularService.getData(pageindex,pageSize); must return an arrays with field to bind into grid
Eg:
datasource = [{id: 1, name: "acb"},{id: 2, name: "acb2"},{id: 3, name: "acb3"}]
If I set recordCountKey: "totalCount", how I put totalCount value in datasource?