We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Ajax Call and Pagging Issue

Hi there,

I am trying to load the grid data on click of button using ajax(axios)  call but I am unable to handle paging events?
I really appreciate if you show me some example to handle this situation.

Thanks & Regards

1 Reply

PS Pavithra Subramaniyam Syncfusion Team March 22, 2019 12:08 PM UTC

Hi sundar, 
Greetings from Syncfusion. 
You can catch the Grid Paging action by using the “actionBegin” and “actionComplete” events which will be triggered before and after the page action is done. Please refer to the below code example, documentation link and sample link for more information. 
new Vue({   
              el: '#app', 
              template: ` 
    <div id="app"> 
    <ejs-button id='collapse' cssClass='e-flat' @click.native='click'>Data</ejs-button> 
        <ejs-grid id="Grid" ref="grid" :actionBegin="Begin" :actionComplete="Complete" :allowPaging='true' height='315px'> 
             .  .  . 
   methods: { 
     click: function() { 
    .then(function (response) { 
   Begin: function(e){ 
     if(e.requestType == 'paging'){            // triggers before Paging action 
   Complete: function(e){ 
     if(e.requestType == 'paging'){      // triggers after Paging action 
    provide: { 
    grid: [Page] 
Sample               : https://plnkr.co/edit/NxT5YEINUoyD0mGJuGGa?p=preview  
Please get back to us if you need further assistance. 
Pavithra S. 

Live Chat Icon For mobile
Up arrow icon