pageChanging

Triggered before the change of the page.

Parameters

NameTypeDescription
e {object} event data
newPage {number} The new page

Examples

sample

    
 <table id="grid"></table>
 <script>
     var grid = $('#grid').grid({
         dataSource: '/Players/Get',
         columns: [ { field: 'ID', width: 56 }, { field: 'Name', sortable: true }, { field: 'PlaceOfBirth' } ],
         pager: { limit: 2, sizes: [2, 5, 10, 20] }
     });
     grid.on('pageChanging', function (e, newPage) {
         alert('The new page is ' + newPage + '.');
     });
 </script>