bootstrap-table: server-side pagination not displaying pages or row count ; search not working ; sort not working
Hi. I’m new here. I just switched my pagination over to server-side, with the default parameters, as indicated on the example page, and a bunch of javascript related things aren’t working.
- My table of 32 rows displays all the rows in one table, with no pages. It also now returns at the bottom
‘Showing 1 to 0 of 0 rows’ , with no page controls on the right-hand side.
My table is set set up like
<table class='sastable' id='table' data-toggle='table' data-classes='table table-condensed table-bordered' data-sort-name="{{'plate' if stage=='3d' else 'mjd'}}" data-sort-order='asc'
data-show-columns='true' data-pagination='true' data-search='true' pageSize='25'
data-select-item-name='input' data-toolbar='#toolbar' data-id-field='id'
data-side-pagination='server' data-page-list="[10, 25, 50, 100]" name='sastable'>
</table>
Am I missing something in the setup to activate it? I could not find another issue related to this one.
- The column sorting no longer works anymore.
- The search is also not working. I updated my bootstrap-table-flatJSON.js as indicated in this thread https://github.com/wenzhixin/bootstrap-table/issues/434, but this did not fix the problem.
Am I missing some javascript somewhere to get the server-side pagination set up properly?
Thanks for your help.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 39 (10 by maintainers)
Commits related to this issue
- Merge pull request #1890 from glorang/master Server side paginations uses this.options.searchText, fixes #617 — committed to wenzhixin/bootstrap-table by wenzhixin 8 years ago
Thanks a lot again @wenzhixin for such a great work.
Now everything is working fine on my server side pagination table ( Sorting, Searching etc., )
Hello guys i would like to let you know people that, Please utilize the following parameters in
GETmethod to perform the database query.on server side–>$_GET['sort']-->> gives you the column name of the table to sort$_GET['order']-->> specifies the order i.e, ASC or DESC$_GET['search']–>> gives the text to search into database$_GET['limit']–>> specifies number of rows$_GET['offset']–>> starting position / offset in tablePlease avoid confusions and go for this.
Thank you…
Hello @nyarachm, I am glad to know that my small work helped you…
Now for searching it is done in the same way, i’ll show you my piece of code for the same…
below is the mysql - PHP code–>>
It is that simple as shown above…
@jaydeepgiri Can I see how you got your search working (particularly the PHP script)? I do not know how to go about this. I also had issues with the sort but thanks to the variables you posted I got it working.
WHERE x=4 LIMIT $offset, $limit
OK, I thought it was resolved by mistake.