group-by.md 1.6 KB


layout: docs title: Table Group By description: Table Group By extension of Bootstrap Table. group: extensions

toc: true

Use Plugin: bootstrap-table-group-by3
You must include the bootstrap-table-group-by.css file in order to get the appropriate style

Usage

{% highlight html %} {% highlight html %}

jsFiddle example: boostrap-table-group-by

Options

groupBy

  • type: String

  • Detail:

Set the name of the field that you want to group the data.

  • Default: ``

groupBySum

  • type: String

  • Detail:

Set the names of the fields by which you want to calculate sums.

  • Default: ``

groupByCount

  • type: String

  • Detail:

Set the names of the fields by which you want to calculate counts.

  • Default: ``

groupByAvg

  • type: String

  • Detail:

Set the names of the fields by which you want to calculate averages.

  • Default: ``

groupByFormatter

  • type: Function

  • Detail:

The group row formatter function, takes three parameters:

  • colspan: the colspan should be applied to the tr element.
  • key: the group key name.
  • tds: an array of tds elements to be added to the tr element.

  • Default: undefined