Pagination in JET table

if you have a hughe number of rows you can add pagination in your tables with ojPagingControl.

you add it above or below your table in your html viewModule

<div id="paging" data-bind="ojComponent: {component: 'ojPagingControl', data: datasource, pageSize: 2}"/>

 

and in your js file of the Viewmodule

  • add  ‘ojs/ojpagingtabledatasource‘ in the define
  • change the data value in PagingTableDataSource
self.datasource(new oj.PagingTableDataSource(new oj.CollectionTableDataSource(self.DeptCol())));

 

As result you will see as it show below

jetpagination

 

 

Anuncios