public interface GroupValueFunction
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getGroupValue(java.lang.Object value,
ListGridRecord record,
ListGridField field,
java.lang.String fieldName,
ListGrid grid)
Return the value which records should be grouped by.
|
java.lang.Object getGroupValue(java.lang.Object value, ListGridRecord record, ListGridField field, java.lang.String fieldName, ListGrid grid)
All records that for which getGroupValue() returns the same value appear in the same group. Default is the result of ListGrid.getCellValue().
While any type of value may be returned, avoiding the use of string values may result in improved performance.
In this case, GroupTitleRenderer.getGroupTitle(Object, GroupNode, ListGridField, String, ListGrid)
may be implemented to map a numeric group value into a
legible string.
value
- raw value for the cell, from the record for the rowrecord
- Record object for the cell. Note: If this is a new row that has not been saved, in an editable grid, it has no associated record object. In this case the edit values will
be passed in as this parameterfield
- Field object for which to get group valuefieldName
- The name of the fieldgrid
- the ListGrid displaying the cell