question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is that a Bug? Server pagination mode cannot export all data to excel

See original GitHub issue

Hi guys,

Newbie’s here , I like your wonderful project!

Now i got some trouble,when I set server pagination mode,I try to export all data to excel, but it doesnt work, just got current page ,I have searched all the issues on the site,but can not find out solution. please help~

here is the code: <script src="/table/js/bootstrap-table.min.js"></script> <script src="/table/js/bootstrap-table-zh-CN.min.js"></script> <script src="/table/js/jquery.base64.js"></script> <script src="/table/js/bootstrap-table-export.js"></script> <script src="/table/js/tableExport.js"></script> <script type="text/javascript" src="/table/js/FileSaver.min.js"></script> <table id="mytab" class="table table-hover" ></table>

$(function() { $('#mytab').bootstrapTable({ url:'test.php', dataField: 'rows', striped:true, pagination: true, pageSize: 20, pageList: [5, 10, 20, 50], sidePagination: 'server', contentType: 'application/x-www-form-urlencoded', dataType: 'json', method: 'post', queryParamsType: 'limit',//查询参数组织方式 queryParams: function getParams(params) { params.other = 'otherInfo'; return params; }, searchOnEnterKey: false, showRefresh: true, showColumns: true, buttonsAlign: 'left', toolbar: '#toolbar', toolbarAlign: 'right', showFooter:true, showExport:true, exportDataType: 'all', columns: [ { title: '全选', field: 'select', checkbox: true, width: 20,//宽度 align: 'center',//水平 valign: 'middle'//垂直 }, { title: 'ID',//标题 field: 'id',//键名 sortable: true,//是否可排序 order: 'desc'//默认排序方式 }, { field: 'name', title: 'NAME', sortable: true, titleTooltip: 'this is name' }, { field: 'age', title: 'AGE', sortable: true, footerFormatter:'sumFormatter' }, { field: 'info', title: 'INFO[using-formatter]', formatter: 'infoFormatter'//对本列数据做格式化 } ] }); })

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
daN4catcommented, Dec 2, 2017

Yes the fix works. It should be merged to master.

1reaction
fsdesacommented, Nov 29, 2017

I found a workaround In the function load ( BootstrapTable.prototype.load = function (data) { ) I changed the if condition if (this.options.sidePagination === ‘server’) TO if (this.options.pagination && this.options.sidePagination === ‘server’)

Line 2388 in file bootstrap-table.js (version 1.11.1), now it export all the data.

Anyway, it’s still the best grid that i know, regards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ag Grid Export to Excel for Server side pagination row model
Yes, AgGrid only exports data that is loaded on the web client. You will need to either call a request with all the...
Read more >
Export all data of a datagrid in server side page mode
Hello to all! I've a datagrid with server side pagination and a button to download the data in file excel.
Read more >
exportDataType: 'all' does not export all data with pagination ...
I was searching for viable options to solve this issue on the internet. Do I have to specify sidePagination: 'server' to make this...
Read more >
Export all regardless of pagination — DataTables forums
I've searched and searched for this, but can't seem to find a straightforward answer - I have a collection of export buttons that...
Read more >
Common issues and resolutions for Power Apps
A list of common issues and resolutions within Power Apps.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found