com.smartgwt.client.widgets.grid
Interface GroupValueFunction


public interface GroupValueFunction

Function to return the value which records should be grouped by.


Method Summary
 Object getGroupValue(Object value, ListGridRecord record, ListGridField field, String fieldName, ListGrid grid)
          Return the value which records should be grouped by.
 

Method Detail

getGroupValue

Object getGroupValue(Object value,
                     ListGridRecord record,
                     ListGridField field,
                     String fieldName,
                     ListGrid grid)
Return the value which records should be grouped by.

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.

Parameters:
value - raw value for the cell, from the record for the row
record - 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 parameter
field - Field object for which to get group value
fieldName - The name of the field
grid - the ListGrid displaying the cell
Returns:
Group value to which this record belongs