JavaScript

A5.ListBoxGroup Object

Description

Definition of an automatic group.

Properties

orderstringobjectarrayfunction

The order that the list should use for the grouping. See A5.ListBox.setOrder.

groupfunction(data)

A function that returns the group name for the passed in data. Each time the result of the function changes, and new group header is drawn. This means that the "order" property of this object should handle the correct ordering of the data, which happens before the group function is called. For example if a contacts list was being made, the "order" might be on the "LastName" column and the "group" function might return the first letter of the "LastName" column.

dataobject

The data for a list row that is to be grouped.

groupsarray

An array of required groups.

classNamestring

The class name to put around the entire group.

contentClassNamestring

The class name to put around the group content.

headerobject

Settings for the group header. This will be inserted into the list as a group title item.

htmlfunction(group,data)

A function that generates HTML for the group header. By default it will return the group name.

groupstring

The name of the current group, as returned by the group function.

dataarray

The rows of data for the current group.

classNamestring

The class name to put on a group header.

footerobject

Settings for the group footer.

showboolean

Whether or not to show the group footer. The default value is false.

htmlfunction(group,data)

A function that generates HTML for the group footer.

groupstring

The name of the current group, as returned by the group function.

dataarray

The rows of data for the current group.

classNamestring

The class name to put on a group footer.

emptyobject

Settings for the content of an empty group. Empty groups are created when no data in the list matches a required group (see "groups" array above).

showboolean

Whether or not to show the empty group content.

htmlfunction(group)

A function that generates HTML for an empty group content.

groupstring

The name of the current group, as returned by the group function.

classNamestring

The class name to put on an empty group content.

onDrawfunction(group,element,titleElement,contentElement)

Event fired each time a new instance of the group is drawn.

groupstring

The name of the group.

elementelement

The element that surrounds the group.

titleElementelement

The group title element.

contentElementelement

The element that surrounds the items in the group.

collapseobject

Group collapse settings.

allowstring

Specify when groups should be collapsible. Values can be "never", "programmatic" to only allow programmatic collapsing of groups using the A5.ListBox.setGroupCollapse method, "title" to allow toggling of a group by clicking on the title of the group, or "indicator" to only allow an indicator in the group title to control toggling of the group. If no value is specified the value from then the "A5.ListBox.group.collapse.allow" property will be used.

autoboolean

If "true" groups will be automatically collapsed by default. If no value is specified then the value from the "A5.ListBox.group.collapse.auto" property will be used.

indicatorobject

Settings for the collapse/expand indicator.

collapsestring

The HTML to inject in the indicator placeholder when the group is expanded. If no value is specified the value from the "A5.ListBox.group.collapse.indicator.collapse" property will be used.

expandstring

The HTML to inject in the indicator placeholder when the group is collapsed. If no value is specified the value from the "A5.ListBox.group.collapse.indicator.expand" property will be used.