javascriptangularjsui-grid

Angular ui-grid - want to navigate to next page when down key is pressed on last row of grid


if down key is pressed in last row of grid then I want to naviagate to next page

var gridScope = angular.element(document.getElementById("MainWrap")).scope();
gridScope.gridApi.pagination.nextPage();

How to check event of down key in last row of grid.


Solution

  • I think you want to implement the infinite scroll feature into your UiGrid. Something like this below, should do the trick.

    In HTML

    <div ui-grid="gridOptions" class="grid" ui-grid-infinite-scroll></div>
    

    In JavaScript

    var app = angular.module('app', ['ui.grid', 'ui.grid.infiniteScroll']);