jquery-bootgrid icon indicating copy to clipboard operation
jquery-bootgrid copied to clipboard

Pagination (only 3 pages max)

Open laurentb0204 opened this issue 9 years ago • 2 comments

Hi,

I want to display only 3 pages maximum in the pagination of a JqueryBootGrid grid. I tried several methods like (templates: {pagination: ???}) but it does not work ... Can you tell me if this is possible and how I can do, thank you in advance.

Laurent BROUCK

laurentb0204 avatar Jan 16 '17 09:01 laurentb0204

As the job of the grid is to paginate all data given to it, it would be on you to limit the amount of data given to the grid.

bellwood avatar Nov 21 '17 20:11 bellwood

As I can see in code, pagination size is determined like this: maxCount = this.options.padding * 2 + 1, where this.options.padding is by default 2. So 2 * 2 + 1 = 5...so pagination will have 5 pages by default...if you want 3 you need to change padding settings to 1:

$('#grid-history').bootgrid({
    'padding': 1
});

Resulting in this: screenshot_1

jaandric avatar Aug 10 '18 11:08 jaandric