Skip to content

New features 12.12.2013

Ferenc Kun edited this page Dec 12, 2013 · 5 revisions

New pagination type

The original use of my implementation was to send requests to the server to get the new data table page content. Nowadays we use the data table more often to handle one big collection on client side. I built the option to switch between this two mode.

  • paginationType 'explicit' is the way to send requests to the server
  • paginationType 'implicit' (this is from now the default mode) is the way to handle a big collection (like the original way of the jQuery DataTable).

Html

 * pagination-type="explicit" --> work with the server

or

 * pagination-type="explicit" or nothing --> work with a client side collection

Controller

In the example app you will find two sections in the main controller to modify if you want to try out the implicit way of pagination. Search for 'IMPLICIT PAGINATION' in the code.

Header titles

From now you have the option to define custom column titles. You need a collection in the controller to map the title texts (title) to the property names (propertyName).

Controller

        var customTitles = [
            {propertyName : 'engine', title : '1. engine'},
            {propertyName : 'browser', title : '2. browser'},
            {propertyName : 'platform', title : '3. platform'},
            {propertyName : 'version', title : '4. version'},
            {propertyName : 'grade', title : '5. grade'}
        ];

Html

     header-titles="customTitles"

Default page size

You can from now define the default page size for the data table. It is originally 10. 'PageSizes' works with this option as well. But you can set the default page size without the option to change the pagesize with a header control (PageSizes).

Html

     default-page-size="10"
Clone this wiki locally