Sorting and pagination

Let’s add some functionality to our grid, such as sorting and pagination.

To create pagination, we’ll pass our UIKernel.Grid the viewCount property. In this example, we’re going to display 10 records per page.


  viewCount={10} // display 10 records per page

Next, we’ll pass the sortCycle property to columns. This will allow us to sort our grid data.


const columns = {
  name: {
    name: 'First Name',
    sortCycle: ['asc', 'desc', 'default'], // add sorting
    render: ['name', record =>]

  // ...

Now as you click your grid headers, you’ll see your grid sorted by ascending or descending.