Bootstrap-table sum total quantity statistics, bootstrap-tablesum

Source: Internet
Author: User

Bootstrap-table sum total quantity statistics, bootstrap-tablesum

I wrote a page to display the total number of all amounts in the data, but I didn't know how to assign values when I used footerformatter.

First:

To do so to modify the source code: bootstrap-table.js

1: Define a name

2:

3:

4:

5: If the value you pass in the background is the same as the value in the quotation marks in the first step, the following will appear:

The returned json style is as follows:

{"Total": 2, "rows": [{"id": 1, "categoryid": 11, "money": 100, "creattime": 1509116611000, "updatetime": 1509116611000, "describemon": "", "userid": 17, "state": 1, "categoryName": "Lu taibo"}], & quot; sumMoney & quot;: 110.0}

Don't forget that sumMoney is at the same level as total.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.