Bootstrap-table: How to get number of Rows (jquery) in the Bootstrap table.

Created on 20 Apr 2015  路  5Comments  路  Source: wenzhixin/bootstrap-table

how to get (in jquery) total number of rows listed in the bootstrap table.

it displays the message 'Showing 1 to 8 of 8 rows', but i need to get the total rows [8 rows] in jquery, can you provide one sample code.

I searched the documentation but there is no information.

help-wanted

Most helpful comment

Use $('#table').bootstrapTable('getOptions').totalRows or $('#table').bootstrapTable('getData').length.

All 5 comments

Use $('#table').bootstrapTable('getOptions').totalRows or $('#table').bootstrapTable('getData').length.

Thanks for your inputs.

On refreshing the page $('#table').bootstrapTable('getOptions').totalRows shows 0. Can you explain why? However the records are properly displayed.

Issue is not consistent.

Can you create a new issue an share us an example?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

typo3ua picture typo3ua  路  23Comments

marcelod picture marcelod  路  16Comments

gadget00 picture gadget00  路  16Comments

cgountanis picture cgountanis  路  14Comments

thibaultvanc picture thibaultvanc  路  20Comments