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:
ListGridRemoveField, ListGridSummaryField, TreeGridField

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

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

See Also:
ListGrid.getFields(), ListGrid.setFields(com.smartgwt.client.widgets.grid.ListGridField...)

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.
 void addSummaryFunction(SummaryFunction summaryFunction)
          If showGridSummary or showGroupSummary is true, this method can be used to specify a SummaryFunction for calculating the summary value to display.
 void addSummaryFunction(SummaryFunctionType summaryFunction)
          If showGridSummary or showGroupSummary is true, this method can be used to specify a SummaryFunctionType for calculating the summary value to display.
 Alignment getAlign()
          Horizontal alignment for field's column header: "left", "right" or "center".
 Boolean getApplyAfterSummary()
          If userFormula is set for this field, and this grid is showing group summaries or a grid summary, this property determines what field value should be present in those summary rows.
 Boolean getAutoFetchDisplayMap()
          If true, automatically fetches records and derives a valueMap from optionDataSource.
 Boolean getAutoFitWidth()
          Enables autofitting to values or titles for this field..
 AutoFitWidthApproach getAutoFitWidthApproach()
          When a user requests column autofitting via the header contextmenu or via a mouse gesture, what autofit approach is used.
 Boolean getAutoFreeze()
          Whether this field should be automatically frozen when other fields are frozen.
 int getAutoFreezePosition()
          When a field has autoFreeze set to true, developers can implement this method to indicate where in the frozen-fields array this field should appear.
 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 getCanDragResize()
          Whether this field can be dragResized using the mouse.
 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()
          If set to false, this field will be omitted from the column picker that appears in the header context menu when canPickFields is enabled.
 Boolean getCanHilite()
          Determines whether this field can be hilited.
 Boolean getCanReorder()
          Whether this field can be reordered using the mouse.
 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 valueMapped 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.
 String getDataPath()
          dataPath for this field.
 DateDisplayFormat getDateFormatter()
          Display format to use for date type values within this field.
 Integer getDecimalPad()
          Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.
 Integer getDecimalPrecision()
          Applies only to fields of type "float" and affects how many significant digits are shown.
 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.
 Boolean getDisplayValueFromRecord()
          If a displayField is set, should this field show record values from the displayField?
 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.
 Boolean getEscapeHTML()
          By default HTML values in ListGrid cells will be interpreted by the browser.
 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.
 boolean getExportFieldWidth()
          When exporting data to Excel/OpenOffice format using ListGrid.exportData or ListGrid.exportClientData with exportFieldWidths set, set this flag false to cause this field to "opt out" of width export.
 String getExportFormat()
          FormatString used during exports for numeric or date formatting.
 Boolean getExportRawValues()
          Dictates whether the data in this field should be exported raw by exportClientData().
 String 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.
 OperatorId getFilterOperator()
          With the FilterEditor showing, the Operator to use when matching values for this field.
 String getFormat()
          FormatString for numeric or date formatting.
 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 getHeaderTitle()
          Optional title for the header button for this field.
 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.
 Boolean getHidden()
          Marks field as initially hidden.
The user will still be able to show the field via a context menu.
 Boolean getHiliteHTMLAfterFormat()
          If set to true, custom HTML applied as part of hiliting will be applied after formatting for each cell in this column.
 Integer getHiliteIconHeight()
          Height for hilite icons for this field.
 Integer getHiliteIconLeftPadding()
          How much padding should there be on the left of hilite icons for this field? Overrides hiliteIconLeftPadding
 HiliteIconPosition getHiliteIconPosition()
          When hiliteIcons are present, where the hilite icon will be placed relative to the field value.
 Integer getHiliteIconRightPadding()
          How much padding should there be on the right of hilite icons for this field? Overrides hiliteIconRightPadding
 Integer getHiliteIconSize()
          Default width and height of hilite icons in this field.
 Integer getHiliteIconWidth()
          Width for hilite icons for this field.
 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.
 Boolean getIgnoreKeyboardClicks()
          If the user is navigating through the grid using the keyboard, record click or double click events may be generated via keyboard interactions (see generateClickOnSpace, generateClickOnEnter, generateDoubleClickOnSpace, generateDoubleClickOnEnter and arrowKeyAction).
 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.
 String getIncludeFrom()
          Indicates this field's values should be fetched from another, related DataSource.
 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 getLinkTextProperty()
          Name of the property in a ListGridRecord that holds the HTML to display in cells of this field if the fieldType is set to "link".
 String getLinkURLPrefix()
          If this field has type [ListGridFieldType] set to "link", setting this property will apply a standard prefix to the link URL for cells in this field.
 String getLinkURLSuffix()
          If this field has type [ListGridFieldType] set to "link", setting this property will apply a standard suffix to the link URL for cells in this field.
 Boolean getMultiple()
          Indicates that this field should always be Array-valued.
 String getName()
          Name of this field.
 Criteria getOptionCriteria()
          If optionDataSource is set for this ListGridField, criteria specified in this attribute will be passed to the dataSource when performing the fetch operation to determine data-value to display-value mappings
 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 this field's valueMap.
static ListGridField getOrCreateRef(JavaScriptObject jsObj)
           
 Boolean getPartialSummary()
          Only applies to fields of type "summary".
 String getPrompt()
          Causes a tooltip hover to appear on the header generated for this field (effectively sets prompt for the header).
 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 getShouldPrint()
          Whether this field should be included in the printable representation of the grid.
 Boolean getShowAlternateStyle()
          When set to false, don't apply alternate-row styling to this field.
 Boolean getShowDefaultContextMenu()
          When set to false, this field will not show a context menu in its 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 receives 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 default summary function is defined for the specified field type.
 Boolean getShowHilitesInGroupSummary()
          Determines whether hiliting for this field is shown in a group summary.
 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 getShowTitle()
          This property may be set to false to explicitly suppress display of the field title in the column header button for the field.
 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.
 Boolean getSortByDisplayField()
          For a field with displayField configured, should client-side sorting be performed on the display field value? Unless explicitly set to false the display field value is used.
 Boolean getSortByMappedValue()
          If valueMap is set, and the grid is sorted by this field, should the data be sorted by the underlying data value or the mapped display value.
 SortDirection getSortDirection()
          Specifies the default sorting direction for this column.
 String getSummaryTitle()
          Deprecated. Rather than customizing the summaryTitle developers should typically use the headerTitle attribute to show a different title in the column header button than the title used elsewhere.
 String getSummaryValue()
          The value to display for a ListGridField when it appears in the summaryRow.
 String getSummaryValueTitle()
          If showGridSummary or showGroupSummary is true and the summaryFunction is set to "title", this attribute may be set to a string to display in the group and/or grid summary.
 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.
 TimeDisplayFormat getTimeFormatter()
          Time-format to apply to date type values within this field.
 String getTitle()
          A title for this field, to display in the header for the field and in other contexts such as the menu for picking visible fields.
 ListGridFieldType getType()
          ListGrids picks a renderer for the view and edit mode of a field based on this attribute.
 UserFormula getUserFormula()
          Formula definition for this field.
 UserSummary getUserSummary()
          Summary definition for this field.
 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.
 Boolean getWrap()
          Should the field title wrap if there is not enough space horizontally to accomodate it.
 void setAlign(Alignment align)
          Horizontal alignment for field's column header: "left", "right" or "center".
 void setApplyAfterSummary(Boolean applyAfterSummary)
          If userFormula is set for this field, and this grid is showing group summaries or a grid summary, this property determines what field value should be present in those summary rows.
 void setAutoFetchDisplayMap(Boolean autoFetchDisplayMap)
          If true, automatically fetches records and derives a valueMap from optionDataSource.
 void setAutoFitWidth(Boolean autoFitWidth)
          Enables autofitting to values or titles for this field..
 void setAutoFitWidthApproach(AutoFitWidthApproach autoFitWidthApproach)
          When a user requests column autofitting via the header contextmenu or via a mouse gesture, what autofit approach is used.
 void setAutoFreeze(Boolean autoFreeze)
          Whether this field should be automatically frozen when other fields are frozen.
 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 setCanDragResize(Boolean canDragResize)
          Whether this field can be dragResized using the mouse.
 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)
          If set to false, this field will be omitted from the column picker that appears in the header context menu when canPickFields is enabled.
 void setCanHilite(Boolean canHilite)
          Determines whether this field can be hilited.
 void setCanReorder(Boolean canReorder)
          Whether this field can be reordered using the mouse.
 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 valueMapped 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 setDataPath(String dataPath)
          dataPath for this field.
 void setDateFormatter(DateDisplayFormat dateFormatter)
          Display format to use for date type values within this field.
 void setDecimalPad(Integer decimalPad)
          Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.
 void setDecimalPrecision(Integer decimalPrecision)
          Applies only to fields of type "float" and affects how many significant digits are shown.
 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(Long defaultValue)
           
 void setDefaultValue(String defaultValue)
          If this field can be edited, this property can be used to specify a default value for this field's editor when adding new rows to the grid.
 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 setDisplayValueFromRecord(Boolean displayValueFromRecord)
          If a displayField is set, should this field show record values from the displayField?
 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 setEditorProperties(FormItem editorProperties)
          FormItem properties to use as a template for the form item created to edit this field.
 void setEditorType(Class<? extends FormItem> editorType)
          The FormItem class to be used when this field is edited.
 void setEditorType(FormItem editorType)
          Deprecated. Renamed to setEditorProperties(FormItem). You can also consider using setEditorType(Class) or setEditorType(String) instead.
 void setEditorType(String editorType)
          The FormItem class to be used when this field is edited.
 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 setEditValueFormatter(CellEditValueFormatter formatter)
          Return the value to display in cells of this field which are being edited.
 void setEditValueParser(CellEditValueParser parser)
          Method used to convert the value displayed in an editor for some cell in this field into a raw value for saving.
 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 setEscapeHTML(Boolean escapeHTML)
          By default HTML values in ListGrid cells will be interpreted by the browser.
 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 setExportFieldWidth(boolean exportFieldWidth)
          When exporting data to Excel/OpenOffice format using ListGrid.exportData or ListGrid.exportClientData with exportFieldWidths set, set this flag false to cause this field to "opt out" of width export.
 void setExportFormat(String exportFormat)
          FormatString used during exports for numeric or date formatting.
 void setExportRawValues(Boolean exportRawValues)
          Dictates whether the data in this field should be exported raw by exportClientData().
 void setFilterEditorProperties(FormItem filterEditorProperties)
          If this ListGrid is showing a filter row (showFilterEditor : true), this property can be used to specify properties for the appropriate filter form item.
 void setFilterEditorType(Class<? extends FormItem> editorType)
          If this ListGrid is showing a filter row, this property can be used to specify the FormItem class to use for the filter form item associated with this field.
 void setFilterEditorType(FormItem filterEditorType)
          Deprecated. Renamed to setFilterEditorProperties(FormItem). You can also consider using setFilterEditorType(Class) or setFilterEditorType(String) instead.
 void setFilterEditorType(String editorType)
          If this ListGrid is showing a filter row, this property can be used to specify the FormItem class to use for the filter form item associated with this field.
 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 setFilterOperator(OperatorId filterOperator)
          With the FilterEditor showing, the Operator to use when matching values for this field.
 void setFormat(String format)
          FormatString for numeric or date formatting.
 void setFrozen(Boolean frozen)
          Whether this field should be "frozen" for the purposes of horizontal scrolling.
 void setGridSummaryCustomizer(GridSummaryCustomizer gridSummaryCustomizer)
           
 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 setGroupSummaryCustomizer(GroupSummaryCustomizer groupSummaryCustomizer)
           
 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(Canvas buttonProperties)
          Set the properties of the header button used for this field.
 void setHeaderTitle(String headerTitle)
          Optional title for the header button 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)
          Marks field as initially hidden.
The user will still be able to show the field via a context menu.
 void setHiliteHTMLAfterFormat(Boolean hiliteHTMLAfterFormat)
          If set to true, custom HTML applied as part of hiliting will be applied after formatting for each cell in this column.
 void setHiliteIconHeight(Integer hiliteIconHeight)
          Height for hilite icons for this field.
 void setHiliteIconLeftPadding(Integer hiliteIconLeftPadding)
          How much padding should there be on the left of hilite icons for this field? Overrides hiliteIconLeftPadding
 void setHiliteIconPosition(HiliteIconPosition hiliteIconPosition)
          When hiliteIcons are present, where the hilite icon will be placed relative to the field value.
 void setHiliteIconRightPadding(Integer hiliteIconRightPadding)
          How much padding should there be on the right of hilite icons for this field? Overrides hiliteIconRightPadding
 void setHiliteIconSize(Integer hiliteIconSize)
          Default width and height of hilite icons in this field.
 void setHiliteIconWidth(Integer hiliteIconWidth)
          Width for hilite icons for this field.
 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 setIgnoreKeyboardClicks(Boolean ignoreKeyboardClicks)
          If the user is navigating through the grid using the keyboard, record click or double click events may be generated via keyboard interactions (see generateClickOnSpace, generateClickOnEnter, generateDoubleClickOnSpace, generateDoubleClickOnEnter and arrowKeyAction).
 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 setIncludeFrom(String includeFrom)
          Indicates this field's values should be fetched from another, related DataSource.
 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 setLeaveHeaderMenuButtonSpace(Boolean leaveHeaderMenuButtonSpace)
          If showHeaderMenuButton is true, when auto-fitting fields to the title width via autoFitFieldWidths or autoFitWidth, should the button be sized such that there is enough space for the heeader menu button to show without covering the field title?
 void setLinkText(String linkText)
          The HTML to display in cells of this field if the fieldType is set to link.
 void setLinkTextProperty(String linkTextProperty)
          Name of the property in a ListGridRecord that holds the HTML to display in cells of this field if the fieldType is set to "link".
 void setLinkURLPrefix(String linkURLPrefix)
          If this field has type [ListGridFieldType] set to "link", setting this property will apply a standard prefix to the link URL for cells in this field.
 void setLinkURLSuffix(String linkURLSuffix)
          If this field has type [ListGridFieldType] set to "link", setting this property will apply a standard suffix to the link URL for cells in this field.
 void setMultiple(Boolean multiple)
          Indicates that this field should always be Array-valued.
 void setName(String name)
          Name of this field.
 void setOptionCriteria(Criteria optionCriteria)
          If optionDataSource is set for this ListGridField, criteria specified in this attribute will be passed to the dataSource when performing the fetch operation to determine data-value to display-value mappings
 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 this field's valueMap.
 void setPartialSummary(Boolean partialSummary)
          Only applies to fields of type "summary".
 void setPrompt(String prompt)
          Causes a tooltip hover to appear on the header generated for this field (effectively sets prompt for the header).
 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 setShouldPrint(Boolean shouldPrint)
          Whether this field should be included in the printable representation of the grid.
 void setShowAlternateStyle(Boolean showAlternateStyle)
          When set to false, don't apply alternate-row styling to this field.
 void setShowDefaultContextMenu(Boolean showDefaultContextMenu)
          When set to false, this field will not show a context menu in its 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 receives 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 default summary function is defined for the specified field type.
 void setShowHilitesInGroupSummary(Boolean showHilitesInGroupSummary)
          Determines whether hiliting for this field is shown in a group summary.
 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 setShowTitle(Boolean showTitle)
          This property may be set to false to explicitly suppress display of the field title in the column header button for the field.
 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 setSortByDisplayField(Boolean sortByDisplayField)
          For a field with displayField configured, should client-side sorting be performed on the display field value? Unless explicitly set to false the display field value is used.
 void setSortByMappedValue(Boolean sortByMappedValue)
          If valueMap is set, and the grid is sorted by this field, should the data be sorted by the underlying data value or the mapped display value.
 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(String summaryFunction)
          If showGridSummary or showGroupSummary is true, this method can be used to specify the name of a summary function registered via SimpleType.registerSummaryFunction(java.lang.String, com.smartgwt.client.widgets.grid.SummaryFunction) for calculating the summary value to display.
 void setSummaryFunction(SummaryFunction summaryFunction)
          If showGridSummary or showGroupSummary is true, this method can be used to specify a SummaryFunction for calculating the summary value to display.
 void setSummaryFunction(SummaryFunctionType summaryFunction)
          If showGridSummary or showGroupSummary is true, this method can be used to specify a SummaryFunctionType for calculating the summary value to display.
 void setSummaryTitle(String summaryTitle)
          Deprecated. Rather than customizing the summaryTitle developers should typically use the headerTitle attribute to show a different title in the column header button than the title used elsewhere.
 void setSummaryValue(String summaryValue)
          The value to display for a ListGridField when it appears in the summaryRow.
 void setSummaryValueTitle(String summaryValueTitle)
          If showGridSummary or showGroupSummary is true and the summaryFunction is set to "title", this attribute may be set to a string to display in the group and/or grid summary.
 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 setTimeFormatter(TimeDisplayFormat timeFormatter)
          Time-format to apply to date type values within this field.
 void setTitle(String title)
          A title for this field, to display in the header for the field and in other contexts such as the menu for picking visible fields.
 void setType(ListGridFieldType type)
          ListGrids picks a renderer for the view and edit mode of a field based on this attribute.
 void setUserFormula(UserFormula userFormula)
          Formula definition for this field.
 void setUserSummary(UserSummary userSummary)
          Summary definition for this field.
 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
 void setWrap(Boolean wrap)
          Should the field title wrap if there is not enough space horizontally to accomodate it.
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject
 
Methods inherited from class com.smartgwt.client.core.JsObject
equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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)

setApplyAfterSummary

public void setApplyAfterSummary(Boolean applyAfterSummary)
If userFormula is set for this field, and this grid is showing group summaries or a grid summary, this property determines what field value should be present in those summary rows. Should the field apply the user-formula to the calculated summary row, or should it apply a standard grid or group summary to the user-formula values displayed in the grid?

Default behavior may be specified at the grid level via applyFormulaAfterSummary

Parameters:
applyAfterSummary - Default value is null

getApplyAfterSummary

public Boolean getApplyAfterSummary()
If userFormula is set for this field, and this grid is showing group summaries or a grid summary, this property determines what field value should be present in those summary rows. Should the field apply the user-formula to the calculated summary row, or should it apply a standard grid or group summary to the user-formula values displayed in the grid?

Default behavior may be specified at the grid level via applyFormulaAfterSummary

Returns:
Boolean

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 - Default value is null
See Also:
ListGrid.setAutoFetchDisplayMap(java.lang.Boolean)

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
See Also:
ListGrid.getAutoFetchDisplayMap()

setAutoFitWidth

public void setAutoFitWidth(Boolean autoFitWidth)
Enables autofitting to values or titles for this field.. This overrides the autoFitFieldWidths attribute on a per-field basis.

Parameters:
autoFitWidth - Default value is null

getAutoFitWidth

public Boolean getAutoFitWidth()
Enables autofitting to values or titles for this field.. This overrides the autoFitFieldWidths attribute on a per-field basis.

Returns:
Boolean

setAutoFitWidthApproach

public void setAutoFitWidthApproach(AutoFitWidthApproach autoFitWidthApproach)
When a user requests column autofitting via the header contextmenu or via a mouse gesture, what autofit approach is used. If set, this setting overrides the autoFitWidthApproach specified at the ListGrid level.

Parameters:
autoFitWidthApproach - Default value is null

getAutoFitWidthApproach

public AutoFitWidthApproach getAutoFitWidthApproach()
When a user requests column autofitting via the header contextmenu or via a mouse gesture, what autofit approach is used. If set, this setting overrides the autoFitWidthApproach specified at the ListGrid level.

Returns:
AutoFitWidthApproach

setAutoFreeze

public void setAutoFreeze(Boolean autoFreeze)
Whether this field should be automatically frozen when other fields are frozen. When true, the field will be automatically frozen to the extreme of the grid. The automatically generated checkbox, expansion and rowNumber fields are examples of fields that specify autoFreeze: true.

You can control the position of this field in the array of frozen fields by providing a ListGridField.getAutoFreezePosition implementation.

Parameters:
autoFreeze - Default value is null
See Also:
FrozenFields overview and related methods

getAutoFreeze

public Boolean getAutoFreeze()
Whether this field should be automatically frozen when other fields are frozen. When true, the field will be automatically frozen to the extreme of the grid. The automatically generated checkbox, expansion and rowNumber fields are examples of fields that specify autoFreeze: true.

You can control the position of this field in the array of frozen fields by providing a ListGridField.getAutoFreezePosition implementation.

Returns:
Boolean
See Also:
FrozenFields overview and related methods

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 - See CSSClass . Default value is null
See Also:
ListGrid.setRecordBaseStyleProperty(java.lang.String), Appearance overview and related methods, Grid cells Example

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:
See CSSClass
See Also:
ListGrid.getRecordBaseStyleProperty(), Appearance overview and related methods, Grid cells Example

setCanDragResize

public void setCanDragResize(Boolean canDragResize)
Whether this field can be dragResized using the mouse. If unset, the default behavior is governed by canResizeFields.

Parameters:
canDragResize - Default value is null

getCanDragResize

public Boolean getCanDragResize()
Whether this field can be dragResized using the mouse. If unset, the default behavior is governed by canResizeFields.

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. If not explicitly set and this grid is bound to a dataSource, the canEditFieldAttribute may be used to set default editability at the field level.

For more dynamic control over whether fields can be edited, see ListGrid.canEditCell.

Parameters:
canEdit - Default value is null
See Also:
ListGrid.setCanEdit(java.lang.Boolean), ListGrid.setRecordEditProperty(java.lang.String), ListGrid.canEditCell(int, int), Editing overview and related methods, Disable editing Example

getCanEdit

public Boolean getCanEdit()
Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level. If not explicitly set and this grid is bound to a dataSource, the canEditFieldAttribute may be used to set default editability at the field level.

For more dynamic control over whether fields can be edited, see ListGrid.canEditCell.

Returns:
Boolean
See Also:
ListGrid.getCanEdit(), ListGrid.getRecordEditProperty(), ListGrid.canEditCell(int, int), Editing overview and related methods, Disable editing Example

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 - 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

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 - Default value is null
See Also:
Disable filter Example

getCanFilter

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

Returns:
Boolean
See Also:
Disable filter Example

setCanFreeze

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

Parameters:
canFreeze - Default value is null
See Also:
ListGrid.getHeaderContextMenuItems(java.lang.Integer), FrozenFields overview and related methods

getCanFreeze

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

Returns:
Boolean
See Also:
ListGrid.getHeaderContextMenuItems(java.lang.Integer), FrozenFields overview and related methods

setCanGroupBy

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

Parameters:
canGroupBy - Default value is true
See Also:
ListGrid.groupBy(java.lang.String...)

getCanGroupBy

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

Returns:
Boolean
See Also:
ListGrid.groupBy(java.lang.String...)

setCanHide

public void setCanHide(Boolean canHide)
If set to false, this field will be omitted from the column picker that appears in the header context menu when canPickFields is enabled. This means that the end user will not be able to hide it if it's currently shown, or show it if it's currently hidden.

If this property is set to false, and the advanced field picker is shown, if the field is hidden, the field will not show in the list of available fields. If the field is visible, it will be displayed in the list of currently visible fields, but the advanced field picker user interface will disallow hiding it.

Parameters:
canHide - Default value is null
See Also:
ListGrid.getHeaderContextMenuItems(java.lang.Integer), Appearance overview and related methods

getCanHide

public Boolean getCanHide()
If set to false, this field will be omitted from the column picker that appears in the header context menu when canPickFields is enabled. This means that the end user will not be able to hide it if it's currently shown, or show it if it's currently hidden.

If this property is set to false, and the advanced field picker is shown, if the field is hidden, the field will not show in the list of available fields. If the field is visible, it will be displayed in the list of currently visible fields, but the advanced field picker user interface will disallow hiding it.

Returns:
Boolean
See Also:
ListGrid.getHeaderContextMenuItems(java.lang.Integer), Appearance overview and related methods

setCanHilite

public void setCanHilite(Boolean canHilite)
Determines whether this field can be hilited. Set to false to prevent this field from appearing in HiliteEditor.

Parameters:
canHilite - Default value is null

getCanHilite

public Boolean getCanHilite()
Determines whether this field can be hilited. Set to false to prevent this field from appearing in HiliteEditor.

Returns:
Boolean

setCanReorder

public void setCanReorder(Boolean canReorder)
Whether this field can be reordered using the mouse. If unset, the default behavior is governed by canReorderFields. Note that setting this property to false will lock this field from being moved - that is, the user is prevented from moving this field directly by dragging with the mouse, or by dropping another field onto this field. However, unless this field is at the extreme edge of the grid, or all fields between it and the extreme edge of the grid are also canReorder: false, (ie, if there are unlocked fields on either side of this field), then it is possible that this locked field may be reordered automatically, as a result of the user dragging one unlocked field onto another unlocked field.

Parameters:
canReorder - Default value is null

getCanReorder

public Boolean getCanReorder()
Whether this field can be reordered using the mouse. If unset, the default behavior is governed by canReorderFields. Note that setting this property to false will lock this field from being moved - that is, the user is prevented from moving this field directly by dragging with the mouse, or by dropping another field onto this field. However, unless this field is at the extreme edge of the grid, or all fields between it and the extreme edge of the grid are also canReorder: false, (ie, if there are unlocked fields on either side of this field), then it is possible that this locked field may be reordered automatically, as a result of the user dragging one unlocked field onto another unlocked field.

Returns:
Boolean

setCanSort

public void setCanSort(Boolean canSort)
Enables or disables sorting by this column. If false, interactive sorting via header-clicks or menu-items will have no effect, but direct scripted calls to sort() or setSort() will work as expected.

Parameters:
canSort - Default value is true
See Also:
ListGrid.sort(), ListGrid.setCanSort(java.lang.Boolean)

getCanSort

public Boolean getCanSort()
Enables or disables sorting by this column. If false, interactive sorting via header-clicks or menu-items will have no effect, but direct scripted calls to sort() or setSort() will work as expected.

Returns:
Boolean
See Also:
ListGrid.sort(), ListGrid.getCanSort()

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 - 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

setCanToggle

public void setCanToggle(Boolean canToggle)
Allows a boolean or valueMapped field to be edited without going into edit mode. When this attribute is set, 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. For boolean type fields canToggle is true by default, meaning setting canEdit to true implies the user can toggle the value via a single click without going into edit mode. You can disable this by explicitly setting canToggle to false for a boolean field.
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 - Default value is varies
See Also:
Editing overview and related methods

getCanToggle

public Boolean getCanToggle()
Allows a boolean or valueMapped field to be edited without going into edit mode. When this attribute is set, 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. For boolean type fields canToggle is true by default, meaning setting canEdit to true implies the user can toggle the value via a single click without going into edit mode. You can disable this by explicitly setting canToggle to false for a boolean field.
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
See Also:
Editing overview and related methods

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 - Default value is null
See Also:
Appearance overview and related methods

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
See Also:
Appearance overview and related methods

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.

To change this property after fields have been passed to ListGrid.setFields, use ListGrid.setFieldCellIcon.

Parameters:
cellIcon - See SCImgURL . 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.

To change this property after fields have been passed to ListGrid.setFields, use ListGrid.setFieldCellIcon.

Returns:
See SCImgURL

setDataPath

public void setDataPath(String dataPath)
dataPath for this field. This property allows the grid to display details of nested data structures in a flat list of columns.

Note : This is an advanced setting

Parameters:
dataPath - Default value is null

getDataPath

public String getDataPath()
dataPath for this field. This property allows the grid to display details of nested data structures in a flat list of columns.

Returns:
String

setDateFormatter

public void setDateFormatter(DateDisplayFormat dateFormatter)
Display format to use for date type values within this field.

The timeFormatter may also be used to format underlying Date values as times (ommitting the date part entirely). If both dateFormatter and timeFormatter are specified on a field, for fields specified as type "time" the timeFormatter will be used, otherwise the dateFormatter

If field.dateFormatter and field.timeFormatter is unspecified, date display format may be defined at the component level via ListGrid.dateFormatter, or for fields of type "datetime" ListGrid.datetimeFormatter. Otherwise the default is to use the system-wide default short date format, configured via Date.setShortDisplayFormat. Specify any valid DateDisplayFormat to change the format used by this item.

If this field is editable the dateFormatter will also be passed to the editor created to edit this field. Note that you can also specify an explicit inputFormat which will be passed through to the editor as well, though this is not typically required as the input format should be automatically derived by the Smart GWT system for standard DateDisplayFormats.

Parameters:
dateFormatter - Default value is null
See Also:
ListGrid.setDateFormatter(com.smartgwt.client.types.DateDisplayFormat), ListGrid.setDatetimeFormatter(com.smartgwt.client.types.DateDisplayFormat), setTimeFormatter(com.smartgwt.client.types.TimeDisplayFormat)

getDateFormatter

public DateDisplayFormat getDateFormatter()
Display format to use for date type values within this field.

The timeFormatter may also be used to format underlying Date values as times (ommitting the date part entirely). If both dateFormatter and timeFormatter are specified on a field, for fields specified as type "time" the timeFormatter will be used, otherwise the dateFormatter

If field.dateFormatter and field.timeFormatter is unspecified, date display format may be defined at the component level via ListGrid.dateFormatter, or for fields of type "datetime" ListGrid.datetimeFormatter. Otherwise the default is to use the system-wide default short date format, configured via Date.setShortDisplayFormat. Specify any valid DateDisplayFormat to change the format used by this item.

If this field is editable the dateFormatter will also be passed to the editor created to edit this field. Note that you can also specify an explicit inputFormat which will be passed through to the editor as well, though this is not typically required as the input format should be automatically derived by the Smart GWT system for standard DateDisplayFormats.

Returns:
DateDisplayFormat
See Also:
ListGrid.getDateFormatter(), ListGrid.getDatetimeFormatter(), getTimeFormatter()

setDecimalPad

public void setDecimalPad(Integer decimalPad)
Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.

For example, a field value of 343.1, 343.104 and 343.09872677 would all be shown as 343.10 if decimalPad is 2.

The original unpadded value is always shown when the value is edited.

Parameters:
decimalPad - Default value is null
See Also:
Appearance overview and related methods

getDecimalPad

public Integer getDecimalPad()
Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.

For example, a field value of 343.1, 343.104 and 343.09872677 would all be shown as 343.10 if decimalPad is 2.

The original unpadded value is always shown when the value is edited.

Returns:
Integer
See Also:
Appearance overview and related methods

setDecimalPrecision

public void setDecimalPrecision(Integer decimalPrecision)
Applies only to fields of type "float" and affects how many significant digits are shown.

For example, with decimalPrecision 3, if the field value is 343.672677, 343.673 is shown.

If the value is 125.2, 125.2 is shown - decimalPrecision will not cause extra zeros to be added. Use decimalPad for this.

A number is always shown with its original precision when edited.

Parameters:
decimalPrecision - Default value is null
See Also:
Appearance overview and related methods

getDecimalPrecision

public Integer getDecimalPrecision()
Applies only to fields of type "float" and affects how many significant digits are shown.

For example, with decimalPrecision 3, if the field value is 343.672677, 343.673 is shown.

If the value is 125.2, 125.2 is shown - decimalPrecision will not cause extra zeros to be added. Use decimalPad for this.

A number is always shown with its original precision when edited.

Returns:
Integer
See Also:
Appearance overview and related methods

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 - 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

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 - Default value is null
See Also:
setIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...), Editing overview and related methods

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
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getIcons, Editing overview and related methods

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.types.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. This sample illustrates this approach achieved via a server-side SQL join.

The display value for a record with a specified displayField can be picked up via ListGrid.getDisplayValue.

Parameters:
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.types.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. This sample illustrates this approach achieved via a server-side SQL join.

The display value for a record with a specified displayField can be picked up via ListGrid.getDisplayValue.

Returns:
String

setDisplayValueFromRecord

public void setDisplayValueFromRecord(Boolean displayValueFromRecord)
If a displayField is set, should this field show record values from the displayField?

If displayField is specified, and there is no separate optionDataSource, by default we will show display-field values from the same record. Setting this property to false would disable this behavior.

Alternatively, if there is a optionDataSource (and autoFetchDisplayMap is false), the displayField would be ignored for the field and the underlying record[fieldName] value would be displayed to the user. This property may be set to true to override this behavior and pick up values from the displayField for display in this field even when there is an optionDataSource set.

Note that this property has no effect on fields with an explicitly specified valueMap, or with an optionDataSource where autoFetchDisplayMap is true.

Note : This is an advanced setting

Parameters:
displayValueFromRecord - Default value is null

getDisplayValueFromRecord

public Boolean getDisplayValueFromRecord()
If a displayField is set, should this field show record values from the displayField?

If displayField is specified, and there is no separate optionDataSource, by default we will show display-field values from the same record. Setting this property to false would disable this behavior.

Alternatively, if there is a optionDataSource (and autoFetchDisplayMap is false), the displayField would be ignored for the field and the underlying record[fieldName] value would be displayed to the user. This property may be set to true to override this behavior and pick up values from the displayField for display in this field even when there is an optionDataSource set.

Note that this property has no effect on fields with an explicitly specified valueMap, or with an optionDataSource where autoFetchDisplayMap is true.

Returns:
Boolean

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 - Default value is null
See Also:
setIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...), Editing overview and related methods

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
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getIcons, Editing overview and related methods

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 - Default value is null
See Also:
setIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...), Editing overview and related methods

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
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getIcons, Editing overview and related methods

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 - Default value is null
See Also:
Editing overview and related methods

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
See Also:
Editing overview and related methods

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 - Default value is null
See Also:
Editing overview and related methods

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
See Also:
Editing overview and related methods

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 - Default value is null
See Also:
ImageColumns overview and related methods

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
See Also:
ImageColumns overview and related methods

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 - Default value is null
See Also:
ImageColumns overview and related methods

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
See Also:
ImageColumns overview and related methods

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 - See HTMLString . Default value is "&nbsp;"
See Also:
ListGrid.setEmptyCellValue(java.lang.String), Empty values Example

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:
See HTMLString
See Also:
ListGrid.getEmptyCellValue(), Empty values Example

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 - Default value is "done"
See Also:
Editing overview and related methods

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
See Also:
Editing overview and related methods

setEscapeHTML

public void setEscapeHTML(Boolean escapeHTML)
By default HTML values in ListGrid cells will be interpreted by the browser. Setting this flag to true will causes HTML characters to be escaped, meaning the raw value of the field (for example "<b>AAA</b>") is displayed to the user rather than the interpreted HTML (for example "AAA")

Parameters:
escapeHTML - Default value is null

getEscapeHTML

public Boolean getEscapeHTML()
By default HTML values in ListGrid cells will be interpreted by the browser. Setting this flag to true will causes HTML characters to be escaped, meaning the raw value of the field (for example "<b>AAA</b>") is displayed to the user rather than the interpreted HTML (for example "AAA")

Returns:
Boolean

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 - Default value is "cancel"
See Also:
Editing overview and related methods

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
See Also:
Editing overview and related methods

setExportFieldWidth

public void setExportFieldWidth(boolean exportFieldWidth)
When exporting data to Excel/OpenOffice format using ListGrid.exportData or ListGrid.exportClientData with exportFieldWidths set, set this flag false to cause this field to "opt out" of width export. Fields that opt out in this way have the corresponding spreadsheet column autosized (ie, made just wide enough that content is not clipped).

This setting has no effect if listGrid.exportFieldWidths is not set.

Parameters:
exportFieldWidth - Default value is true

getExportFieldWidth

public boolean getExportFieldWidth()
When exporting data to Excel/OpenOffice format using ListGrid.exportData or ListGrid.exportClientData with exportFieldWidths set, set this flag false to cause this field to "opt out" of width export. Fields that opt out in this way have the corresponding spreadsheet column autosized (ie, made just wide enough that content is not clipped).

This setting has no effect if listGrid.exportFieldWidths is not set.

Returns:
boolean

setExportFormat

public void setExportFormat(String exportFormat)
FormatString used during exports for numeric or date formatting. See exportFormat.

Parameters:
exportFormat - See FormatString . Default value is null
See Also:
ExportFormatting overview and related methods

getExportFormat

public String getExportFormat()
FormatString used during exports for numeric or date formatting. See exportFormat.

Returns:
See FormatString
See Also:
ExportFormatting overview and related methods

setExportRawValues

public void setExportRawValues(Boolean exportRawValues)
Dictates whether the data in this field should be exported raw by exportClientData(). If set to true for a field, the values in the field-formatters will not be executed for data in this field. Decreases the time taken for large exports.

Parameters:
exportRawValues - Default value is null

getExportRawValues

public Boolean getExportRawValues()
Dictates whether the data in this field should be exported raw by exportClientData(). If set to true for a field, the values in the field-formatters will not be executed for data in this field. Decreases the time taken for large exports.

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 - 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

setFilterOperator

public void setFilterOperator(OperatorId filterOperator)
With the FilterEditor showing, the Operator to use when matching values for this field.

Note that you can set all FilterEditor fields to default to either substring or exact match via autoFetchTextMatchStyle, but if you want a mix of exact vs substring match on different fields, you need to use this property, and your ListGrid will produce AdvancedCriteria rather than the simpler Criteria format. This is automatically and transparently handled by the Smart GWT Server's SQLDataSource and HibernateDataSource in Power Edition or above, but if you have your own filtering implementation, it will need to be able to handle AdvancedCriteria.

Parameters:
filterOperator - Default value is null

getFilterOperator

public OperatorId getFilterOperator()
With the FilterEditor showing, the Operator to use when matching values for this field.

Note that you can set all FilterEditor fields to default to either substring or exact match via autoFetchTextMatchStyle, but if you want a mix of exact vs substring match on different fields, you need to use this property, and your ListGrid will produce AdvancedCriteria rather than the simpler Criteria format. This is automatically and transparently handled by the Smart GWT Server's SQLDataSource and HibernateDataSource in Power Edition or above, but if you have your own filtering implementation, it will need to be able to handle AdvancedCriteria.

Returns:
OperatorId

setFormat

public void setFormat(String format)
FormatString for numeric or date formatting. See format.

Parameters:
format - See FormatString . Default value is null
See Also:
ExportFormatting overview and related methods

getFormat

public String getFormat()
FormatString for numeric or date formatting. See format.

Returns:
See FormatString
See Also:
ExportFormatting overview and related methods

setFrozen

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

Parameters:
frozen - Default value is null
See Also:
FrozenFields overview and related methods

getFrozen

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

Returns:
Boolean
See Also:
FrozenFields overview and related methods

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 - 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

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 - 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

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 grouping is enabled, 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, field.groupingMode is set to the user's chosen mode, and this choice can be detected via the field parameter to 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 declarations, and the different grouping modes that are offered automatically for various common types are defined this way.

Parameters:
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 grouping is enabled, 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, field.groupingMode is set to the user's chosen mode, and this choice can be detected via the field parameter to 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 declarations, and the different grouping modes that are offered automatically for various common types are defined this way.

Returns:
Map

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 - 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

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 - See CSSClass . Default value is null
See Also:
Appearance overview and related methods

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:
See CSSClass
See Also:
Appearance overview and related methods

setHeaderTitle

public void setHeaderTitle(String headerTitle)
Optional title for the header button for this field. If specified this will be displayed in the header button instead of title or name. Set to an empty string to suppress the title in the header button entirely.

Parameters:
headerTitle - Default value is null
See Also:
setTitle(java.lang.String), Appearance overview and related methods

getHeaderTitle

public String getHeaderTitle()
Optional title for the header button for this field. If specified this will be displayed in the header button instead of title or name. Set to an empty string to suppress the title in the header button entirely.

Returns:
String
See Also:
getTitle(), Appearance overview and related methods

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 - See CSSClass . Default value is null
See Also:
Appearance overview and related methods

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:
See CSSClass
See Also:
Appearance overview and related methods

setHidden

public void setHidden(Boolean hidden)
Marks field as initially hidden.
The user will still be able to show the field via a context menu. This may be suppressed by setting canHide to false, or by setting canPickFields to false to suppress the field-picker entirely.

To mark a field as completely hidden (not shown to a user at all, in any component), set hidden instead.

Parameters:
hidden - Default value is null
See Also:
Appearance overview and related methods

getHidden

public Boolean getHidden()
Marks field as initially hidden.
The user will still be able to show the field via a context menu. This may be suppressed by setting canHide to false, or by setting canPickFields to false to suppress the field-picker entirely.

To mark a field as completely hidden (not shown to a user at all, in any component), set hidden instead.

Returns:
Boolean
See Also:
Appearance overview and related methods

setHiliteHTMLAfterFormat

public void setHiliteHTMLAfterFormat(Boolean hiliteHTMLAfterFormat)
If set to true, custom HTML applied as part of hiliting will be applied after formatting for each cell in this column. If false, hilite HTML will be applied before formatting.

This attribute overrides hiliteHTMLAfterFormat as defined at the component level.

Parameters:
hiliteHTMLAfterFormat - Default value is null

getHiliteHTMLAfterFormat

public Boolean getHiliteHTMLAfterFormat()
If set to true, custom HTML applied as part of hiliting will be applied after formatting for each cell in this column. If false, hilite HTML will be applied before formatting.

This attribute overrides hiliteHTMLAfterFormat as defined at the component level.

Returns:
Boolean

setHiliteIconHeight

public void setHiliteIconHeight(Integer hiliteIconHeight)
Height for hilite icons for this field. Overrides hiliteIconSize, hiliteIconHeight, and hiliteIconSize.

Parameters:
hiliteIconHeight - Default value is null
See Also:
Hiliting overview and related methods

getHiliteIconHeight

public Integer getHiliteIconHeight()
Height for hilite icons for this field. Overrides hiliteIconSize, hiliteIconHeight, and hiliteIconSize.

Returns:
Integer
See Also:
Hiliting overview and related methods

setHiliteIconLeftPadding

public void setHiliteIconLeftPadding(Integer hiliteIconLeftPadding)
How much padding should there be on the left of hilite icons for this field? Overrides hiliteIconLeftPadding

Parameters:
hiliteIconLeftPadding - Default value is null
See Also:
Hiliting overview and related methods

getHiliteIconLeftPadding

public Integer getHiliteIconLeftPadding()
How much padding should there be on the left of hilite icons for this field? Overrides hiliteIconLeftPadding

Returns:
Integer
See Also:
Hiliting overview and related methods

setHiliteIconPosition

public void setHiliteIconPosition(HiliteIconPosition hiliteIconPosition)
When hiliteIcons are present, where the hilite icon will be placed relative to the field value. See HiliteIconPosition. Overrides hiliteIconPosition.

Parameters:
hiliteIconPosition - Default value is null
See Also:
Hiliting overview and related methods

getHiliteIconPosition

public HiliteIconPosition getHiliteIconPosition()
When hiliteIcons are present, where the hilite icon will be placed relative to the field value. See HiliteIconPosition. Overrides hiliteIconPosition.

Returns:
HiliteIconPosition
See Also:
Hiliting overview and related methods

setHiliteIconRightPadding

public void setHiliteIconRightPadding(Integer hiliteIconRightPadding)
How much padding should there be on the right of hilite icons for this field? Overrides hiliteIconRightPadding

Parameters:
hiliteIconRightPadding - Default value is null
See Also:
Hiliting overview and related methods

getHiliteIconRightPadding

public Integer getHiliteIconRightPadding()
How much padding should there be on the right of hilite icons for this field? Overrides hiliteIconRightPadding

Returns:
Integer
See Also:
Hiliting overview and related methods

setHiliteIconSize

public void setHiliteIconSize(Integer hiliteIconSize)
Default width and height of hilite icons in this field. Takes precedence over hiliteIconWidth, hiliteIconHeight and hiliteIconSize specified at the component level. Can be overridden via hiliteIconWidth and hiliteIconHeight

Parameters:
hiliteIconSize - Default value is null
See Also:
ListGrid.setHiliteIconSize(int), setHiliteIconWidth(java.lang.Integer), setHiliteIconHeight(java.lang.Integer), Hiliting overview and related methods

getHiliteIconSize

public Integer getHiliteIconSize()
Default width and height of hilite icons in this field. Takes precedence over hiliteIconWidth, hiliteIconHeight and hiliteIconSize specified at the component level. Can be overridden via hiliteIconWidth and hiliteIconHeight

Returns:
Integer
See Also:
ListGrid.getHiliteIconSize(), getHiliteIconWidth(), getHiliteIconHeight(), Hiliting overview and related methods

setHiliteIconWidth

public void setHiliteIconWidth(Integer hiliteIconWidth)
Width for hilite icons for this field. Overrides hiliteIconSize, hiliteIconWidth, and hiliteIconSize.

Parameters:
hiliteIconWidth - Default value is null
See Also:
Hiliting overview and related methods

getHiliteIconWidth

public Integer getHiliteIconWidth()
Width for hilite icons for this field. Overrides hiliteIconSize, hiliteIconWidth, and hiliteIconSize.

Returns:
Integer
See Also:
Hiliting overview and related methods

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.

To change this property after fields have been passed to ListGrid.setFields, use ListGrid.setFieldIcon.

Parameters:
icon - See SCImgURL . 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.

To change this property after fields have been passed to ListGrid.setFields, use ListGrid.setFieldIcon.

Returns:
See SCImgURL

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 - Default value is null
See Also:
setIcon(java.lang.String), setIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...)

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
See Also:
getIcon(), com.smartgwt.client.widgets.grid.ListGridField#getIcons

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 - Default value is "left"
See Also:
setIcon(java.lang.String)

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
See Also:
getIcon()

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 - Default value is null
See Also:
Editing overview and related methods

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 - Default value is null
See Also:
setIcon(java.lang.String)

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
See Also:
getIcon()

setIconSpacing

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

Parameters:
iconSpacing - Default value is 6
See Also:
setIcon(java.lang.String), ButtonIcon overview and related methods

getIconSpacing

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

Returns:
int
See Also:
getIcon(), ButtonIcon overview and related methods

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 - Default value is null
See Also:
setIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...), Editing overview and related methods

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
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getIcons, Editing overview and related methods

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 - Default value is null
See Also:
setIcon(java.lang.String), setIcons(com.smartgwt.client.widgets.form.fields.FormItemIcon...)

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
See Also:
getIcon(), com.smartgwt.client.widgets.grid.ListGridField#getIcons

setIgnoreKeyboardClicks

public void setIgnoreKeyboardClicks(Boolean ignoreKeyboardClicks)
If the user is navigating through the grid using the keyboard, record click or double click events may be generated via keyboard interactions (see generateClickOnSpace, generateClickOnEnter, generateDoubleClickOnSpace, generateDoubleClickOnEnter and arrowKeyAction).

These synthetic events have both a target row and column. Setting this flag to true ensures that this field will never be considered the target for a keyboard click event.

Parameters:
ignoreKeyboardClicks - Default value is null

getIgnoreKeyboardClicks

public Boolean getIgnoreKeyboardClicks()
If the user is navigating through the grid using the keyboard, record click or double click events may be generated via keyboard interactions (see generateClickOnSpace, generateClickOnEnter, generateDoubleClickOnSpace, generateDoubleClickOnEnter and arrowKeyAction).

These synthetic events have both a target row and column. Setting this flag to true ensures that this field will never be considered the target for a keyboard click event.

Returns:
Boolean

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 height of the image.

Parameters:
imageHeight - Default value is 16
See Also:
ListGrid.setImageSize(int), setImageSize(int), setImageWidth(int), ImageColumns overview and related methods

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 height of the image.

Returns:
int
See Also:
ListGrid.getImageSize(), getImageSize(), getImageWidth(), ImageColumns overview and related methods

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 - Default value is 16
See Also:
setImageWidth(int), setImageHeight(int), ImageColumns overview and related methods

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
See Also:
getImageWidth(), getImageHeight(), ImageColumns overview and related methods

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 - Default value is null
See Also:
ImageColumns overview and related methods, Image Example

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
See Also:
ImageColumns overview and related methods, Image Example

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 - Default value is null
See Also:
ImageColumns overview and related methods, Image Example

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
See Also:
ImageColumns overview and related methods, Image Example

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 - Default value is 16
See Also:
ListGrid.setImageSize(int), setImageSize(int), setImageHeight(int), ImageColumns overview and related methods

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
See Also:
ListGrid.getImageSize(), getImageSize(), getImageHeight(), ImageColumns overview and related methods

setIncludeFrom

public void setIncludeFrom(String includeFrom)
Indicates this field's values should be fetched from another, related DataSource. The individual field will inherit settings such as field.type and field.title from the related DataSource just like fields from the primary DataSource.

When fechData() is called, the automatically created DSRequest will specify additionalOutputs requesting the field, and any Criteria generated by the component will likewise refer to the field from the related DataSource.

It's an error to use this property if the ListGrid does not have a DataSource at all. The related DataSource must be loaded or a warning will be logged and the field definition ignored.

This value is expected to be set to the following format dataSourceID.fieldName where dataSourceID is the ID of the related dataSource and fieldName is the name of the field from that dataSource from which you wish to retrieve values. Note that if this property is set and field.name is not explicitly specified, this field's name will default to the fieldName value from this property.

Note about automatic cache updates: "update" and "add" operations submitted automatically by this ListGrid will include dsRequest.additionalOutputs to ensure all data necessary for cache updates is returned by the server.

If your grid shows data that can be edited elsewhere in the UI (not by inline editing), to avoid problems with ResultSet automatic cache synchronization, you may need to switch from using listGridField.includeFrom to dataSourceField.includeFrom. This is because server responses to "add" and "update" operations which are initiated outside of this grid do not know about the listGridField.includeFrom setting, and so will not automatically return data for fields included in this way. Switching to dataSourceField.includeFrom ensures the field is always included in server responses, avoiding the issue.

Parameters:
includeFrom - Default value is null

getIncludeFrom

public String getIncludeFrom()
Indicates this field's values should be fetched from another, related DataSource. The individual field will inherit settings such as field.type and field.title from the related DataSource just like fields from the primary DataSource.

When fechData() is called, the automatically created DSRequest will specify additionalOutputs requesting the field, and any Criteria generated by the component will likewise refer to the field from the related DataSource.

It's an error to use this property if the ListGrid does not have a DataSource at all. The related DataSource must be loaded or a warning will be logged and the field definition ignored.

This value is expected to be set to the following format dataSourceID.fieldName where dataSourceID is the ID of the related dataSource and fieldName is the name of the field from that dataSource from which you wish to retrieve values. Note that if this property is set and field.name is not explicitly specified, this field's name will default to the fieldName value from this property.

Note about automatic cache updates: "update" and "add" operations submitted automatically by this ListGrid will include dsRequest.additionalOutputs to ensure all data necessary for cache updates is returned by the server.

If your grid shows data that can be edited elsewhere in the UI (not by inline editing), to avoid problems with ResultSet automatic cache synchronization, you may need to switch from using listGridField.includeFrom to dataSourceField.includeFrom. This is because server responses to "add" and "update" operations which are initiated outside of this grid do not know about the listGridField.includeFrom setting, and so will not automatically return data for fields included in this way. Switching to dataSourceField.includeFrom ensures the field is always included in server responses, avoiding the issue.

Returns:
String

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 - 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

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 - Default value is null
See Also:
ListGrid.setCanRemoveRecords(java.lang.Boolean)

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
See Also:
ListGrid.getCanRemoveRecords()

setLeaveHeaderMenuButtonSpace

public void setLeaveHeaderMenuButtonSpace(Boolean leaveHeaderMenuButtonSpace)
If showHeaderMenuButton is true, when auto-fitting fields to the title width via autoFitFieldWidths or autoFitWidth, should the button be sized such that there is enough space for the heeader menu button to show without covering the field title?

May be explicitly specified at the field level or at the grid level. If not explicitly specified space will be left for fields with align set to "left" or "right", but not for fields with align set to "center".

Note : This is an advanced setting

Parameters:
leaveHeaderMenuButtonSpace - Default value is null

setLinkText

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

This property sets linkText that will be the same for all records. You can set linkText on a per-record basis via linkText.

Parameters:
linkText - Default value is null
See Also:
ListGridFieldType, FieldType, ListGridRecord.setLinkText(java.lang.String), ListGrid.setLinkTextProperty(java.lang.String), setLinkTextProperty(java.lang.String), Link (image) Example

getLinkText

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

This property sets linkText that will be the same for all records. You can set linkText on a per-record basis via linkText.

Returns:
String
See Also:
ListGridFieldType, FieldType, ListGridRecord.getLinkText(), ListGrid.getLinkTextProperty(), getLinkTextProperty(), Link (image) Example

setLinkTextProperty

public void setLinkTextProperty(String linkTextProperty)
Name of the property in a ListGridRecord that holds the HTML to display in cells of this field if the fieldType is set to "link".

Parameters:
linkTextProperty - Default value is null
See Also:
ListGridFieldType, FieldType, ListGridRecord.setLinkText(java.lang.String), setLinkText(java.lang.String), ListGrid.setLinkTextProperty(java.lang.String)

getLinkTextProperty

public String getLinkTextProperty()
Name of the property in a ListGridRecord that holds the HTML to display in cells of this field if the fieldType is set to "link".

Returns:
String
See Also:
ListGridFieldType, FieldType, ListGridRecord.getLinkText(), getLinkText(), ListGrid.getLinkTextProperty()

setLinkURLPrefix

public void setLinkURLPrefix(String linkURLPrefix)
If this field has type [ListGridFieldType] set to "link", setting this property will apply a standard prefix to the link URL for cells in this field.

Note : This is an advanced setting

Parameters:
linkURLPrefix - Default value is null

getLinkURLPrefix

public String getLinkURLPrefix()
If this field has type [ListGridFieldType] set to "link", setting this property will apply a standard prefix to the link URL for cells in this field.

Returns:
String

setLinkURLSuffix

public void setLinkURLSuffix(String linkURLSuffix)
If this field has type [ListGridFieldType] set to "link", setting this property will apply a standard suffix to the link URL for cells in this field.

Note : This is an advanced setting

Parameters:
linkURLSuffix - Default value is null

getLinkURLSuffix

public String getLinkURLSuffix()
If this field has type [ListGridFieldType] set to "link", setting this property will apply a standard suffix to the link URL for cells in this field.

Returns:
String

setMultiple

public void setMultiple(Boolean multiple)
Indicates that this field should always be Array-valued. This property will be passed through to the generated edit-item when editing the field - so if valueMap is set, the default editor will be a SelectItem with multiple set to true.

Note that for databound grids it typically makes sense to set multiple rather than setting the property directly on the ListGridField object.

Parameters:
multiple - Default value is null
See Also:
Editing overview and related methods

getMultiple

public Boolean getMultiple()
Indicates that this field should always be Array-valued. This property will be passed through to the generated edit-item when editing the field - so if valueMap is set, the default editor will be a SelectItem with multiple set to true.

Note that for databound grids it typically makes sense to set multiple rather than setting the property directly on the ListGridField object.

Returns:
Boolean
See Also:
Editing overview and related methods

setName

public void setName(String name)
Name of this field. Must be unique within this ListGrid as well as a valid JavaScript identifier, as specified by ECMA-262 Section 7.6 (the StringUtil.isValidID() function can be used to test whether a name is a valid JavaScript identifier).

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 - Default value is null

getName

public String getName()
Name of this field. Must be unique within this ListGrid as well as a valid JavaScript identifier, as specified by ECMA-262 Section 7.6 (the StringUtil.isValidID() function can be used to test whether a name is a valid JavaScript identifier).

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

setOptionCriteria

public void setOptionCriteria(Criteria optionCriteria)
If optionDataSource is set for this ListGridField, criteria specified in this attribute will be passed to the dataSource when performing the fetch operation to determine data-value to display-value mappings

Parameters:
optionCriteria - Default value is null

getOptionCriteria

public Criteria getOptionCriteria()
If optionDataSource is set for this ListGridField, criteria specified in this attribute will be passed to the dataSource when performing the fetch operation to determine data-value to display-value mappings

Returns:
Criteria

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 - 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

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 this field's valueMap.

Parameters:
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 this field's valueMap.

Returns:
TextMatchStyle

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 - 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

setPrompt

public void setPrompt(String prompt)
Causes a tooltip hover to appear on the header generated for this field (effectively sets prompt for the header).

Parameters:
prompt - Default value is null

getPrompt

public String getPrompt()
Causes a tooltip hover to appear on the header generated for this field (effectively sets prompt for the header).

Returns:
String

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 - Default value is null
See Also:
setValidators(com.smartgwt.client.widgets.form.validator.Validator...), GridValidation overview and related methods

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
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getValidators, GridValidation overview and related methods

setShouldPrint

public void setShouldPrint(Boolean shouldPrint)
Whether this field should be included in the printable representation of the grid.

Parameters:
shouldPrint - Default value is null
See Also:
Printing overview and related methods

getShouldPrint

public Boolean getShouldPrint()
Whether this field should be included in the printable representation of the grid.

Returns:
Boolean
See Also:
Printing overview and related methods

setShowAlternateStyle

public void setShowAlternateStyle(Boolean showAlternateStyle)
When set to false, don't apply alternate-row styling to this field.

Note : This is an advanced setting

Parameters:
showAlternateStyle - Default value is null

getShowAlternateStyle

public Boolean getShowAlternateStyle()
When set to false, don't apply alternate-row styling to this field.

Returns:
Boolean

setShowDefaultContextMenu

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

Parameters:
showDefaultContextMenu - Default value is true

getShowDefaultContextMenu

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

Returns:
Boolean

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 - Default value is true
See Also:
setIcon(java.lang.String), ButtonIcon overview and related methods

getShowDisabledIcon

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

Returns:
Boolean
See Also:
getIcon(), ButtonIcon overview and related methods

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 - Default value is false
See Also:
setIcon(java.lang.String), ButtonIcon overview and related methods

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
See Also:
getIcon(), ButtonIcon overview and related methods

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 - 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

setShowFocusedIcon

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

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

Parameters:
showFocusedIcon - Default value is false
See Also:
setIcon(java.lang.String), ButtonIcon overview and related methods

getShowFocusedIcon

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

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

Returns:
Boolean
See Also:
getIcon(), ButtonIcon overview and related methods

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 default summary function is defined for the specified field type.

Parameters:
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 default summary function 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 default summary function is defined for the specified field type.

Parameters:
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 default summary function is defined for the specified field type.

Returns:
Boolean

setShowHilitesInGroupSummary

public void setShowHilitesInGroupSummary(Boolean showHilitesInGroupSummary)
Determines whether hiliting for this field is shown in a group summary. Set to false to prevent this field from showing hilite in a group summary.

All hilites in group summary rows can be controlled with the showHilitesInGroupSummary property.

Parameters:
showHilitesInGroupSummary - Default value is null

getShowHilitesInGroupSummary

public Boolean getShowHilitesInGroupSummary()
Determines whether hiliting for this field is shown in a group summary. Set to false to prevent this field from showing hilite in a group summary.

All hilites in group summary rows can be controlled with the showHilitesInGroupSummary property.

Returns:
Boolean

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 field.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 - Default value is null
See Also:
Value hover tips Example

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 field.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
See Also:
Value hover tips Example

setShowRollOverIcon

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

Parameters:
showRollOverIcon - Default value is false
See Also:
setIcon(java.lang.String), ButtonIcon overview and related methods

getShowRollOverIcon

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

Returns:
Boolean
See Also:
getIcon(), ButtonIcon overview and related methods

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 - Default value is false
See Also:
setIcon(java.lang.String), ButtonIcon overview and related methods

getShowSelectedIcon

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

Returns:
Boolean
See Also:
getIcon(), ButtonIcon overview and related methods

setShowTitle

public void setShowTitle(Boolean showTitle)
This property may be set to false to explicitly suppress display of the field title in the column header button for the field.

Parameters:
showTitle - Default value is null

getShowTitle

public Boolean getShowTitle()
This property may be set to false to explicitly suppress display of the field title in the column header button for the field.

Returns:
Boolean

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 - Default value is null
See Also:
setValueIcons(java.util.Map), setSuppressValueIcon(java.lang.Boolean), ImageColumns overview and related methods

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
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons, getSuppressValueIcon(), ImageColumns overview and related methods

setSortByDisplayField

public void setSortByDisplayField(Boolean sortByDisplayField)
For a field with displayField configured, should client-side sorting be performed on the display field value? Unless explicitly set to false the display field value is used.

Parameters:
sortByDisplayField - Default value is null

getSortByDisplayField

public Boolean getSortByDisplayField()
For a field with displayField configured, should client-side sorting be performed on the display field value? Unless explicitly set to false the display field value is used.

Returns:
Boolean

setSortByMappedValue

public void setSortByMappedValue(Boolean sortByMappedValue)
If valueMap is set, and the grid is sorted by this field, should the data be sorted by the underlying data value or the mapped display value. If unset, will sort by display value. Set to false to sort by underlying data value. Note that this has no effect if a ListGridField.sortNormalizer has been specified.

Parameters:
sortByMappedValue - Default value is null

getSortByMappedValue

public Boolean getSortByMappedValue()
If valueMap is set, and the grid is sorted by this field, should the data be sorted by the underlying data value or the mapped display value. If unset, will sort by display value. Set to false to sort by underlying data value. Note that this has no effect if a ListGridField.sortNormalizer has been specified.

Returns:
Boolean

setSortDirection

public void setSortDirection(SortDirection sortDirection)
Specifies the default sorting direction for this column. If specified on the default sort field 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 - Default value is null
See Also:
SortDirection

getSortDirection

public SortDirection getSortDirection()
Specifies the default sorting direction for this column. If specified on the default sort field 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
See Also:
SortDirection

setSummaryTitle

public void setSummaryTitle(String summaryTitle)
Deprecated. Rather than customizing the summaryTitle developers should typically use the headerTitle attribute to show a different title in the column header button than the title used elsewhere.

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 - Default value is null
See Also:
setTitle(java.lang.String), Appearance overview and related methods

getSummaryTitle

public String getSummaryTitle()
Deprecated. Rather than customizing the summaryTitle developers should typically use the headerTitle attribute to show a different title in the column header button than the title used elsewhere.

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.
See Also:
getTitle(), Appearance overview and related methods

setSummaryValue

public void setSummaryValue(String summaryValue)
The value to display for a ListGridField when it appears in the summaryRow. The default for normal fields is null and for special fields, like the checkboxField, the default is to show a blank value (a non-breaking space).

Parameters:
summaryValue - See HTMLString . Default value is null

getSummaryValue

public String getSummaryValue()
The value to display for a ListGridField when it appears in the summaryRow. The default for normal fields is null and for special fields, like the checkboxField, the default is to show a blank value (a non-breaking space).

Returns:
See HTMLString

setSummaryValueTitle

public void setSummaryValueTitle(String summaryValueTitle)
If showGridSummary or showGroupSummary is true and the summaryFunction is set to "title", this attribute may be set to a string to display in the group and/or grid summary. If unspecified the title will show up in the summary.

Parameters:
summaryValueTitle - Default value is null

getSummaryValueTitle

public String getSummaryValueTitle()
If showGridSummary or showGroupSummary is true and the summaryFunction is set to "title", this attribute may be set to a string to display in the group and/or grid summary. If unspecified the title will show up in the summary.

Returns:
String

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.

Note this property may also be set to false to avoid showing the standard booleanTrueImage and booleanFalseImage for fields of type boolean.

Parameters:
suppressValueIcon - Default value is null
See Also:
setValueIcons(java.util.Map), setShowValueIconOnly(java.lang.Boolean), ImageColumns overview and related methods

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.

Note this property may also be set to false to avoid showing the standard booleanTrueImage and booleanFalseImage for fields of type boolean.

Returns:
Boolean
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons, getShowValueIconOnly(), ImageColumns overview and related methods

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 behavior is to catch and consume mouse-clicks that would result in the link being followed. Instead, the ListGrid.cellClick event is fired for the containing cell.

Parameters:
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 behavior is to catch and consume mouse-clicks that would result in the link being followed. Instead, the ListGrid.cellClick event is fired for the containing cell.

Returns:
String

setTimeFormatter

public void setTimeFormatter(TimeDisplayFormat timeFormatter)
Time-format to apply to date type values within this field. If specified, any dates displayed in this field will be formatted as times using the appropriate format. This is most commonly only applied to fields specified as type "time" though if no explicit dateFormatter is specified it will be respected for other fields as well.

If unspecified, a timeFormatter may be defined at the component level and will be respected by fields of type "time".

If this field is editable, the timeFormatter will also be passed to the editor created to edit this field as timeFormatter.

Note : This is an advanced setting

Parameters:
timeFormatter - Default value is null
See Also:
Appearance overview and related methods

getTimeFormatter

public TimeDisplayFormat getTimeFormatter()
Time-format to apply to date type values within this field. If specified, any dates displayed in this field will be formatted as times using the appropriate format. This is most commonly only applied to fields specified as type "time" though if no explicit dateFormatter is specified it will be respected for other fields as well.

If unspecified, a timeFormatter may be defined at the component level and will be respected by fields of type "time".

If this field is editable, the timeFormatter will also be passed to the editor created to edit this field as timeFormatter.

Returns:
TimeDisplayFormat
See Also:
Appearance overview and related methods

setTitle

public void setTitle(String title)
A title for this field, to display in the header for the field and in other contexts such as the menu for picking visible fields.

Note: if you want to use HTML tags to affect the display of the header, you should do so via headerTitle instead so that other places where the title appears in the UI are not affected. For example, you might set headerTitle to an empty string to suppress the header title on a narrow column, but you would retain the normal title in the title property to avoid a blank menu item in the field picker menu, hilite editor and other contexts.

Alternately you can specify a ListGridField.getFieldTitle method on the field to return the HTML for the field title.

Parameters:
title - Default value is null
See Also:
getFieldTitle(com.smartgwt.client.widgets.grid.ListGrid, int), Appearance overview and related methods

getTitle

public String getTitle()
A title for this field, to display in the header for the field and in other contexts such as the menu for picking visible fields.

Note: if you want to use HTML tags to affect the display of the header, you should do so via headerTitle instead so that other places where the title appears in the UI are not affected. For example, you might set headerTitle to an empty string to suppress the header title on a narrow column, but you would retain the normal title in the title property to avoid a blank menu item in the field picker menu, hilite editor and other contexts.

Alternately you can specify a ListGridField.getFieldTitle method on the field to return the HTML for the field title.

Returns:
String
See Also:
getFieldTitle(com.smartgwt.client.widgets.grid.ListGrid, int), Appearance overview and related methods

setType

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

Parameters:
type - Default value is "text"
See Also:
ListGridFieldType, FieldType, Appearance overview and related methods

getType

public ListGridFieldType getType()
ListGrids picks a renderer for the view and edit mode of a field based on this attribute. See ListGridFieldType for a summary of how types are rendered.

Returns:
ListGridFieldType
See Also:
ListGridFieldType, FieldType, Appearance overview and related methods

setUserFormula

public void setUserFormula(UserFormula userFormula)
Formula definition for this field.

Advanced applications that wish to save formulas separately from a grid's viewState can provide a UserFormula as part of the field definition, and may subsequently access the formula is updated via the ListGrid.formulaUpdated notification.

Parameters:
userFormula - Default value is null

getUserFormula

public UserFormula getUserFormula()
Formula definition for this field.

Advanced applications that wish to save formulas separately from a grid's viewState can provide a UserFormula as part of the field definition, and may subsequently access the formula is updated via the ListGrid.formulaUpdated notification.

Returns:
UserFormula

setUserSummary

public void setUserSummary(UserSummary userSummary)
Summary definition for this field.

Advanced applications that wish to save summarys separately from a grid's viewState can provide a UserSummary as part of the field definition, and may subsequently access the summary is updated via the ListGrid.summaryUpdated notification.

Parameters:
userSummary - Default value is null

getUserSummary

public UserSummary getUserSummary()
Summary definition for this field.

Advanced applications that wish to save summarys separately from a grid's viewState can provide a UserSummary as part of the field definition, and may subsequently access the summary is updated via the ListGrid.summaryUpdated notification.

Returns:
UserSummary

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.

Analogous to the validateOnChange property.

Parameters:
validateOnChange - Default value is null
See Also:
GridValidation overview and related methods

getValidateOnChange

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

Analogous to the validateOnChange property.

Returns:
Boolean
See Also:
GridValidation overview and related methods

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 - Default value is null
See Also:
Validator, setRequired(java.lang.Boolean), GridValidation overview and related methods, Data validation Example

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 - 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

setValueIconHeight

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

Parameters:
valueIconHeight - Default value is null
See Also:
ImageColumns overview and related methods

getValueIconHeight

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

Returns:
Integer
See Also:
ImageColumns overview and related methods

setValueIconLeftPadding

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

Parameters:
valueIconLeftPadding - Default value is null
See Also:
setValueIcons(java.util.Map), ImageColumns overview and related methods

getValueIconLeftPadding

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

Returns:
Integer
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons, ImageColumns overview and related methods

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 - Default value is null
See Also:
ImageColumns overview and related methods

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
See Also:
ImageColumns overview and related methods

setValueIconRightPadding

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

Parameters:
valueIconRightPadding - Default value is null
See Also:
setValueIcons(java.util.Map), ImageColumns overview and related methods

getValueIconRightPadding

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

Returns:
Integer
See Also:
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons, ImageColumns overview and related methods

setValueIconSize

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

Parameters:
valueIconSize - Default value is null
See Also:
ListGrid.setValueIconSize(int), setValueIconWidth(java.lang.Integer), setValueIconHeight(java.lang.Integer), ImageColumns overview and related methods

getValueIconSize

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

Returns:
Integer
See Also:
ListGrid.getValueIconSize(), getValueIconWidth(), getValueIconHeight(), ImageColumns overview and related methods

setValueIconWidth

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

Parameters:
valueIconWidth - Default value is null
See Also:
ImageColumns overview and related methods

getValueIconWidth

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

Returns:
Integer
See Also:
ImageColumns overview and related methods

setWrap

public void setWrap(Boolean wrap)
Should the field title wrap if there is not enough space horizontally to accomodate it. (Note that this is a soft-wrap - if set the title will wrap at word boundaries).

If unset, default behavior is derived from wrapHeaderTitles.

Parameters:
wrap - Default value is null

getWrap

public Boolean getWrap()
Should the field title wrap if there is not enough space horizontally to accomodate it. (Note that this is a soft-wrap - if set the title will wrap at word boundaries).

If unset, default behavior is derived from wrapHeaderTitles.

Returns:
Boolean

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 or ListGrid.setEditValues.

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.
Call EditorExitEvent.cancel() from within EditorExitHandler.onEditorExit(com.smartgwt.client.widgets.grid.events.EditorExitEvent) 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

getAutoFreezePosition

public int getAutoFreezePosition()
When a field has autoFreeze set to true, developers can implement this method to indicate where in the frozen-fields array this field should appear.

Some automatically generated fields, such as rowNumberField, expansionField and checkboxField, provide default implementations of this method.

Returns:
the index at which this autoFreeze field should appear in the frozen body
See Also:
FrozenFields overview and related methods

getFieldTitle

public String 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 setFieldProperties() to dynamically update the title.

Parameters:
viewer - pointer back to the ListGrid
fieldNum - index of this field in the grid's fields array.
Returns:
Field title.
See Also:
getTitle(), Appearance overview and related methods

addRecordClickHandler

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

Executed when this field is clicked on. Note that if ListGrid.recordClick is also defined, it will be fired for fields that define a recordClick handler if the field-level handler returns true. Call RecordClickEvent.cancel() from within RecordClickHandler.onRecordClick(com.smartgwt.client.widgets.grid.events.RecordClickEvent) 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

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

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 setEditValueFormatter(com.smartgwt.client.widgets.grid.CellEditValueFormatter) is provided for that purpose.

Parameters:
formatter - the formatter

setEditValueFormatter

public void setEditValueFormatter(CellEditValueFormatter formatter)
Return the value to display in cells of this field which are being edited.

Example usage: converting a stored value in cents (100) to a dollar-and-cents value in the editor (1.00)

The value passed to this method is the raw value for the cell.

To convert the formatted value displayed within an editor back to a raw value, implement com.smartgwt.client.widgets.grid.ListGridField#setEditorValueParser as well.

Parameters:
formatter - the CellEditValueFormatter
See Also:
Editing overview and related methods

setEditValueParser

public void setEditValueParser(CellEditValueParser parser)
Method used to convert the value displayed in an editor for some cell in this field into a raw value for saving.

Parameters:
parser - the CellEditValueParser
See Also:
Editing overview and related methods

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

setGroupSummaryCustomizer

public void setGroupSummaryCustomizer(GroupSummaryCustomizer groupSummaryCustomizer)
Parameters:
groupSummaryCustomizer - the group summary customizer

setGridSummaryCustomizer

public void setGridSummaryCustomizer(GridSummaryCustomizer gridSummaryCustomizer)
Parameters:
gridSummaryCustomizer - the grid summary 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

setImgDir

public void setImgDir(String imgDir)

setDefaultValue

public void setDefaultValue(String defaultValue)
If this field can be edited, this property can be used to specify a default value for this field's editor when adding new rows to the grid.

See Also:
ListGrid.startEditingNew()

setDefaultValue

public void setDefaultValue(Integer defaultValue)
See Also:
setDefaultValue(String)

setDefaultValue

public void setDefaultValue(Long defaultValue)
See Also:
setDefaultValue(String)

setDefaultValue

public void setDefaultValue(Boolean defaultValue)
See Also:
setDefaultValue(String)

setDefaultValue

public void setDefaultValue(Float defaultValue)
See Also:
setDefaultValue(String)

setDefaultValue

public void setDefaultValue(Date defaultValue)
See Also:
setDefaultValue(String)

setEditorProperties

public void setEditorProperties(FormItem editorProperties)
FormItem properties to use as a template 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 be the appropriate form item for the data-type of the field.

The ListGrid.setEditorCustomizer(ListGridEditorCustomizer) API allows the developer to supply dynamic properties for the item based on the row as well as the field being edited.

Note: The FormItem passed to setEditorProperties() is used as a "template" to create a FormItem whenever the ListGrid needs to show an interface for editing this field. See DataSourceField.setEditorProperties(FormItem) for a discussion of the limitations this pattern imposes upon event handling within the passed in item. As an alternative, you can use setEditorType(String) or setEditorType(Class) to avoid these limitations, if you register the FormItem subclass with the reflection mechanism.

Parameters:
editorProperties - the editor properties

setEditorType

public void setEditorType(FormItem editorType)
Deprecated. Renamed to setEditorProperties(FormItem). You can also consider using setEditorType(Class) or setEditorType(String) instead.

Synonym for setEditorProperties(FormItem).

Parameters:
editorType - FormItem with default properties to be applied when editing

setEditorType

public void setEditorType(String editorType)
The FormItem class to be used when this field is edited.

If unset, a FormItem will be automatically chosen.

By using the reflection mechanism, this method avoids the limitations described in setEditorProperties(FormItem).

Parameters:
editorType - the fully-qualified class name of a FormItem subclass, which must have been registered with the reflection mechanism.
Throws:
IllegalArgumentException - if the editorType class has not beeen registered for use with the reflection mechanism, or if it does not inherit from FormItem.

setEditorType

public void setEditorType(Class<? extends FormItem> editorType)
The FormItem class to be used when this field is edited.

If unset, a FormItem will be automatically chosen.

By using the reflection mechanism, this method avoids the limitations described in setEditorProperties(FormItem).

Parameters:
editorType - a FormItem subclass, which must have been registered with the reflection mechanism.
Throws:
IllegalArgumentException - if the editorType class has not beeen registered for use with the reflection mechanism, or if it does not inherit from FormItem.

setFilterEditorType

public void setFilterEditorType(FormItem filterEditorType)
Deprecated. Renamed to setFilterEditorProperties(FormItem). You can also consider using setFilterEditorType(Class) or setFilterEditorType(String) instead.

Synonym for setFilterEditorProperties(FormItem).

Parameters:
filterEditorType - FormItem with default properties to be applied when editing in the filter row

setFilterEditorType

public void setFilterEditorType(String editorType)
If this ListGrid is showing a filter row, this property can be used to specify the FormItem 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).

By using the reflection mechanism, this method avoids the limitations described in setFilterEditorProperties(FormItem).

Parameters:
editorType - the fully-qualified class name of a FormItem subclass, which must have been registered with the reflection mechanism.
Throws:
IllegalArgumentException - if the editorType class has not beeen registered for use with the reflection mechanism, or if it does not inherit from FormItem.

setFilterEditorType

public void setFilterEditorType(Class<? extends FormItem> editorType)
If this ListGrid is showing a filter row, this property can be used to specify the FormItem 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).

By using the reflection mechanism, this method avoids the limitations described in setFilterEditorProperties(FormItem).

Parameters:
editorType - a FormItem subclass, which must have been registered with the reflection mechanism.
Throws:
IllegalArgumentException - if the editorType class has not beeen registered for use with the reflection mechanism, or if it does not inherit from FormItem.

setFilterEditorProperties

public void setFilterEditorProperties(FormItem filterEditorProperties)
If this ListGrid is showing a filter row (showFilterEditor : true), this property can be used to specify properties for the appropriate filter form item. 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).

Note: The FormItem passed to setFilterEditorProperties() is used as a "template" to create a FormItem whenever the ListGrid needs to show an interface for editing this field. See DataSourceField.setEditorProperties(FormItem) for a discussion of the limitations this pattern imposes upon event handling within the passed in item. As an alternative, you can use setFilterEditorType(String) or setFilterEditorType(Class) to avoid these limitations, if you register the FormItem subclass with the reflection mechanism.

Parameters:
filterEditorProperties - the filter editor properties

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

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

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

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

addChangeHandler

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

If this field is editable, any change handler specified on the ListGridField will be passed onto the editors for this field.

Note that if canToggle is true, the user may change the value of a boolean field without going into edit mode by single clicking on the field. In this case the ListGridField.change and ListGridField.changed handlers will fire but the form and item parameters will be null.

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 changed handler specified on the ListGridField will be passed onto the editors for this field. Note that if canToggle is true, the user may change the value of a boolean field without going into edit mode by single clicking on the field. In this case the ListGridField.change and ListGridField.changed handlers will fire but the form and item parameters will be null.

Specified by:
addChangedHandler in interface HasChangedHandlers
Parameters:
handler - the changed 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(Canvas buttonProperties)
Set the properties of the header button used for this field. The buttonProperties parameter should be the same class as the headerButtonConstructor for the ListGrid (most commonly Button, ImgButton or StretchImgButton, and typically set up in the load_skin.js file for the loaded theme).

Parameters:
buttonProperties - the header button properties.

setSummaryFunction

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

Parameters:
summaryFunction - summaryFunction

setSummaryFunction

public void setSummaryFunction(String summaryFunction)
If showGridSummary or showGroupSummary is true, this method can be used to specify the name of a summary function registered via SimpleType.registerSummaryFunction(java.lang.String, com.smartgwt.client.widgets.grid.SummaryFunction) for calculating the summary value to display.

Parameters:
summaryFunction - summaryFunction

setSummaryFunction

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

Parameters:
summaryFunction - summaryFunctio

addSummaryFunction

public void addSummaryFunction(SummaryFunction summaryFunction)
If showGridSummary or showGroupSummary is true, this method can be used to specify a SummaryFunction for calculating the summary value to display. Note that by calling this method repeatedly, you can apply more than one summary function to a field. This allows the developer to set up multi-line summaries - each specified summary function result will show up in a separate summary row (either at the bottom of the grid or at the end of each group).

Note also that multiple-line summary functions are not compatible with the ListGrid.setShowGroupSummaryInHeader(java.lang.Boolean) feature. If this property is set only the first summary value will be visible to the user (displayed in the group header node).

Parameters:
summaryFunction -

addSummaryFunction

public void addSummaryFunction(SummaryFunctionType summaryFunction)
If showGridSummary or showGroupSummary is true, this method can be used to specify a SummaryFunctionType for calculating the summary value to display. Note that by calling this method repeatedly, you can apply more than one summary function to a field. This allows the developer to set up multi-line summaries - each specified summary function result will show up in a separate summary row (either at the bottom of the grid or at the end of each group).

Note also that multiple-line summary functions are not compatible with the ListGrid.setShowGroupSummaryInHeader(java.lang.Boolean) feature. If this property is set only the first summary value will be visible to the user (displayed in the group header node).

Parameters:
summaryFunction -

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