user1298426 user1298426 - 1 year ago 275
jQuery Question

How to change default value of page-size in bootstrap table?

I am using this bootstrap table

which gives default page-size of 10. How can I change it to 5 or anything when the grid is loaded.

It gives option of selecting it

but by default on load it keeps it 10.

Answer Source

You can use page pageSize property of bootstrap table like

                cache: false,
                height: 400,
                striped: true,
                pagination: true,
                pageSize: 5, //specify 5 here
                pageList: [5, 10, 25, 50, 100, 200]//list can be specified here

Read Docs

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download