Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
IgGrid paging with angular
posted

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.

Parents
No Data
Reply
  • 3995
    Offline posted

    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.

Children