GroupRows Plugin for jQuery

Demo

Click here to view the demo

How To Use

Download

$("table").groupRows({
  groupColumn: iColumnIndex
});

Options

Option Type Default
groupColumn Integer 0
ignoreFirstRow Boolean True
columnsForGroupRow Integer Array []

Methods

Name Example Purpose
destroy $.groupRows.destroy(table); Remove the current groupings from the table.

Description

This plugin will group the rows of a table together based on a column you specify.  It goes from the top of the table to the bottom and starts a new group whenever it finds new content in the column you specified.

It is useful for making large tables easier for users to scan and understand.  The demo is an example of a long table of steps to perform for certain processes.  Users can group by roles or products to make the table easier to understand.  You could also use additional javascript to auto expand groups based on the statuses of the records in the group.

The “columnsForGroupRow” can be used to display the content of columns from the first record in a group on the group row itself.  An example is showing the subject from every group’s first record on the group rows themselves so users can even more quickly gain an understand of groups.