com.smartgwt.client.widgets.grid
Class ListGridField

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.widgets.grid.ListGridField
All Implemented Interfaces:
HasHandlers, HasCellSavedHandlers, HasChangedHandlers, HasChangeHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasRecordClickHandlers
Direct Known Subclasses:
ListGridSummaryField, TreeGridField

public class ListGridField
extends DataClass
implements HasCellSavedHandlers, HasChangeHandlers, HasChangedHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasRecordClickHandlers

An ordinary JavaScript object containing properties that configures the display of and interaction with the columns of a ListGrid.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
ListGridField()
           
ListGridField(JavaScriptObject jsObj)
           
ListGridField(String name)
           
ListGridField(String name, int width)
           
ListGridField(String name, String title)
           
ListGridField(String name, String title, int width)
           
 
Method Summary
 HandlerRegistration addCellSavedHandler(CellSavedHandler handler)
          Add a cellSaved handler.
 HandlerRegistration addChangedHandler(ChangedHandler handler)
          Add a changed handler.
 HandlerRegistration addChangeHandler(ChangeHandler handler)
          Add a change handler.
 HandlerRegistration addEditorEnterHandler(EditorEnterHandler handler)
          Add a editorEnter handler.
 HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
          Add a editorExit handler.
 HandlerRegistration addRecordClickHandler(RecordClickHandler handler)
          Add a recordClick handler.
 Alignment getAlign()
          Horizontal alignment for field's column header: "left", "right" or "center".
 Boolean getAutoFetchDisplayMap()
          If true, automatically fetches records and derives a valueMap from optionDataSource.
 String getBaseStyle()
          Custom base style to apply to all cells in this field instead of baseStyle To override the baseStyle at the row level, use 'record[listGrid.recordBaseStyleProperty]' instead.
 Boolean getCanEdit()
          Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level
 Boolean getCanExport()
          Dictates whether the data in this field be exported.
 Boolean getCanFilter()
          If showing a filter row for this ListGrid, should the filter criteria for this field be editable
 Boolean getCanFreeze()
          Whether this field should display freezing/unfreezing options in its header context menu.
 Boolean getCanGroupBy()
          Determines whether this field will be groupable in the header context menu.
 Boolean getCanHide()
          Whether this field can be hidden via the header context menu.
 Boolean getCanSort()
          Enables or disables sorting by this column.
 Boolean getCanSortClientOnly()
          When true, this field can only be used for sorting if the data is entirely client-side.
 Boolean getCanToggle()
          Allows a boolean or com.smartgwt.client..ValueMap field to be edited without going into edit mode.
 Alignment getCellAlign()
          Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived from align.
 String getCellIcon()
          For a field of type:"icon" only, set the icon that appears in body cells.
 DateDisplayFormat getDateFormatter()
          Display format to use for fields specified as type 'date'.
 String getDefaultGroupingMode()
          Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and 'field.groupingMode' is unset.
 String getDefaultIconSrc()
          If this field is editable, this property will be passed to editors displayed for cells within this field as defaultIconSrc.
 String getDisplayField()
          Specifies the optionDataSource field used to retrieve the display values that are to be mapped from the internal values specified by valueField.
 Integer getEditorIconHeight()
          If this field is editable, this property will be passed to editors displayed for cells within this field as iconHeight.
If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead.
 Integer getEditorIconWidth()
          If this field is editable, this property will be passed to editors displayed for cells within this field as iconWidth.
If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead.
 String getEditorImageURLPrefix()
          When some cell in this field is being edited, this property can be used to apply an explicit imageURLPrefix to the editor in question.
 String getEditorImageURLSuffix()
          When some cell in this field is being edited, this property can be used to apply an explicit imageURLSuffix to the editor in question.
 Integer getEditorValueIconHeight()
          When some cell in this field is being edited, setting this property will specify the height for value icons in the cell's editor.
 Integer getEditorValueIconWidth()
          When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's editor.
 String getEmptyCellValue()
          The value to display for a cell whose value is null or the empty string after applying formatCellValue and valueMap (if any).
 EnterKeyEditAction getEnterKeyEditAction()
          What to do when a user hits enter while editing this field?
Overrides the enterKeyEditAction as specified at the listGrid level while focus is in this field.
 EscapeKeyEditAction getEscapeKeyEditAction()
          What to do when a user hits escape while editing this field?
Overrides the escapeKeyEditAction as specified at the listGrid level while focus is in this field.
 void getFieldTitle(ListGrid viewer, int fieldNum)
          If your derivation of the field title is more complex than specifying a static string, you can specify a getFieldTitle() method on your field to return the title string.
 Boolean getFilterOnKeypress()
          If we're showing the filterEditor (listGrid.showFilterEditor is true), this property determines whether this list should be filtered every time the user edits the value of the filter editor for this field.
 Boolean getFrozen()
          Whether this field should be "frozen" for the purposes of horizontal scrolling.
 Integer getGroupGranularity()
          Granularity of grouping for numeric fields.
 String getGroupingMode()
          For a field that allows multiple 'grouping modes', the current grouping mode.
 Map getGroupingModes()
          If set, provides several possible styles of grouping that are valid for this field.
 Integer getGroupPrecision()
          For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.
 String getHeaderBaseStyle()
          Custom base style to apply to this field's header button instead of headerBaseStyle.
Note that depending on the header button constructor, you may have to override headerTitleStyle as well.
 String getHeaderTitleStyle()
          Custom titleStyle to apply to this field's header button instead of headerTitleStyle.
Note that this will typically only have an effect if headerButtonConstructor is set to StretchImgButton or a subclass thereof.
 String getIcon()
          Optional icon to show next to the title for this field.
 Integer getIconHeight()
          If icon is specified, this property can be used to specify the height of the icon to be displayed in the ListGrid header button.
 String getIconOrientation()
          If this field is showing an icon, should it appear to the left or right of the title?
Valid options are "left" or "right"
 Integer getIconSize()
          If icon is specified, this property can be used to specify the size of the icon to be displayed in the ListGrid header button.
 int getIconSpacing()
          Pixels between icon and title text.
 String getIconVAlign()
          If this field is editable, this property will be passed to editors displayed for cells within this field as iconVAlign.
 Integer getIconWidth()
          If icon is specified, this property can be used to specify the width of the icon to be displayed in the ListGrid header button.
 int getImageHeight()
          Height of image shown for fieldTypes image and imageFile in this field.
 int getImageSize()
          Size of images shown for fieldTypes image and imageFile in this field.
 String getImageURLPrefix()
          If this field has type [ListGridFieldType] set to "image" and the URL for the image displayed is not absolute, the path of the URL will be relative to this string
Alternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the URL for the image.
 String getImageURLSuffix()
          If any cells in this field are showing a value icon (see: valueIcons) or this is has ListGridFieldType set to "image", this the value of this property will be appended to the end of the URL for the icon displayed.
Typical usage might be to append a file type such as ".gif" to the filename of the image.
For editable fields, this property will also be passed through to any editors as imageURLSuffix.
 int getImageWidth()
          Width of images shown for fieldTypes image and imageFile in this field.
 Boolean getIncludeInRecordSummary()
          If a listGrid is showing a field of type summary, should this field be passed to the recordSummaryFunction when calculating the summary value to display.
 Boolean getIsRemoveField()
          If set to true and canRemoveRecords is true, this field will be rendered as the remove-field for this grid.
 String getLinkText()
          The HTML to display in cells of this field if the fieldType is set to link.
 String getName()
          Name of this field.
 DSRequest getOptionFilterContext()
          If this field has an optionDataSource specified and autoFetchDisplayMap is set, this attribute provides a way to customize the dataSource request issued to fetch the display map from the option dataSource.
 String getOptionOperationId()
          If this field has an optionDataSource specified and 'autoFetchDisplayMap' is set, this attribute provides a way to customize the operationId passed to dataSource.fetchData() when retrieving the display map from the option dataSource.
 TextMatchStyle getOptionTextMatchStyle()
          For fields with an optionDataSource, where autoFetchDisplayMap is true, this property will govern the textMatchStyle attribute of the DSRequest parameter passed to DataSource.fetchData() when retrieving the remote data set to be used as a basis for thiis field's valueMap.
static ListGridField getOrCreateRef(JavaScriptObject jsObj)
           
 Boolean getPartialSummary()
          Only applies to fields of type "summary".
 RecordSummaryFunctionType getRecordSummaryFunction()
          Only applies to fields of type "summary".
 Boolean getRequired()
          When the user edits cells in this field, is this value required to be non-empty in order for validation to pass.
Note: for databound listGrids, this property may be specified on the DataSourceField, enabling both client and server side validation.
 Boolean getShowDefaultContextMenu()
          When set to false, this field will not show a context menu in it's header.
 Boolean getShowDisabledIcon()
          If using an icon for this button, whether to switch the icon image if the button becomes disabled.
 Boolean getShowDownIcon()
          If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.
 Boolean getShowFileInline()
          For a field of type:"imageFile", indicates whether to stream the image and display it inline or to display the View and Download icons.
 Boolean getShowFocusedIcon()
          If using an icon for this button, whether to switch the icon image when the button recieves focus.
 Boolean getShowGridSummary()
          If showGridSummary is true, should this field show a summary value.
 Boolean getShowGroupSummary()
          If showGroupSummary is true, should this field show a summary value in a summary row when the grid is grouped? If unset, this field will show a summary value in the summary row if an explicit summaryFunction is specified or if a com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction is defined for the specified field type.
 Boolean getShowHover()
          Whether to show hovers for this field.
 Boolean getShowRollOverIcon()
          If using an icon for this button, whether to switch the icon image on mouse rollover.
 Boolean getShowSelectedIcon()
          If using an icon for this button, whether to switch the icon image when the button becomes selected.
 Boolean getShowValueIconOnly()
          If this field has a valueIcons property specified, setting this property causes the valueIcon for each value to be displayed in the cell without also showing the record's value for the field.
 SortDirection getSortDirection()
          Specifies the default sorting direction for this column.
 SummaryFunctionType getSummaryFunction()
          If showGridSummary or showGroupSummary is true, this attribute can be used to specify an explicit SummaryFunction for calculating the summary value to display.
 String getSummaryTitle()
          Optional long summary title for this field, provided in addition to title.
 Boolean getSuppressValueIcon()
          If this field has a valueIcons property specified, setting this property to true will prevent the valueIcon being written out into this field's cells.
 String getTarget()
          By default, clicking a link rendered by this item opens it in a new browser window.
 String getTitle()
          A title for this field, to display in the header of the listGrid object.
 ListGridFieldType getType()
          ListGrids picks a renderer for the view and edit mode of a field based on this attribute.
 Boolean getValidateOnChange()
          If set to true, any validators for this field will be run whenever the value of the field is changed.
 String getValueField()
          Specifies the optionDataSource field used to retrieve the stored values that are to be mapped to the display values (specified by displayField).
 Integer getValueIconHeight()
          Height for value icons for this listGrid field.
 Integer getValueIconLeftPadding()
          How much padding should there be on the left of valueIcons for this field Overrides valueIconLeftPadding
 String getValueIconOrientation()
          If we're showing a valueIcon for this field should it appear to the left or the right of the text? By default the icon will appear to the left of the textual value - set this to "right" to show the icon on the right of the text.
 Integer getValueIconRightPadding()
          How much padding should there be on the right of valueIcons for this field Overrides valueIconRightPadding
 Integer getValueIconSize()
          Default width and height of value icons in this field.
 Integer getValueIconWidth()
          Width for value icons for this listGrid field.
 String getWidth()
          Return the width of the field.
 void setAlign(Alignment align)
          Horizontal alignment for field's column header: "left", "right" or "center".
 void setAutoFetchDisplayMap(Boolean autoFetchDisplayMap)
          If true, automatically fetches records and derives a valueMap from optionDataSource.
 void setBaseStyle(String baseStyle)
          Custom base style to apply to all cells in this field instead of baseStyle To override the baseStyle at the row level, use 'record[listGrid.recordBaseStyleProperty]' instead.
 void setCanEdit(Boolean canEdit)
          Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level
 void setCanExport(Boolean canExport)
          Dictates whether the data in this field be exported.
 void setCanFilter(Boolean canFilter)
          If showing a filter row for this ListGrid, should the filter criteria for this field be editable
 void setCanFreeze(Boolean canFreeze)
          Whether this field should display freezing/unfreezing options in its header context menu.
 void setCanGroupBy(Boolean canGroupBy)
          Determines whether this field will be groupable in the header context menu.
 void setCanHide(Boolean canHide)
          Whether this field can be hidden via the header context menu.
 void setCanSort(Boolean canSort)
          Enables or disables sorting by this column.
 void setCanSortClientOnly(Boolean canSortClientOnly)
          When true, this field can only be used for sorting if the data is entirely client-side.
 void setCanToggle(Boolean canToggle)
          Allows a boolean or com.smartgwt.client..ValueMap field to be edited without going into edit mode.
 void setCellAlign(Alignment cellAlign)
          Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived from align.
 void setCellFormatter(CellFormatter formatter)
          * Return the HTML to display in cells of this field.
 void setCellIcon(String cellIcon)
          For a field of type:"icon" only, set the icon that appears in body cells.
 void setDateFormatter(DateDisplayFormat dateFormatter)
          Display format to use for fields specified as type 'date'.
 void setDefaultFilterValue(Boolean defaultFilterValue)
          If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
 void setDefaultFilterValue(Date defaultFilterValue)
          If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
 void setDefaultFilterValue(Float defaultFilterValue)
          If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
 void setDefaultFilterValue(Integer defaultFilterValue)
          If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
 void setDefaultFilterValue(String defaultFilterValue)
          If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.
 void setDefaultGroupingMode(String defaultGroupingMode)
          Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and 'field.groupingMode' is unset.
 void setDefaultIconSrc(String defaultIconSrc)
          If this field is editable, this property will be passed to editors displayed for cells within this field as defaultIconSrc.
 void setDefaultValue(Boolean defaultValue)
           
 void setDefaultValue(Date defaultValue)
           
 void setDefaultValue(Float defaultValue)
           
 void setDefaultValue(Integer defaultValue)
           
 void setDefaultValue(String defaultValue)
           
 void setDisplayField(String displayField)
          Specifies the optionDataSource field used to retrieve the display values that are to be mapped from the internal values specified by valueField.
 void setEditorIconHeight(Integer editorIconHeight)
          If this field is editable, this property will be passed to editors displayed for cells within this field as iconHeight.
If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead.
 void setEditorIconWidth(Integer editorIconWidth)
          If this field is editable, this property will be passed to editors displayed for cells within this field as iconWidth.
If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead.
 void setEditorImageURLPrefix(String editorImageURLPrefix)
          When some cell in this field is being edited, this property can be used to apply an explicit imageURLPrefix to the editor in question.
 void setEditorImageURLSuffix(String editorImageURLSuffix)
          When some cell in this field is being edited, this property can be used to apply an explicit imageURLSuffix to the editor in question.
 void setEditorType(FormItem editorType)
          Name of form item type to use for the form item created to edit this field.
 void setEditorValueIconHeight(Integer editorValueIconHeight)
          When some cell in this field is being edited, setting this property will specify the height for value icons in the cell's editor.
 void setEditorValueIcons(Map<String,String> editorValueIcons)
          When some cell in this field is being edited, setting this property will specify the value icons to display in the cell's editor.
 void setEditorValueIconWidth(Integer editorValueIconWidth)
          When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's editor.
 void setEditorValueMap(Map editorValueMap)
          A valueMap to use for editors shown for this field.
 void setEditorValueMapFunction(EditorValueMapFunction editorValueMapFunction)
          This function method will be called from ListGrid.getEditorValueMap() and the resulting valueMap will be used instead of any static specified valueMap for the field.
 void setEmptyCellValue(String emptyCellValue)
          The value to display for a cell whose value is null or the empty string after applying formatCellValue and valueMap (if any).
 void setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
          What to do when a user hits enter while editing this field?
Overrides the enterKeyEditAction as specified at the listGrid level while focus is in this field.
 void setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
          What to do when a user hits escape while editing this field?
Overrides the escapeKeyEditAction as specified at the listGrid level while focus is in this field.
 void setFilterEditorType(FormItem filterEditorType)
          If this ListGrid is showing a filter row, this property can be used to specify the form item class to use for the filter form item associated with this field (Only used if this field is not canFilter:false).
 void setFilterEditorValueMap(Map filterEditorValueMap)
          If this listGrid is showing a filter row, this property can be used to specify a mapping of internal data to/from display values to be in the appropriate filter row form item.
 void setFilterOnKeypress(Boolean filterOnKeypress)
          If we're showing the filterEditor (listGrid.showFilterEditor is true), this property determines whether this list should be filtered every time the user edits the value of the filter editor for this field.
 void setFrozen(Boolean frozen)
          Whether this field should be "frozen" for the purposes of horizontal scrolling.
 void setGroupGranularity(Integer groupGranularity)
          Granularity of grouping for numeric fields.
 void setGroupingMode(String groupingMode)
          For a field that allows multiple 'grouping modes', the current grouping mode.
 void setGroupingModes(Map groupingModes)
          If set, provides several possible styles of grouping that are valid for this field.
 void setGroupPrecision(Integer groupPrecision)
          For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.
 void setGroupTitleRenderer(GroupTitleRenderer groupTitleRenderer)
          Renderer that returns the title that should be shown to the user for the group with the groupValue passed as a parameter.
 void setGroupValueFunction(GroupValueFunction groupValueFunction)
          Function that returns the value which records should be grouped by.
 void setHeaderBaseStyle(String headerBaseStyle)
          Custom base style to apply to this field's header button instead of headerBaseStyle.
Note that depending on the header button constructor, you may have to override headerTitleStyle as well.
 void setHeaderButtonProperties(Button buttonProperties)
          Set the properties of the header button used for this field.
 void setHeaderTitleStyle(String headerTitleStyle)
          Custom titleStyle to apply to this field's header button instead of headerTitleStyle.
Note that this will typically only have an effect if headerButtonConstructor is set to StretchImgButton or a subclass thereof.
 void setHidden(boolean hidden)
           
 void setHoverCustomizer(HoverCustomizer hoverCustomizer)
          * HTML to be shown in hovers over cells in the column described by this field.
 void setIcon(String icon)
          Optional icon to show next to the title for this field.
 void setIconHeight(Integer iconHeight)
          If icon is specified, this property can be used to specify the height of the icon to be displayed in the ListGrid header button.
 void setIconOrientation(String iconOrientation)
          If this field is showing an icon, should it appear to the left or right of the title?
Valid options are "left" or "right"
 void setIcons(FormItemIcon... icons)
          If this field is editable, this property can be used to specify icons to be displayed in the editors displayed for this field
 void setIconSize(Integer iconSize)
          If icon is specified, this property can be used to specify the size of the icon to be displayed in the ListGrid header button.
 void setIconSpacing(int iconSpacing)
          Pixels between icon and title text.
 void setIconVAlign(String iconVAlign)
          If this field is editable, this property will be passed to editors displayed for cells within this field as iconVAlign.
 void setIconWidth(Integer iconWidth)
          If icon is specified, this property can be used to specify the width of the icon to be displayed in the ListGrid header button.
 void setImageHeight(int imageHeight)
          Height of image shown for fieldTypes image and imageFile in this field.
 void setImageSize(int imageSize)
          Size of images shown for fieldTypes image and imageFile in this field.
 void setImageURLPrefix(String imageURLPrefix)
          If this field has type [ListGridFieldType] set to "image" and the URL for the image displayed is not absolute, the path of the URL will be relative to this string
Alternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the URL for the image.
 void setImageURLSuffix(String imageURLSuffix)
          If any cells in this field are showing a value icon (see: valueIcons) or this is has ListGridFieldType set to "image", this the value of this property will be appended to the end of the URL for the icon displayed.
Typical usage might be to append a file type such as ".gif" to the filename of the image.
For editable fields, this property will also be passed through to any editors as imageURLSuffix.
 void setImageWidth(int imageWidth)
          Width of images shown for fieldTypes image and imageFile in this field.
 void setImgDir(String imgDir)
           
 void setIncludeInRecordSummary(Boolean includeInRecordSummary)
          If a listGrid is showing a field of type summary, should this field be passed to the recordSummaryFunction when calculating the summary value to display.
 void setIsRemoveField(Boolean isRemoveField)
          If set to true and canRemoveRecords is true, this field will be rendered as the remove-field for this grid.
 void setLinkText(String linkText)
          The HTML to display in cells of this field if the fieldType is set to link.
 void setMultiple(boolean multiple)
          When using a valueMap, set multiple to true if a select list box is desired instead of a combobox when editing the cell.
 void setName(String name)
          Name of this field.
 void setOptionDataSource(DataSource optionDataSource)
          Derive a ValueMap by fetching records from another DataSource and extracting the valueField and displayField in the loaded records, to derive one valueMap entry per record loaded from the optionDataSource.
 void setOptionFilterContext(DSRequest optionFilterContext)
          If this field has an optionDataSource specified and autoFetchDisplayMap is set, this attribute provides a way to customize the dataSource request issued to fetch the display map from the option dataSource.
 void setOptionOperationId(String optionOperationId)
          If this field has an optionDataSource specified and 'autoFetchDisplayMap' is set, this attribute provides a way to customize the operationId passed to dataSource.fetchData() when retrieving the display map from the option dataSource.
 void setOptionTextMatchStyle(TextMatchStyle optionTextMatchStyle)
          For fields with an optionDataSource, where autoFetchDisplayMap is true, this property will govern the textMatchStyle attribute of the DSRequest parameter passed to DataSource.fetchData() when retrieving the remote data set to be used as a basis for thiis field's valueMap.
 void setPartialSummary(Boolean partialSummary)
          Only applies to fields of type "summary".
 void setPrompt(String prompt)
           
 void setRecordSummaryFunction(RecordSummaryFunction recordSummaryFunction)
          Only applies to fields of type "summary".
 void setRecordSummaryFunction(RecordSummaryFunctionType recordSummaryFunction)
          Only applies to fields of type "summary".
 void setRequired(Boolean required)
          When the user edits cells in this field, is this value required to be non-empty in order for validation to pass.
Note: for databound listGrids, this property may be specified on the DataSourceField, enabling both client and server side validation.
 void setShowDefaultContextMenu(Boolean showDefaultContextMenu)
          When set to false, this field will not show a context menu in it's header.
 void setShowDisabledIcon(Boolean showDisabledIcon)
          If using an icon for this button, whether to switch the icon image if the button becomes disabled.
 void setShowDownIcon(Boolean showDownIcon)
          If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.
 void setShowFileInline(Boolean showFileInline)
          For a field of type:"imageFile", indicates whether to stream the image and display it inline or to display the View and Download icons.
 void setShowFocusedIcon(Boolean showFocusedIcon)
          If using an icon for this button, whether to switch the icon image when the button recieves focus.
 void setShowGridSummary(Boolean showGridSummary)
          If showGridSummary is true, should this field show a summary value.
 void setShowGroupSummary(Boolean showGroupSummary)
          If showGroupSummary is true, should this field show a summary value in a summary row when the grid is grouped? If unset, this field will show a summary value in the summary row if an explicit summaryFunction is specified or if a com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction is defined for the specified field type.
 void setShowHover(Boolean showHover)
          Whether to show hovers for this field.
 void setShowIfCondition(ListGridFieldIfFunction showIf)
          A function, if provided, is evaluated to conditionally determine whether this field should be displayed.
 void setShowRollOverIcon(Boolean showRollOverIcon)
          If using an icon for this button, whether to switch the icon image on mouse rollover.
 void setShowSelectedIcon(Boolean showSelectedIcon)
          If using an icon for this button, whether to switch the icon image when the button becomes selected.
 void setShowValueIconOnly(Boolean showValueIconOnly)
          If this field has a valueIcons property specified, setting this property causes the valueIcon for each value to be displayed in the cell without also showing the record's value for the field.
 void setSortDirection(SortDirection sortDirection)
          Specifies the default sorting direction for this column.
 void setSortNormalizer(SortNormalizer normalizer)
          Optional function to return the value that should be used when sorting this field.
 void setSummaryFunction(SummaryFunction summaryFunction)
          If showGridSummary or showGroupSummary is true, this attribute can be used to specify an explicit SummaryFunction for calculating the summary value to display.
 void setSummaryFunction(SummaryFunctionType summaryFunction)
          If showGridSummary or showGroupSummary is true, this attribute can be used to specify an explicit SummaryFunction for calculating the summary value to display.
 void setSummaryTitle(String summaryTitle)
          Optional long summary title for this field, provided in addition to title.
 void setSuppressValueIcon(Boolean suppressValueIcon)
          If this field has a valueIcons property specified, setting this property to true will prevent the valueIcon being written out into this field's cells.
 void setTarget(String target)
          By default, clicking a link rendered by this item opens it in a new browser window.
 void setTitle(String title)
          A title for this field, to display in the header of the listGrid object.
 void setType(ListGridFieldType type)
          ListGrids picks a renderer for the view and edit mode of a field based on this attribute.
 void setValidateOnChange(Boolean validateOnChange)
          If set to true, any validators for this field will be run whenever the value of the field is changed.
 void setValidators(Validator... validators)
          Array of Validator objects for this field.
 void setValueField(String valueField)
          Specifies the optionDataSource field used to retrieve the stored values that are to be mapped to the display values (specified by displayField).
 void setValueIconHeight(Integer valueIconHeight)
          Height for value icons for this listGrid field.
 void setValueIconLeftPadding(Integer valueIconLeftPadding)
          How much padding should there be on the left of valueIcons for this field Overrides valueIconLeftPadding
 void setValueIconOrientation(String valueIconOrientation)
          If we're showing a valueIcon for this field should it appear to the left or the right of the text? By default the icon will appear to the left of the textual value - set this to "right" to show the icon on the right of the text.
 void setValueIconRightPadding(Integer valueIconRightPadding)
          How much padding should there be on the right of valueIcons for this field Overrides valueIconRightPadding
 void setValueIcons(Map<String,String> valueIcons)
          This property is a mapping between data values and URLs of icons to display.
 void setValueIconSize(Integer valueIconSize)
          Default width and height of value icons in this field.
 void setValueIconWidth(Integer valueIconWidth)
          Width for value icons for this listGrid field.
 void setValueMap(Map valueMap)
          Array of legal values for this field, or an Object where each property maps a stored value to a user-displayable value.
Note that if this field is editable (see canEdit, canEdit), editors displayed for this field will pick up their valueMap either from this value or from editorValueMap.
 void setValueMap(String... valueMap)
          Array of legal values for this field, or an Object where each property maps a stored value to a user-displayable value.
Note that if this field is editable (see canEdit, canEdit), editors displayed for this field will pick up their valueMap either from this value or from editorValueMap.
 void setWidth(int width)
          The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space, or "*" to allocate an equal portion of the remaining space.
 void setWidth(String width)
          The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space, or "*" to allocate an equal portion of the remaining space.
 void setWrap(boolean wrap)
          Control the list grid fields header wrap properties
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

ListGridField

public ListGridField()

ListGridField

public ListGridField(JavaScriptObject jsObj)

ListGridField

public ListGridField(String name)

ListGridField

public ListGridField(String name,
                     int width)

ListGridField

public ListGridField(String name,
                     String title)

ListGridField

public ListGridField(String name,
                     String title,
                     int width)
Method Detail

getOrCreateRef

public static ListGridField getOrCreateRef(JavaScriptObject jsObj)

setGroupingMode

public void setGroupingMode(String groupingMode)
For a field that allows multiple 'grouping modes', the current grouping mode.

This property is set when a user chooses a particular grouping mode, and may be set on ListGrid creation to affect the initial grouping.

Parameters:
groupingMode - groupingMode Default value is null

getGroupingMode

public String getGroupingMode()
For a field that allows multiple 'grouping modes', the current grouping mode.

This property is set when a user chooses a particular grouping mode, and may be set on ListGrid creation to affect the initial grouping.

Returns:
String

setDefaultGroupingMode

public void setDefaultGroupingMode(String defaultGroupingMode)
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and 'field.groupingMode' is unset. See 'field.groupingModes'.

Parameters:
defaultGroupingMode - defaultGroupingMode Default value is null

getDefaultGroupingMode

public String getDefaultGroupingMode()
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and 'field.groupingMode' is unset. See 'field.groupingModes'.

Returns:
String

setGroupPrecision

public void setGroupPrecision(Integer groupPrecision)
For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.

For example, groupPrecision:2 indicates that 45.238 and 45.231 group together, but 45.22 and 45.27 are separate.

See also 'groupGranularity' for grouping by broader ranges.

Parameters:
groupPrecision - groupPrecision Default value is null

getGroupPrecision

public Integer getGroupPrecision()
For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.

For example, groupPrecision:2 indicates that 45.238 and 45.231 group together, but 45.22 and 45.27 are separate.

See also 'groupGranularity' for grouping by broader ranges.

Returns:
Integer

setGroupGranularity

public void setGroupGranularity(Integer groupGranularity)
Granularity of grouping for numeric fields.

Groups will be formed based on ranges of values of size groupGranularity. For example, if groupGranularity were 1000, groups would be 0-1000, 1000-2000, etc.

Parameters:
groupGranularity - groupGranularity Default value is null

getGroupGranularity

public Integer getGroupGranularity()
Granularity of grouping for numeric fields.

Groups will be formed based on ranges of values of size groupGranularity. For example, if groupGranularity were 1000, groups would be 0-1000, 1000-2000, etc.

Returns:
Integer

setCanGroupBy

public void setCanGroupBy(Boolean canGroupBy)
Determines whether this field will be groupable in the header context menu.

Parameters:
canGroupBy - canGroupBy Default value is true

getCanGroupBy

public Boolean getCanGroupBy()
Determines whether this field will be groupable in the header context menu.

Returns:
Boolean

setCanSortClientOnly

public void setCanSortClientOnly(Boolean canSortClientOnly)
When true, this field can only be used for sorting if the data is entirely client-side.

Parameters:
canSortClientOnly - canSortClientOnly Default value is false

getCanSortClientOnly

public Boolean getCanSortClientOnly()
When true, this field can only be used for sorting if the data is entirely client-side.

Returns:
Boolean

setShowDefaultContextMenu

public void setShowDefaultContextMenu(Boolean showDefaultContextMenu)
When set to false, this field will not show a context menu in it's header.

Parameters:
showDefaultContextMenu - showDefaultContextMenu Default value is true

getShowDefaultContextMenu

public Boolean getShowDefaultContextMenu()
When set to false, this field will not show a context menu in it's header.

Returns:
Boolean

setCanExport

public void setCanExport(Boolean canExport)
Dictates whether the data in this field be exported. Explicitly set this to false to prevent exporting. Has no effect if the underlying 'dataSourceField' is explicitly set to canExport: false.

Parameters:
canExport - canExport Default value is null

getCanExport

public Boolean getCanExport()
Dictates whether the data in this field be exported. Explicitly set this to false to prevent exporting. Has no effect if the underlying 'dataSourceField' is explicitly set to canExport: false.

Returns:
Boolean

setValueIconSize

public void setValueIconSize(Integer valueIconSize)
Default width and height of value icons in this field. Takes precidence over valueIconWidth, valueIconHeight and valueIconSize specified at the ListGrid level. Can be overridden via valueIconWidth and {ListGridField.valueIconHeight}

Parameters:
valueIconSize - valueIconSize Default value is null

getValueIconSize

public Integer getValueIconSize()
Default width and height of value icons in this field. Takes precidence over valueIconWidth, valueIconHeight and valueIconSize specified at the ListGrid level. Can be overridden via valueIconWidth and {ListGridField.valueIconHeight}

Returns:
Integer

setValueIconWidth

public void setValueIconWidth(Integer valueIconWidth)
Width for value icons for this listGrid field. Overrides valueIconSize, valueIconWidth, and valueIconSize.

Parameters:
valueIconWidth - valueIconWidth Default value is null

getValueIconWidth

public Integer getValueIconWidth()
Width for value icons for this listGrid field. Overrides valueIconSize, valueIconWidth, and valueIconSize.

Returns:
Integer

setValueIconHeight

public void setValueIconHeight(Integer valueIconHeight)
Height for value icons for this listGrid field. Overrides valueIconSize, valueIconHeight, and valueIconSize.

Parameters:
valueIconHeight - valueIconHeight Default value is null

getValueIconHeight

public Integer getValueIconHeight()
Height for value icons for this listGrid field. Overrides valueIconSize, valueIconHeight, and valueIconSize.

Returns:
Integer

setValueIconLeftPadding

public void setValueIconLeftPadding(Integer valueIconLeftPadding)
How much padding should there be on the left of valueIcons for this field Overrides valueIconLeftPadding

Parameters:
valueIconLeftPadding - valueIconLeftPadding Default value is null

getValueIconLeftPadding

public Integer getValueIconLeftPadding()
How much padding should there be on the left of valueIcons for this field Overrides valueIconLeftPadding

Returns:
Integer

setValueIconRightPadding

public void setValueIconRightPadding(Integer valueIconRightPadding)
How much padding should there be on the right of valueIcons for this field Overrides valueIconRightPadding

Parameters:
valueIconRightPadding - valueIconRightPadding Default value is null

getValueIconRightPadding

public Integer getValueIconRightPadding()
How much padding should there be on the right of valueIcons for this field Overrides valueIconRightPadding

Returns:
Integer

setEditorValueIconWidth

public void setEditorValueIconWidth(Integer editorValueIconWidth)
When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's editor. If unset, the editor's valueIcon width and height will be determined in the same way as it would be for a static cell.

Parameters:
editorValueIconWidth - editorValueIconWidth Default value is null

getEditorValueIconWidth

public Integer getEditorValueIconWidth()
When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's editor. If unset, the editor's valueIcon width and height will be determined in the same way as it would be for a static cell.

Returns:
Integer

setEditorValueIconHeight

public void setEditorValueIconHeight(Integer editorValueIconHeight)
When some cell in this field is being edited, setting this property will specify the height for value icons in the cell's editor. If unset, the editor's valueIcon width and height will be determined in the same way as it would be for a static cell.

Parameters:
editorValueIconHeight - editorValueIconHeight Default value is null

getEditorValueIconHeight

public Integer getEditorValueIconHeight()
When some cell in this field is being edited, setting this property will specify the height for value icons in the cell's editor. If unset, the editor's valueIcon width and height will be determined in the same way as it would be for a static cell.

Returns:
Integer

setShowValueIconOnly

public void setShowValueIconOnly(Boolean showValueIconOnly)
If this field has a valueIcons property specified, setting this property causes the valueIcon for each value to be displayed in the cell without also showing the record's value for the field.

If unset the default behavior is to show the icon only if an explicit valueMap is specified as well in addition to a valueIcons map, otherwise show both the valueIcon and value for the cell.

Note that if this field is editable showValueIconOnly will be passed through to editors displayed in this field.

Parameters:
showValueIconOnly - showValueIconOnly Default value is null

getShowValueIconOnly

public Boolean getShowValueIconOnly()
If this field has a valueIcons property specified, setting this property causes the valueIcon for each value to be displayed in the cell without also showing the record's value for the field.

If unset the default behavior is to show the icon only if an explicit valueMap is specified as well in addition to a valueIcons map, otherwise show both the valueIcon and value for the cell.

Note that if this field is editable showValueIconOnly will be passed through to editors displayed in this field.

Returns:
Boolean

setSuppressValueIcon

public void setSuppressValueIcon(Boolean suppressValueIcon)
If this field has a valueIcons property specified, setting this property to true will prevent the valueIcon being written out into this field's cells.

Parameters:
suppressValueIcon - suppressValueIcon Default value is null

getSuppressValueIcon

public Boolean getSuppressValueIcon()
If this field has a valueIcons property specified, setting this property to true will prevent the valueIcon being written out into this field's cells.

Returns:
Boolean

setValueIconOrientation

public void setValueIconOrientation(String valueIconOrientation)
If we're showing a valueIcon for this field should it appear to the left or the right of the text? By default the icon will appear to the left of the textual value - set this to "right" to show the icon on the right of the text. Has no effect if showValueIconOnly is true

Parameters:
valueIconOrientation - valueIconOrientation Default value is null

getValueIconOrientation

public String getValueIconOrientation()
If we're showing a valueIcon for this field should it appear to the left or the right of the text? By default the icon will appear to the left of the textual value - set this to "right" to show the icon on the right of the text. Has no effect if showValueIconOnly is true

Returns:
String

setImageURLPrefix

public void setImageURLPrefix(String imageURLPrefix)
If this field has type [ListGridFieldType] set to "image" and the URL for the image displayed is not absolute, the path of the URL will be relative to this string
Alternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the URL for the image.

Note : This is an advanced setting

Parameters:
imageURLPrefix - imageURLPrefix Default value is null

getImageURLPrefix

public String getImageURLPrefix()
If this field has type [ListGridFieldType] set to "image" and the URL for the image displayed is not absolute, the path of the URL will be relative to this string
Alternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the URL for the image.

Returns:
String

setImageURLSuffix

public void setImageURLSuffix(String imageURLSuffix)
If any cells in this field are showing a value icon (see: valueIcons) or this is has ListGridFieldType set to "image", this the value of this property will be appended to the end of the URL for the icon displayed.
Typical usage might be to append a file type such as ".gif" to the filename of the image.
For editable fields, this property will also be passed through to any editors as imageURLSuffix.

Note : This is an advanced setting

Parameters:
imageURLSuffix - imageURLSuffix Default value is null

getImageURLSuffix

public String getImageURLSuffix()
If any cells in this field are showing a value icon (see: valueIcons) or this is has ListGridFieldType set to "image", this the value of this property will be appended to the end of the URL for the icon displayed.
Typical usage might be to append a file type such as ".gif" to the filename of the image.
For editable fields, this property will also be passed through to any editors as imageURLSuffix.

Returns:
String

setEditorImageURLPrefix

public void setEditorImageURLPrefix(String editorImageURLPrefix)
When some cell in this field is being edited, this property can be used to apply an explicit imageURLPrefix to the editor in question. This can be used to modify the valueIcons within the editor.
If unset, but imageURLPrefix is specified, that will be used instead.

Note : This is an advanced setting

Parameters:
editorImageURLPrefix - editorImageURLPrefix Default value is null

getEditorImageURLPrefix

public String getEditorImageURLPrefix()
When some cell in this field is being edited, this property can be used to apply an explicit imageURLPrefix to the editor in question. This can be used to modify the valueIcons within the editor.
If unset, but imageURLPrefix is specified, that will be used instead.

Returns:
String

setEditorImageURLSuffix

public void setEditorImageURLSuffix(String editorImageURLSuffix)
When some cell in this field is being edited, this property can be used to apply an explicit imageURLSuffix to the editor in question. This can be used to modify the valueIcons within the editor.
If unset, but imageURLPrefix is specified, that will be used instead.

Note : This is an advanced setting

Parameters:
editorImageURLSuffix - editorImageURLSuffix Default value is null

getEditorImageURLSuffix

public String getEditorImageURLSuffix()
When some cell in this field is being edited, this property can be used to apply an explicit imageURLSuffix to the editor in question. This can be used to modify the valueIcons within the editor.
If unset, but imageURLPrefix is specified, that will be used instead.

Returns:
String

setImageSize

public void setImageSize(int imageSize)
Size of images shown for fieldTypes image and imageFile in this field. This setting overrides the global ListGrid default imageSize.

If set to a String, assumed to be a property on each record that specifies the image height. For example, if field.imageSize is "logoSize", record.logoSize will control the size of the image.

Parameters:
imageSize - imageSize Default value is 16

getImageSize

public int getImageSize()
Size of images shown for fieldTypes image and imageFile in this field. This setting overrides the global ListGrid default imageSize.

If set to a String, assumed to be a property on each record that specifies the image height. For example, if field.imageSize is "logoSize", record.logoSize will control the size of the image.

Returns:
int

setImageWidth

public void setImageWidth(int imageWidth)
Width of images shown for fieldTypes image and imageFile in this field.

If set to a String, assumed to be a property on each record that specifies the image width. For example, if field.imageWidth is "logoWidth", record.logoWidth will control the width of the image.

Parameters:
imageWidth - imageWidth Default value is 16

getImageWidth

public int getImageWidth()
Width of images shown for fieldTypes image and imageFile in this field.

If set to a String, assumed to be a property on each record that specifies the image width. For example, if field.imageWidth is "logoWidth", record.logoWidth will control the width of the image.

Returns:
int

setImageHeight

public void setImageHeight(int imageHeight)
Height of image shown for fieldTypes image and imageFile in this field.

If set to a String, assumed to be a property on each record that specifies the image height. For example, if field.imageHeight is "logoHeight", record.logoHeight will control the heigt of the image.

Parameters:
imageHeight - imageHeight Default value is 16

getImageHeight

public int getImageHeight()
Height of image shown for fieldTypes image and imageFile in this field.

If set to a String, assumed to be a property on each record that specifies the image height. For example, if field.imageHeight is "logoHeight", record.logoHeight will control the heigt of the image.

Returns:
int

setType

public void setType(ListGridFieldType type)
ListGrids picks a renderer for the view and edit mode of a field based on this attribute.

Parameters:
type - type Default value is "text"

getType

public ListGridFieldType getType()
ListGrids picks a renderer for the view and edit mode of a field based on this attribute.

Returns:
ListGridFieldType

setName

public void setName(String name)
Name of this field. Must be unique within this ListGrid.

The name of field is also the property in each record which holds the value for that field.

If a dataSource is specified and the DataSource has a field with the same name, the ListGridField and DataSourceField are merged so that properties on the ListGridField

Parameters:
name - name Default value is null

getName

public String getName()
Name of this field. Must be unique within this ListGrid.

The name of field is also the property in each record which holds the value for that field.

If a dataSource is specified and the DataSource has a field with the same name, the ListGridField and DataSourceField are merged so that properties on the ListGridField

Returns:
String

setTitle

public void setTitle(String title)
A title for this field, to display in the header of the listGrid object. Alternately you can specify a getFieldTitle(com.smartgwt.client.widgets.grid.ListGrid, int) method on the field to return the HTML for the field title.

Parameters:
title - title Default value is null

getTitle

public String getTitle()
A title for this field, to display in the header of the listGrid object. Alternately you can specify a getFieldTitle(com.smartgwt.client.widgets.grid.ListGrid, int) method on the field to return the HTML for the field title.

Returns:
String

setTarget

public void setTarget(String target)
By default, clicking a link rendered by this item opens it in a new browser window. You can alter this behavior by setting this property. The value of this property will be passed as the value to the target attribute of the anchor tag used to render the link.

If you set listGridField.target to "javascript", the default behaviour is to catch and consume mouse-clicks that would result in the link being followed. Instead, the ListGrid.addCellClickHandler(com.smartgwt.client.widgets.grid.events.CellClickHandler) event is fired for the containing cell.

Parameters:
target - target Default value is "_blank"

getTarget

public String getTarget()
By default, clicking a link rendered by this item opens it in a new browser window. You can alter this behavior by setting this property. The value of this property will be passed as the value to the target attribute of the anchor tag used to render the link.

If you set listGridField.target to "javascript", the default behaviour is to catch and consume mouse-clicks that would result in the link being followed. Instead, the ListGrid.addCellClickHandler(com.smartgwt.client.widgets.grid.events.CellClickHandler) event is fired for the containing cell.

Returns:
String

setFrozen

public void setFrozen(Boolean frozen)
Whether this field should be "frozen" for the purposes of horizontal scrolling. See FrozenFields.

Parameters:
frozen - frozen Default value is null

getFrozen

public Boolean getFrozen()
Whether this field should be "frozen" for the purposes of horizontal scrolling. See FrozenFields.

Returns:
Boolean

setCanFreeze

public void setCanFreeze(Boolean canFreeze)
Whether this field should display freezing/unfreezing options in its header context menu. See FrozenFields.

Parameters:
canFreeze - canFreeze Default value is null

getCanFreeze

public Boolean getCanFreeze()
Whether this field should display freezing/unfreezing options in its header context menu. See FrozenFields.

Returns:
Boolean

setCanHide

public void setCanHide(Boolean canHide)
Whether this field can be hidden via the header context menu.

Parameters:
canHide - canHide Default value is null

getCanHide

public Boolean getCanHide()
Whether this field can be hidden via the header context menu.

Returns:
Boolean

setShowGridSummary

public void setShowGridSummary(Boolean showGridSummary)
If showGridSummary is true, should this field show a summary value. If unset, this field will show a summary value in the summary row if an explicit summaryFunction is specified or if a com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction is defined for the specified field type.

Parameters:
showGridSummary - showGridSummary Default value is null

getShowGridSummary

public Boolean getShowGridSummary()
If showGridSummary is true, should this field show a summary value. If unset, this field will show a summary value in the summary row if an explicit summaryFunction is specified or if a com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction is defined for the specified field type.

Returns:
Boolean

setShowGroupSummary

public void setShowGroupSummary(Boolean showGroupSummary)
If showGroupSummary is true, should this field show a summary value in a summary row when the grid is grouped? If unset, this field will show a summary value in the summary row if an explicit summaryFunction is specified or if a com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction is defined for the specified field type.

Parameters:
showGroupSummary - showGroupSummary Default value is null

getShowGroupSummary

public Boolean getShowGroupSummary()
If showGroupSummary is true, should this field show a summary value in a summary row when the grid is grouped? If unset, this field will show a summary value in the summary row if an explicit summaryFunction is specified or if a com.smartgwt.client.data.SimpleType#getDefaultSummaryFunction is defined for the specified field type.

Returns:
Boolean

setPartialSummary

public void setPartialSummary(Boolean partialSummary)
Only applies to fields of type "summary". This attribute is set on a summary field, when calculating the summary value from some record, the summary function will only be passed the fields before this summary field. This may be useful for displaying running totals across a record.

Note that this feature would typically be used with 'canReorderFields:false'

Parameters:
partialSummary - partialSummary Default value is null

getPartialSummary

public Boolean getPartialSummary()
Only applies to fields of type "summary". This attribute is set on a summary field, when calculating the summary value from some record, the summary function will only be passed the fields before this summary field. This may be useful for displaying running totals across a record.

Note that this feature would typically be used with 'canReorderFields:false'

Returns:
Boolean

setIncludeInRecordSummary

public void setIncludeInRecordSummary(Boolean includeInRecordSummary)
If a listGrid is showing a field of type summary, should this field be passed to the recordSummaryFunction when calculating the summary value to display. If unset, fields are included if they are of type "integer" or "float" only (since most summary functions perform numeric calculations). See also includeInRecordSummaryFields.

Parameters:
includeInRecordSummary - includeInRecordSummary Default value is null

getIncludeInRecordSummary

public Boolean getIncludeInRecordSummary()
If a listGrid is showing a field of type summary, should this field be passed to the recordSummaryFunction when calculating the summary value to display. If unset, fields are included if they are of type "integer" or "float" only (since most summary functions perform numeric calculations). See also includeInRecordSummaryFields.

Returns:
Boolean

setIcon

public void setIcon(String icon)
Optional icon to show next to the title for this field. Should be set to a URL to an image. Relative paths will be evaluated starting at the imgDir of this component. This URL is partial - it may be updated to indicate the current disabled (etc) state of the field.

If 'field.type' is set to "icon", this icon will also be shown in every cell of this field - see also 'field.cellIcon'.

Parameters:
icon - icon Default value is null

getIcon

public String getIcon()
Optional icon to show next to the title for this field. Should be set to a URL to an image. Relative paths will be evaluated starting at the imgDir of this component. This URL is partial - it may be updated to indicate the current disabled (etc) state of the field.

If 'field.type' is set to "icon", this icon will also be shown in every cell of this field - see also 'field.cellIcon'.

Returns:
String

setIconSize

public void setIconSize(Integer iconSize)
If icon is specified, this property can be used to specify the size of the icon to be displayed in the ListGrid header button. (See iconSize)

Parameters:
iconSize - iconSize Default value is null

getIconSize

public Integer getIconSize()
If icon is specified, this property can be used to specify the size of the icon to be displayed in the ListGrid header button. (See iconSize)

Returns:
Integer

setIconWidth

public void setIconWidth(Integer iconWidth)
If icon is specified, this property can be used to specify the width of the icon to be displayed in the ListGrid header button. (See iconWidth)
If this field is editable, and editorIconWidth is unset, this property will be passed onto the editors for this field as iconWidth, which will effect the default size for 'icons' displayed in the editor.

Parameters:
iconWidth - iconWidth Default value is null

getIconWidth

public Integer getIconWidth()
If icon is specified, this property can be used to specify the width of the icon to be displayed in the ListGrid header button. (See iconWidth)
If this field is editable, and editorIconWidth is unset, this property will be passed onto the editors for this field as iconWidth, which will effect the default size for 'icons' displayed in the editor.

Returns:
Integer

setIconHeight

public void setIconHeight(Integer iconHeight)
If icon is specified, this property can be used to specify the height of the icon to be displayed in the ListGrid header button. (See iconHeight)
If this field is editable, and editorIconHeight is unset, this property will be passed onto the editors for this field as iconWidth, which will effect the default size for 'icons' displayed in the editor.

Parameters:
iconHeight - iconHeight Default value is null

getIconHeight

public Integer getIconHeight()
If icon is specified, this property can be used to specify the height of the icon to be displayed in the ListGrid header button. (See iconHeight)
If this field is editable, and editorIconHeight is unset, this property will be passed onto the editors for this field as iconWidth, which will effect the default size for 'icons' displayed in the editor.

Returns:
Integer

setIconOrientation

public void setIconOrientation(String iconOrientation)
If this field is showing an icon, should it appear to the left or right of the title?
Valid options are "left" or "right"

Parameters:
iconOrientation - iconOrientation Default value is "left"

getIconOrientation

public String getIconOrientation()
If this field is showing an icon, should it appear to the left or right of the title?
Valid options are "left" or "right"

Returns:
String

setIconSpacing

public void setIconSpacing(int iconSpacing)
Pixels between icon and title text.

Parameters:
iconSpacing - iconSpacing Default value is 6

getIconSpacing

public int getIconSpacing()
Pixels between icon and title text.

Returns:
int

setShowDisabledIcon

public void setShowDisabledIcon(Boolean showDisabledIcon)
If using an icon for this button, whether to switch the icon image if the button becomes disabled.

Parameters:
showDisabledIcon - showDisabledIcon Default value is true

getShowDisabledIcon

public Boolean getShowDisabledIcon()
If using an icon for this button, whether to switch the icon image if the button becomes disabled.

Returns:
Boolean

setShowRollOverIcon

public void setShowRollOverIcon(Boolean showRollOverIcon)
If using an icon for this button, whether to switch the icon image on mouse rollover.

Parameters:
showRollOverIcon - showRollOverIcon Default value is false

getShowRollOverIcon

public Boolean getShowRollOverIcon()
If using an icon for this button, whether to switch the icon image on mouse rollover.

Returns:
Boolean

setShowFocusedIcon

public void setShowFocusedIcon(Boolean showFocusedIcon)
If using an icon for this button, whether to switch the icon image when the button recieves focus.

If showFocusedAsOver is true, the "Over" icon will be displayed when the canvas has focus, otherwise a seperate "Focused" icon will be displayed

Parameters:
showFocusedIcon - showFocusedIcon Default value is false

getShowFocusedIcon

public Boolean getShowFocusedIcon()
If using an icon for this button, whether to switch the icon image when the button recieves focus.

If showFocusedAsOver is true, the "Over" icon will be displayed when the canvas has focus, otherwise a seperate "Focused" icon will be displayed

Returns:
Boolean

setShowDownIcon

public void setShowDownIcon(Boolean showDownIcon)
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.

Parameters:
showDownIcon - showDownIcon Default value is false

getShowDownIcon

public Boolean getShowDownIcon()
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.

Returns:
Boolean

setShowSelectedIcon

public void setShowSelectedIcon(Boolean showSelectedIcon)
If using an icon for this button, whether to switch the icon image when the button becomes selected.

Parameters:
showSelectedIcon - showSelectedIcon Default value is false

getShowSelectedIcon

public Boolean getShowSelectedIcon()
If using an icon for this button, whether to switch the icon image when the button becomes selected.

Returns:
Boolean

setCellIcon

public void setCellIcon(String cellIcon)
For a field of type:"icon" only, set the icon that appears in body cells. Unless setting 'field.icon', setting field.cellIcon will not show an icon in the header.

Parameters:
cellIcon - cellIcon Default value is null

getCellIcon

public String getCellIcon()
For a field of type:"icon" only, set the icon that appears in body cells. Unless setting 'field.icon', setting field.cellIcon will not show an icon in the header.

Returns:
String

setShowFileInline

public void setShowFileInline(Boolean showFileInline)
For a field of type:"imageFile", indicates whether to stream the image and display it inline or to display the View and Download icons.

Parameters:
showFileInline - showFileInline Default value is null

getShowFileInline

public Boolean getShowFileInline()
For a field of type:"imageFile", indicates whether to stream the image and display it inline or to display the View and Download icons.

Returns:
Boolean

setEditorIconWidth

public void setEditorIconWidth(Integer editorIconWidth)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconWidth.
If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead.

Note : This is an advanced setting

Parameters:
editorIconWidth - editorIconWidth Default value is null

getEditorIconWidth

public Integer getEditorIconWidth()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconWidth.
If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead.

Returns:
Integer

setEditorIconHeight

public void setEditorIconHeight(Integer editorIconHeight)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconHeight.
If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead.

Note : This is an advanced setting

Parameters:
editorIconHeight - editorIconHeight Default value is null

getEditorIconHeight

public Integer getEditorIconHeight()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconHeight.
If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead.

Returns:
Integer

setDefaultIconSrc

public void setDefaultIconSrc(String defaultIconSrc)
If this field is editable, this property will be passed to editors displayed for cells within this field as defaultIconSrc.

Note : This is an advanced setting

Parameters:
defaultIconSrc - defaultIconSrc Default value is null

getDefaultIconSrc

public String getDefaultIconSrc()
If this field is editable, this property will be passed to editors displayed for cells within this field as defaultIconSrc.

Returns:
String

setIconVAlign

public void setIconVAlign(String iconVAlign)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconVAlign.

Note : This is an advanced setting

Parameters:
iconVAlign - iconVAlign Default value is null

getIconVAlign

public String getIconVAlign()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconVAlign.

Returns:
String

setSummaryTitle

public void setSummaryTitle(String summaryTitle)
Optional long summary title for this field, provided in addition to title. This gives the developer an option to use a very short, or empty title for the ListGrid column (where space may be a factor), but have a longer value available to be used elsewhere.
By default this value will be used for the title of the context-menu item for showing/hiding the listGrid field when the user right-clicks on the ListGrid header.

Note : This is an advanced setting

Parameters:
summaryTitle - summaryTitle Default value is null

getSummaryTitle

public String getSummaryTitle()
Optional long summary title for this field, provided in addition to title. This gives the developer an option to use a very short, or empty title for the ListGrid column (where space may be a factor), but have a longer value available to be used elsewhere.
By default this value will be used for the title of the context-menu item for showing/hiding the listGrid field when the user right-clicks on the ListGrid header.

Returns:
Optional string method to return a long summary title for this field, if a dynamic summary title is required for this field.

setHeaderBaseStyle

public void setHeaderBaseStyle(String headerBaseStyle)
Custom base style to apply to this field's header button instead of headerBaseStyle.
Note that depending on the header button constructor, you may have to override headerTitleStyle as well.

Parameters:
headerBaseStyle - headerBaseStyle Default value is null

getHeaderBaseStyle

public String getHeaderBaseStyle()
Custom base style to apply to this field's header button instead of headerBaseStyle.
Note that depending on the header button constructor, you may have to override headerTitleStyle as well.

Returns:
String

setHeaderTitleStyle

public void setHeaderTitleStyle(String headerTitleStyle)
Custom titleStyle to apply to this field's header button instead of headerTitleStyle.
Note that this will typically only have an effect if headerButtonConstructor is set to StretchImgButton or a subclass thereof.

Parameters:
headerTitleStyle - headerTitleStyle Default value is null

getHeaderTitleStyle

public String getHeaderTitleStyle()
Custom titleStyle to apply to this field's header button instead of headerTitleStyle.
Note that this will typically only have an effect if headerButtonConstructor is set to StretchImgButton or a subclass thereof.

Returns:
String

setCellAlign

public void setCellAlign(Alignment cellAlign)
Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived from align. If this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.

Parameters:
cellAlign - cellAlign Default value is null

getCellAlign

public Alignment getCellAlign()
Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived from align. If this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.

Returns:
Alignment

setBaseStyle

public void setBaseStyle(String baseStyle)
Custom base style to apply to all cells in this field instead of baseStyle To override the baseStyle at the row level, use 'record[listGrid.recordBaseStyleProperty]' instead.

Parameters:
baseStyle - baseStyle Default value is null

getBaseStyle

public String getBaseStyle()
Custom base style to apply to all cells in this field instead of baseStyle To override the baseStyle at the row level, use 'record[listGrid.recordBaseStyleProperty]' instead.

Returns:
String

setCanSort

public void setCanSort(Boolean canSort)
Enables or disables sorting by this column. If false, neither interactive nor scripted (via the sort() method) instructions will sort the listGrid by this column.

Parameters:
canSort - canSort Default value is true

getCanSort

public Boolean getCanSort()
Enables or disables sorting by this column. If false, neither interactive nor scripted (via the sort() method) instructions will sort the listGrid by this column.

Returns:
Boolean

setCanEdit

public void setCanEdit(Boolean canEdit)
Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level

Parameters:
canEdit - canEdit Default value is null

getCanEdit

public Boolean getCanEdit()
Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level

Returns:
Boolean

setEnterKeyEditAction

public void setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
What to do when a user hits enter while editing this field?
Overrides the enterKeyEditAction as specified at the listGrid level while focus is in this field.

Parameters:
enterKeyEditAction - enterKeyEditAction Default value is "done"

getEnterKeyEditAction

public EnterKeyEditAction getEnterKeyEditAction()
What to do when a user hits enter while editing this field?
Overrides the enterKeyEditAction as specified at the listGrid level while focus is in this field.

Returns:
EnterKeyEditAction

setEscapeKeyEditAction

public void setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
What to do when a user hits escape while editing this field?
Overrides the escapeKeyEditAction as specified at the listGrid level while focus is in this field.

Parameters:
escapeKeyEditAction - escapeKeyEditAction Default value is "cancel"

getEscapeKeyEditAction

public EscapeKeyEditAction getEscapeKeyEditAction()
What to do when a user hits escape while editing this field?
Overrides the escapeKeyEditAction as specified at the listGrid level while focus is in this field.

Returns:
EscapeKeyEditAction

setValidateOnChange

public void setValidateOnChange(Boolean validateOnChange)
If set to true, any validators for this field will be run whenever the value of the field is changed.

Analgous to the validateOnChange property.

Parameters:
validateOnChange - validateOnChange Default value is null

getValidateOnChange

public Boolean getValidateOnChange()
If set to true, any validators for this field will be run whenever the value of the field is changed.

Analgous to the validateOnChange property.

Returns:
Boolean

setRequired

public void setRequired(Boolean required)
When the user edits cells in this field, is this value required to be non-empty in order for validation to pass.
Note: for databound listGrids, this property may be specified on the DataSourceField, enabling both client and server side validation.

Parameters:
required - required Default value is null

getRequired

public Boolean getRequired()
When the user edits cells in this field, is this value required to be non-empty in order for validation to pass.
Note: for databound listGrids, this property may be specified on the DataSourceField, enabling both client and server side validation.

Returns:
Boolean

setIsRemoveField

public void setIsRemoveField(Boolean isRemoveField)
If set to true and canRemoveRecords is true, this field will be rendered as the remove-field for this grid. In most common usage scenarios this field will essentially be a placeholder indicating where the remove field should be rendered, meaning properties other than isRemoveField, such as name or title, may be left unset.

Note : This is an advanced setting

Parameters:
isRemoveField - isRemoveField Default value is null

getIsRemoveField

public Boolean getIsRemoveField()
If set to true and canRemoveRecords is true, this field will be rendered as the remove-field for this grid. In most common usage scenarios this field will essentially be a placeholder indicating where the remove field should be rendered, meaning properties other than isRemoveField, such as name or title, may be left unset.

Returns:
Boolean

setCanFilter

public void setCanFilter(Boolean canFilter)
If showing a filter row for this ListGrid, should the filter criteria for this field be editable

Parameters:
canFilter - canFilter Default value is null

getCanFilter

public Boolean getCanFilter()
If showing a filter row for this ListGrid, should the filter criteria for this field be editable

Returns:
Boolean

setFilterOnKeypress

public void setFilterOnKeypress(Boolean filterOnKeypress)
If we're showing the filterEditor (listGrid.showFilterEditor is true), this property determines whether this list should be filtered every time the user edits the value of the filter editor for this field.

Note : This is an advanced setting

Parameters:
filterOnKeypress - filterOnKeypress Default value is null

getFilterOnKeypress

public Boolean getFilterOnKeypress()
If we're showing the filterEditor (listGrid.showFilterEditor is true), this property determines whether this list should be filtered every time the user edits the value of the filter editor for this field.

Returns:
Boolean

setLinkText

public void setLinkText(String linkText)
The HTML to display in cells of this field if the fieldType is set to link. Can be overridden by linkText.

Parameters:
linkText - linkText Default value is null

getLinkText

public String getLinkText()
The HTML to display in cells of this field if the fieldType is set to link. Can be overridden by linkText.

Returns:
String

setEmptyCellValue

public void setEmptyCellValue(String emptyCellValue)
The value to display for a cell whose value is null or the empty string after applying formatCellValue and valueMap (if any).

This is the field-specific attribute. You may also set the emptyCellValue at the grid level to define the emptyCellValue for all empty fields in the grid.

Parameters:
emptyCellValue - emptyCellValue Default value is "&nbsp;"

getEmptyCellValue

public String getEmptyCellValue()
The value to display for a cell whose value is null or the empty string after applying formatCellValue and valueMap (if any).

This is the field-specific attribute. You may also set the emptyCellValue at the grid level to define the emptyCellValue for all empty fields in the grid.

Returns:
String

setAutoFetchDisplayMap

public void setAutoFetchDisplayMap(Boolean autoFetchDisplayMap)
If true, automatically fetches records and derives a valueMap from optionDataSource.

Same as autoFetchDisplayMap, but defined on a per-field basis.

Parameters:
autoFetchDisplayMap - autoFetchDisplayMap Default value is null

getAutoFetchDisplayMap

public Boolean getAutoFetchDisplayMap()
If true, automatically fetches records and derives a valueMap from optionDataSource.

Same as autoFetchDisplayMap, but defined on a per-field basis.

Returns:
Boolean

setOptionTextMatchStyle

public void setOptionTextMatchStyle(TextMatchStyle optionTextMatchStyle)
For fields with an optionDataSource, where autoFetchDisplayMap is true, this property will govern the textMatchStyle attribute of the DSRequest parameter passed to DataSource.fetchData() when retrieving the remote data set to be used as a basis for thiis field's valueMap.

Parameters:
optionTextMatchStyle - optionTextMatchStyle Default value is null

getOptionTextMatchStyle

public TextMatchStyle getOptionTextMatchStyle()
For fields with an optionDataSource, where autoFetchDisplayMap is true, this property will govern the textMatchStyle attribute of the DSRequest parameter passed to DataSource.fetchData() when retrieving the remote data set to be used as a basis for thiis field's valueMap.

Returns:
TextMatchStyle

setOptionOperationId

public void setOptionOperationId(String optionOperationId)
If this field has an optionDataSource specified and 'autoFetchDisplayMap' is set, this attribute provides a way to customize the operationId passed to dataSource.fetchData() when retrieving the display map from the option dataSource.

Parameters:
optionOperationId - optionOperationId Default value is null

getOptionOperationId

public String getOptionOperationId()
If this field has an optionDataSource specified and 'autoFetchDisplayMap' is set, this attribute provides a way to customize the operationId passed to dataSource.fetchData() when retrieving the display map from the option dataSource.

Returns:
String

setValueField

public void setValueField(String valueField)
Specifies the optionDataSource field used to retrieve the stored values that are to be mapped to the display values (specified by displayField). Note that if this field is editable this will also be applied to this field's editors.

Parameters:
valueField - valueField Default value is null

getValueField

public String getValueField()
Specifies the optionDataSource field used to retrieve the stored values that are to be mapped to the display values (specified by displayField). Note that if this field is editable this will also be applied to this field's editors.

Returns:
String

setDisplayField

public void setDisplayField(String displayField)
Specifies the optionDataSource field used to retrieve the display values that are to be mapped from the internal values specified by valueField.

If no optionDataSource is defined for the field, the cell will display the displayField value for the current record instead of the underlying value for this field. This approach can be used for situations where field values need a stored value to displayed value mapping, but the set of all possible values is too large to load as a com.smartgwt.client..ValueMap - see optionDataSource for more details on this approach. Note that if this field is editable this will also be applied to this field's editors.

The display value for a record with a specified displayField can be picked up via com.smartgwt.client.widgets.grid.ListGrid#getDisplayValue.

Parameters:
displayField - displayField Default value is null

getDisplayField

public String getDisplayField()
Specifies the optionDataSource field used to retrieve the display values that are to be mapped from the internal values specified by valueField.

If no optionDataSource is defined for the field, the cell will display the displayField value for the current record instead of the underlying value for this field. This approach can be used for situations where field values need a stored value to displayed value mapping, but the set of all possible values is too large to load as a com.smartgwt.client..ValueMap - see optionDataSource for more details on this approach. Note that if this field is editable this will also be applied to this field's editors.

The display value for a record with a specified displayField can be picked up via com.smartgwt.client.widgets.grid.ListGrid#getDisplayValue.

Returns:
String

setShowHover

public void setShowHover(Boolean showHover)
Whether to show hovers for this field. The default hover will be the contents of the cell the user is hovering over, and can be customized via com.smartgwt.client.widgets.grid.ListGridField#hoverHTML.

canHover can be set to true to cause hovers to be shown for all fields by default. In this case, field.showHover can be set to false to suppress hovers for an individual field.

All hovers can be disabled, regardless of other settings, by setting showHover to false.

Parameters:
showHover - showHover Default value is null

getShowHover

public Boolean getShowHover()
Whether to show hovers for this field. The default hover will be the contents of the cell the user is hovering over, and can be customized via com.smartgwt.client.widgets.grid.ListGridField#hoverHTML.

canHover can be set to true to cause hovers to be shown for all fields by default. In this case, field.showHover can be set to false to suppress hovers for an individual field.

All hovers can be disabled, regardless of other settings, by setting showHover to false.

Returns:
Boolean

setCanToggle

public void setCanToggle(Boolean canToggle)
Allows a boolean or com.smartgwt.client..ValueMap field to be edited without going into edit mode. When this attribute is set, if clicking on the field will change the value - for boolean fields toggling between true and false, and for valueMapped fields, advancing the value to the next option in the valueMap.

To enable this feature, canEdit must be set to true. Note that you can enable toggling only (without allowing the user to edit other fields) by just setting 'grid.editEvent:"none"'.

If editEvent is set to "click", when the user clicks on the field, the value will be toggled, and inline editing will be triggered as usual. Otherwise the toggled value will be saved immediately to the server, or if autoSaveEdits has been set to false, will be stored as an edit value for the record.

Note : This is an advanced setting

Parameters:
canToggle - canToggle Default value is null

getCanToggle

public Boolean getCanToggle()
Allows a boolean or com.smartgwt.client..ValueMap field to be edited without going into edit mode. When this attribute is set, if clicking on the field will change the value - for boolean fields toggling between true and false, and for valueMapped fields, advancing the value to the next option in the valueMap.

To enable this feature, canEdit must be set to true. Note that you can enable toggling only (without allowing the user to edit other fields) by just setting 'grid.editEvent:"none"'.

If editEvent is set to "click", when the user clicks on the field, the value will be toggled, and inline editing will be triggered as usual. Otherwise the toggled value will be saved immediately to the server, or if autoSaveEdits has been set to false, will be stored as an edit value for the record.

Returns:
Boolean

getFieldTitle

public void getFieldTitle(ListGrid viewer,
                          int fieldNum)
If your derivation of the field title is more complex than specifying a static string, you can specify a getFieldTitle() method on your field to return the title string. Otherwise you can use the title attribute on the field to specify the title.

You can use com.smartgwt.client.widgets.grid.ListGrid#setFieldProperties to dynamically update the title.

Parameters:
viewer - pointer back to the ListGrid
fieldNum - index of this field in the grid's fields array.

addEditorEnterHandler

public HandlerRegistration addEditorEnterHandler(EditorEnterHandler handler)
Add a editorEnter handler.

Callback fired when the user first starts editing a cell.

This callback is typically used to establish dynamic default values via ListGrid.setEditValue(int, int, java.lang.String) or ListGrid.setEditValues(int, java.util.Map).

Specified by:
addEditorEnterHandler in interface HasEditorEnterHandlers
Parameters:
handler - the editorEnter handler
Returns:
HandlerRegistration used to remove this handler

addEditorExitHandler

public HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
Add a editorExit handler.

Callback fired when the user attempts to navigate away from the current edit cell, or complete the current edit.
Return false from this method to cancel the default behavior (Saving / cancelling the current edit / moving to the next edit cell)

Specified by:
addEditorExitHandler in interface HasEditorExitHandlers
Parameters:
handler - the editorExit handler
Returns:
HandlerRegistration used to remove this handler

addRecordClickHandler

public HandlerRegistration addRecordClickHandler(RecordClickHandler handler)
Add a recordClick handler.

Executed when this field is clicked on. Note that if ListGrid.addRecordClickHandler(com.smartgwt.client.widgets.grid.events.RecordClickHandler) is also defined, it will be fired for fields that define a recordClick handler if the field-level handler returns true. Return false to prevent the grid-level handler from firing.

Specified by:
addRecordClickHandler in interface HasRecordClickHandlers
Parameters:
handler - the recordClick handler
Returns:
HandlerRegistration used to remove this handler

addChangeHandler

public HandlerRegistration addChangeHandler(ChangeHandler handler)
Add a change handler.

If this field is editable, any FormItem.addChangeHandler(com.smartgwt.client.widgets.form.fields.events.ChangeHandler) handler specified on the ListGridField will be passed onto the editors for this field.

Specified by:
addChangeHandler in interface HasChangeHandlers
Parameters:
handler - the change handler
Returns:
HandlerRegistration used to remove this handler

addChangedHandler

public HandlerRegistration addChangedHandler(ChangedHandler handler)
Add a changed handler.

If this field is editable, any FormItem.addChangedHandler(com.smartgwt.client.widgets.form.fields.events.ChangedHandler) handler specified on the ListGridField will be passed onto the editors for this field.

Specified by:
addChangedHandler in interface HasChangedHandlers
Parameters:
handler - the changed handler
Returns:
HandlerRegistration used to remove this handler

setDefaultFilterValue

public void setDefaultFilterValue(String defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.

Parameters:
defaultFilterValue - the default filter value

setDefaultFilterValue

public void setDefaultFilterValue(Integer defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.

Parameters:
defaultFilterValue - the default filter value

setDefaultFilterValue

public void setDefaultFilterValue(Float defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.

Parameters:
defaultFilterValue - the default filter value

setDefaultFilterValue

public void setDefaultFilterValue(Boolean defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.

Parameters:
defaultFilterValue - the default filter value

setDefaultFilterValue

public void setDefaultFilterValue(Date defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field.

Parameters:
defaultFilterValue - the default filter value

setDateFormatter

public void setDateFormatter(DateDisplayFormat dateFormatter)
Display format to use for fields specified as type 'date'. Default is to use the system-wide default short date format, configured via com.smartgwt.client..Date#setShortDisplayFormat. Specify any valid DateDisplayFormat, or function to change the display format for dates used by this grid. If specified as a function, this function will be executed in the scope of the Date and should return the formatted string.
May also be specified at the field level via displayFormat.
If this field is editable the dateFormatter will also be passed to the editor created to edit this field as displayFormat. In this case you may also need to set dateInputFormat.

Parameters:
dateFormatter - dateFormatter Default value is null

getDateFormatter

public DateDisplayFormat getDateFormatter()
Display format to use for fields specified as type 'date'. Default is to use the system-wide default short date format, configured via DateUtil.setShortDateDisplayFormatter(com.smartgwt.client.util.DateDisplayFormatter). Specify any valid DateDisplayFormat, or function to change the display format for dates used by this grid. If specified as a function, this function will be executed in the scope of the Date and should return the formatted string.
May also be specified at the field level via displayFormat.
If this field is editable the dateFormatter will also be passed to the editor created to edit this field as displayFormat. In this case you may also need to set dateInputFormat.

Returns:
DateDisplayFormat

setIcons

public void setIcons(FormItemIcon... icons)
If this field is editable, this property can be used to specify icons to be displayed in the editors displayed for this field

Note : This is an advanced setting

Parameters:
icons - icons Default value is null

setGroupingModes

public void setGroupingModes(Map groupingModes)
If set, provides several possible styles of grouping that are valid for this field. For example, a field of type:"date" might be able to be grouped by week, month, or by day of week.

If groupingModes are present and canGroupBy, the menu for this field includes a submenu of possible grouping modes generated from the groupingModes valueMap. When the user selects a particular grouping mode, groupingMode is set to the user's chosen mode, and this choice can be detected via the field parameter to com.smartgwt.client.widgets.grid.ListGridField#getGroupValue in order to provide different modes of grouping.

The user may also choose to group records without specifying a grouping mode, in this case, the defaultGroupingMode is used.

Note that getGroupValue, groupingModes et al can be specified on SimpleType declaration, and the different grouping modes that are offered automatically for various common types are defined this way.

Parameters:
groupingModes - groupingModes Default value is null

getGroupingModes

public Map getGroupingModes()
If set, provides several possible styles of grouping that are valid for this field. For example, a field of type:"date" might be able to be grouped by week, month, or by day of week.

If groupingModes are present and canGroupBy, the menu for this field includes a submenu of possible grouping modes generated from the groupingModes valueMap. When the user selects a particular grouping mode, groupingMode is set to the user's chosen mode, and this choice can be detected via the field parameter to com.smartgwt.client.widgets.grid.ListGridField#getGroupValue in order to provide different modes of grouping.

The user may also choose to group records without specifying a grouping mode, in this case, the defaultGroupingMode is used.

Note that getGroupValue, groupingModes et al can be specified on SimpleType declaration, and the different grouping modes that are offered automatically for various common types are defined this way.

Returns:
the value map

setCellFormatter

public void setCellFormatter(CellFormatter formatter)
* Return the HTML to display in cells of this field.

Given the raw value for this field as taken from the record Formatter to apply to the static values displayed in cells for this field.

Example usage: formatting a currency value stored in cents (so "100" to "$1.00")
The value passed to this method is the raw value for the cell.
Takes precedence over formatCellValue defined at the grid level for cells in this field.

Note: this formatter will not be applied to the values displayed in cells being edited. The com.smartgwt.client.widgets.grid.ListGridField#formatEditorValue is provided for that purpose.

Parameters:
formatter - the formatter

setSortNormalizer

public void setSortNormalizer(SortNormalizer normalizer)
Optional function to return the value that should be used when sorting this field.

Note that, if the dataset exceeds dataPageSize and hence paging is introduced, the grid relies on the server to provide sorting, and the sortNormalizer will no longer be called.

Parameters:
normalizer - the sort normalizer

setHoverCustomizer

public void setHoverCustomizer(HoverCustomizer hoverCustomizer)
* HTML to be shown in hovers over cells in the column described by this field.

Parameters:
hoverCustomizer - the hover customizer

setAlign

public void setAlign(Alignment align)
Horizontal alignment for field's column header: "left", "right" or "center". Applied to the column header title and cells by default. A separate alignment for cells can be specified via cellAlign.
If null, values are left-aligned. If this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.

Parameters:
align - align Default value is null

getAlign

public Alignment getAlign()
Horizontal alignment for field's column header: "left", "right" or "center". Applied to the column header title and cells by default. A separate alignment for cells can be specified via cellAlign.
If null, values are left-aligned. If this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.

Returns:
String

setWidth

public void setWidth(int width)
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space, or "*" to allocate an equal portion of the remaining space.
ListGrid field widths may also be set when the fields are instantiated via the listGrid.setFields() method by passing an array of numbers (absolute pixel sizes only) as the second parameter

Parameters:
width - width Default value is "*"

setWidth

public void setWidth(String width)
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space, or "*" to allocate an equal portion of the remaining space.
ListGrid field widths may also be set when the fields are instantiated via the listGrid.setFields() method by passing an array of numbers (absolute pixel sizes only) as the second parameter

Parameters:
width - width Default value is "*"

getWidth

public String getWidth()
Return the width of the field.

Returns:
the field width as a String

setWrap

public void setWrap(boolean wrap)
Control the list grid fields header wrap properties

Parameters:
wrap - true to wrap

setHidden

public void setHidden(boolean hidden)

setImgDir

public void setImgDir(String imgDir)

setPrompt

public void setPrompt(String prompt)

setDefaultValue

public void setDefaultValue(String defaultValue)

setDefaultValue

public void setDefaultValue(Integer defaultValue)

setDefaultValue

public void setDefaultValue(Boolean defaultValue)

setDefaultValue

public void setDefaultValue(Float defaultValue)

setDefaultValue

public void setDefaultValue(Date defaultValue)

setEditorType

public void setEditorType(FormItem editorType)
Name of form item type to use for the form item created to edit this field. (Only used if this field is editable). Note: If this is not specified, the edit-form item type may be derived from the editorType property, typically inherited from datasource fields, or from the type of the field (showing the appropriate form item for the data-type). See the Grid Editing overview for more on editing ListGrid fields.

Parameters:
editorType - the editor type

setFilterEditorType

public void setFilterEditorType(FormItem filterEditorType)
If this ListGrid is showing a filter row, this property can be used to specify the form item class to use for the filter form item associated with this field (Only used if this field is not canFilter:false).

Note: If this is not specified, the edit-form item type may be derived from the 'editorType' property, typically inherited from datasource fields, or from the 'type' of the field (showing the appropriate form item for the data-type).

Parameters:
filterEditorType - the filter editor type

setFilterEditorValueMap

public void setFilterEditorValueMap(Map filterEditorValueMap)
If this listGrid is showing a filter row, this property can be used to specify a mapping of internal data to/from display values to be in the appropriate filter row form item.

Parameters:
filterEditorValueMap - the filter editor value map

setMultiple

public void setMultiple(boolean multiple)
When using a valueMap, set multiple to true if a select list box is desired instead of a combobox when editing the cell.

Parameters:
multiple - true for select list

setEditorValueMap

public void setEditorValueMap(Map editorValueMap)
A valueMap to use for editors shown for this field. By default if this is not specified field.valueMap will be used instead.

Dynamic valueMaps can be provided by implementing ListGrid.getEditorValueMap().

Parameters:
editorValueMap - the editor value map

setValidators

public void setValidators(Validator... validators)
Array of Validator objects for this field. When the user edits cells in this field, these validators will be applied to the edited value.
Note: for databound listGrids, this property may be specified on the DataSourceField, enabling both client and server side validation.

Parameters:
validators - validators Default value is null

setValueMap

public void setValueMap(Map valueMap)
Array of legal values for this field, or an Object where each property maps a stored value to a user-displayable value.
Note that if this field is editable (see canEdit, canEdit), editors displayed for this field will pick up their valueMap either from this value or from editorValueMap.

See also valueMap.

Parameters:
valueMap - valueMap Default value is null

setValueMap

public void setValueMap(String... valueMap)
Array of legal values for this field, or an Object where each property maps a stored value to a user-displayable value.
Note that if this field is editable (see canEdit, canEdit), editors displayed for this field will pick up their valueMap either from this value or from editorValueMap.

See also valueMap.

Parameters:
valueMap - valueMap Default value is null

setValueIcons

public void setValueIcons(Map<String,String> valueIcons)
This property is a mapping between data values and URLs of icons to display. If specified, for every cell in this field where the data value matches an entry in the valueIcons map, an icon with the appropriate URL will be displayed.
By default any editors displayed for this field will have the same valueIcons object applied to them. This may be overridden by explicitly setting editorValueIcons.
Note that the following attributes related to valueIcon styling will also be picked up by the editor from the ListGridField object unless explicitly specified via the equivalent editor_ attributes:
valueIconWidth
valueIconHeight
valueIconSize
valueIconLeftPadding
valueIconRightPadding
imageURLPrefix
imageURLSuffix

Parameters:
valueIcons - valueIcons Default value is null

setEditorValueIcons

public void setEditorValueIcons(Map<String,String> editorValueIcons)
When some cell in this field is being edited, setting this property will specify the value icons to display in the cell's editor. If unset, the editor's valueIcons will be determined in the same way as it would be for a static cell.

Parameters:
editorValueIcons - editorValueIcons Default value is null

setOptionDataSource

public void setOptionDataSource(DataSource optionDataSource)
Derive a ValueMap by fetching records from another DataSource and extracting the valueField and displayField in the loaded records, to derive one valueMap entry per record loaded from the optionDataSource.

Unlike the similar use of optionDataSource for pickLists used during editing or filtering, listGridField.optionDataSource causes the entire set of records from the optionDataSource to be fetched, without paging. Hence listGridField.optionDataSource is appropriate only for smaller valueMaps. For very large valueMap situations, such as an accountId field that should be displayed as an accountName where there are thousands of accounts, the recommended approach is:

In this case the cells in the accountId field will show the record value from the accountName field. This approach means the valueMap will never be loaded in its entirety, instead, each loaded record contains the valueMapping for that one record, as a pair of fields within the record.

Note that it is key that the server return both the underlying stored value and the display value, as suggested above, because this approach allows the optionDataSource property to be used to provide paged valueMaps during inline editing and showFilterEditor. Note that pickList.optionDataSource is a distinct setting from listGridField.optionDataSource, settable via editorProperties (for editing) and filterEditorProperties (for filtering).

Parameters:
optionDataSource - optionDataSource Default value is null

setShowIfCondition

public void setShowIfCondition(ListGridFieldIfFunction showIf)
A function, if provided, is evaluated to conditionally determine whether this field should be displayed. Evaluated on initial draw, then reevaluated on explicit calls to listGrid.refreshFields() or listGrid.setFields().

Use 'showIf:"false"' to set a ListGrid field to initially hidden.

Note that explicit calls to grid.showField() or hideField() will wipe out the showIf expression, as will the end user showing and hiding columns via the header contextMenu.

Also note that fields marked as detail:true will be hidden by default even if ListGrid.showDetailFields is true. To show detail fields inherited from a DataSource, include an explicit field definition for the field and set this property to return true.

Parameters:
showIf - showIf criteria

setSortDirection

public void setSortDirection(SortDirection sortDirection)
Specifies the default sorting direction for this column. If specified on the sortField for the listGrid, sorting occurs automatically, otherwise this will be the default direction when the user clicks the field header, or calls ListGrid.sort() without specifying an explicit sort direction.

Overrides ListGrid.sortDirection

Parameters:
sortDirection - sortDirection Default value is null

getSortDirection

public SortDirection getSortDirection()
Specifies the default sorting direction for this column. If specified on the sortField for the listGrid, sorting occurs automatically, otherwise this will be the default direction when the user clicks the field header, or calls ListGrid.sort() without specifying an explicit sort direction.

Overrides ListGrid.sortDirection

Returns:
SortDirection

setOptionFilterContext

public void setOptionFilterContext(DSRequest optionFilterContext)
If this field has an optionDataSource specified and autoFetchDisplayMap is set, this attribute provides a way to customize the dataSource request issued to fetch the display map from the option dataSource.

Parameters:
optionFilterContext - optionFilterContext Default value is null

getOptionFilterContext

public DSRequest getOptionFilterContext()
If this field has an optionDataSource specified and autoFetchDisplayMap is set, this attribute provides a way to customize the dataSource request issued to fetch the display map from the option dataSource.

Returns:
DSRequest Properties

addCellSavedHandler

public HandlerRegistration addCellSavedHandler(CellSavedHandler handler)
Add a cellSaved handler.

Callback fired when field changes value as the result of a cell edit. Fired only on successful save of edit, when the new value doesn't match the value before editing.

Same signature as com.smartgwt.client.widgets.grid.ListGrid#addCellChangedHandler, but defined on a per-field basis.

Specified by:
addCellSavedHandler in interface HasCellSavedHandlers
Parameters:
handler - the cellSaved handler
Returns:
HandlerRegistration used to remove this handler

setGroupTitleRenderer

public void setGroupTitleRenderer(GroupTitleRenderer groupTitleRenderer)
Renderer that returns the title that should be shown to the user for the group with the groupValue passed as a parameter.

Default title is the groupValue itself.

Parameters:
groupTitleRenderer - the group title renderer

setGroupValueFunction

public void setGroupValueFunction(GroupValueFunction groupValueFunction)
Function that returns 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:
groupValueFunction - the group value function

setEditorValueMapFunction

public void setEditorValueMapFunction(EditorValueMapFunction editorValueMapFunction)
This function method will be called from ListGrid.getEditorValueMap() and the resulting valueMap will be used instead of any static specified valueMap for the field.

Parameters:
editorValueMapFunction - the editor value map function

setHeaderButtonProperties

public void setHeaderButtonProperties(Button buttonProperties)
Set the properties of the header button used for this field.

Parameters:
buttonProperties - the header button properties

setSummaryFunction

public void setSummaryFunction(SummaryFunctionType summaryFunction)
If showGridSummary or showGroupSummary is true, this attribute can be used to specify an explicit SummaryFunction for calculating the summary value to display.

Parameters:
summaryFunction - summaryFunction Default value is null

getSummaryFunction

public SummaryFunctionType getSummaryFunction()
If showGridSummary or showGroupSummary is true, this attribute can be used to specify an explicit SummaryFunction for calculating the summary value to display.

Returns:
SummaryFunctionType

setSummaryFunction

public void setSummaryFunction(SummaryFunction summaryFunction)
If showGridSummary or showGroupSummary is true, this attribute can be used to specify an explicit SummaryFunction for calculating the summary value to display.

Parameters:
summaryFunction - summaryFunction Default value is null

setRecordSummaryFunction

public void setRecordSummaryFunction(RecordSummaryFunctionType recordSummaryFunction)
Only applies to fields of type "summary". Fields of this type will display a calculated value based on the other field values within the current record.

This attribute specifies how the summary field value will be calculated. See RecordSummaryFunctionType for valid options.

A subset of the ListGrid's fields will be passed to the RecordSummaryFunction. Which fields to include is determined based on includeInRecordSummary

If showGridSummary or showGroupSummary is true, this field's value in the summary row[s] will still be calculated by calling this method. In this case, the record object passed in will contain summary values for each field. If custom handling is required for this case, it may be detected by checking the record object's isGroupSummary and isGridSummary attributes.

Parameters:
recordSummaryFunction - recordSummaryFunction Default value is null

setRecordSummaryFunction

public void setRecordSummaryFunction(RecordSummaryFunction recordSummaryFunction)
Only applies to fields of type "summary". Fields of this type will display a calculated value based on the other field values within the current record.

This attribute specifies how the summary field value will be calculated. See RecordSummaryFunctionType for valid options.

A subset of the ListGrid's fields will be passed to the RecordSummaryFunction. Which fields to include is determined based on includeInRecordSummary

If showGridSummary or showGroupSummary is true, this field's value in the summary row[s] will still be calculated by calling this method. In this case, the record object passed in will contain summary values for each field. If custom handling is required for this case, it may be detected by checking the record object's isGroupSummary and isGridSummary attributes.

Parameters:
recordSummaryFunction - recordSummaryFunction Default value is null

getRecordSummaryFunction

public RecordSummaryFunctionType getRecordSummaryFunction()
Only applies to fields of type "summary". Fields of this type will display a calculated value based on the other field values within the current record.

This attribute specifies how the summary field value will be calculated. See RecordSummaryFunctionType for valid options.

A subset of the ListGrid's fields will be passed to the RecordSummaryFunction. Which fields to include is determined based on includeInRecordSummary

If showGridSummary or showGroupSummary is true, this field's value in the summary row[s] will still be calculated by calling this method. In this case, the record object passed in will contain summary values for each field. If custom handling is required for this case, it may be detected by checking the record object's isGroupSummary and isGridSummary attributes.

Returns:
RecordSummaryFunction