Change Event (Method) when page size or page number is changed.

Hi,

I can't seem to find the method that I can use when page number or page size is changed on the Ejs Grid.

What I'm trying to achieve is:

Whenever page size or number is changed I need to make an API call with the changed parameters.

Issue:

Can't seem to find any method that triggers when page size or number is changed.


Something like:

pageChange(){ //Triggered when page size/number is changed.

this.getOrderList();

}


1 Reply 1 reply marked as answer

PS Pavithra Subramaniyam Syncfusion Team January 7, 2022 05:50 AM UTC

Hi Moiz, 
 
Thanks for contacting Syncfusion support. 
 
You can achieve your requirement by using the “actionBegin” event with “paging” request type which will trigger for any paging action in Grid. Please refer to the below code example and sample link for more information. 
 
@Component({ 
  selector: 'app-root', 
  template: `<ejs-grid [dataSource]="data" height="350" allowPaging="true" [pageSettings]="pageSettings" (actionBegin)="actionBegin($event)"> 
    .  .  . 
  </ejs-grid>`, 
}) 
export class AppComponent { 
  .  .  . 
  actionBegin(args) { 
    if (args.requestType == 'paging') { 
      console.log(args); 
    } 
  } 
} 
 
 
 
 
Please get back to us if you need further assistance on this. 
 
Regards, 
Pavithra S 


Marked as answer
Loader.
Up arrow icon