Class ListGridField
- All Implemented Interfaces:
HasHandlers
,HasCellSavedHandlers
,HasChangedHandlers
,HasChangeHandlers
,HasEditorEnterHandlers
,HasEditorExitHandlers
,HasRecordClickHandlers
,HasValueIconClickHandlers
- Direct Known Subclasses:
ListGridRemoveField
,ListGridSummaryField
,TreeGridField
ListGrid
.-
Field Summary
Fields inherited from class com.smartgwt.client.core.RefDataClass
id
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
ConstructorDescriptionListGridField
(JavaScriptObject jsObj) ListGridField
(String name) ListGridField
(String name, int width) ListGridField
(String name, String title) ListGridField
(String name, String title, int width) -
Method Summary
Modifier and TypeMethodDescriptionaddCellSavedHandler
(CellSavedHandler handler) Add a cellSaved handler.addChangedHandler
(ChangedHandler handler) Add a changed handler.addChangeHandler
(ChangeHandler handler) Add a change handler.addEditorEnterHandler
(EditorEnterHandler handler) Add a editorEnter handler.addEditorExitHandler
(EditorExitHandler handler) Add a editorExit handler.addRecordClickHandler
(RecordClickHandler handler) Add a recordClick handler.void
addSummaryFunction
(SummaryFunctionType summaryFunction) IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify aSummaryFunctionType
for calculating the summary value to display.void
addSummaryFunction
(SummaryFunction summaryFunction) IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify aSummaryFunction
for calculating the summary value to display.Add a valueIconClick handler.formatCellValue
(Object value, ListGridRecord record, int rowNum, int colNum, ListGrid grid) Deprecated.The settings that configure requests to AI to generate the values for this field.If set to a non-null
value, override ofListGrid.aiHoverContentsPrefix
for this field.If set and AI isenabled
, the settings that configure requests to AI to generate the contents of the hover displayed when the user hovers the mouse pointer over a cell of the field.getAlign()
Horizontal alignment for field's column header: "left", "right" or "center".Field-level setting forListGrid.allowFilterExpressions
:true - controls whether search expressions can be entered directly into the filter item for this field.Per-field setting forListGrid.allowFilterOperators
.Per-field setting forListGrid.alwaysShowOperatorIcon
.IfuserFormula
is set for this field, and this grid is showinggroup summaries
or agrid summary
, this property determines what field value should be present in those summary rows.What to do when a user hits arrow key while editing this field?
SeeListGrid.getArrowKeyEditAction()
.A field-specific value to display for cells when an error occurred during asynchronous generation.A field-specific value to display for cells whose value was not generated by the previous asynchronous operation to generate it, or will not be generated by an asynchronous operation due to currently being disabled.Whether to allow browser autoComplete when editing this field.If true, automatically fetches records and derives a valueMap fromoptionDataSource
.When set, this attribute causes this field to be auto-sized directly by effectively settingautoFitWidth
to true and applying anautoFitWidthApproach
.Should this listGrid field autofit its width to either titles or content?When a user requests column autofitting via theheader contextMenu
or via amouse gesture
, what autofit approach is used.Whether this field should be automatically frozen when other fields are frozen.int
When a field hasautoFreeze
set to true, developers can implement this method to indicate where in the frozen-fields array this field should appear.Custom base style to apply to all cells in this field instead ofListGrid.baseStyle
To override the baseStyle at the row level, userecord[listGrid.recordBaseStyleProperty]
instead.Should the user be allowed to perform one-time autofitting of this field via a header context-menu option?Whether this field can be dragResized using the mouse.This property establishes default editability for the field.Can this AI summary or sort field be edited from the header context menu? Setting this property tofalse
prevents editing by the user.Can formula be edited from header context menu? Setting attribute tofalse
prevents editing.Can summary be edited from header context menu? Setting attribute tofalse
prevents editing.Dictates whether the data in this field be exported.If showing a filter row for this ListGrid, should the filter criteria for this field be editableWhether this field should display freezing/unfreezing options in its header context menu.Determines whether this field will be groupable in the header context menu.If set to false, this field will be omitted from the column picker that appears in the header context menu whenListGrid.canPickFields
is enabled.Determines whether this field can be hilited.Whether this field can be reordered using the mouse.Enables or disables sorting by this column.When true, this field can only be used for sorting if the data is entirely client-side.Allows a boolean orvalueMapped
field to be edited without going into edit mode.Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived fromalign
.For a field of type:"icon" only, set the icon that appears in body cells.HTML to show in a hover over cells in this field.dataPath for this field.Display format to use for date type values within this field.Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.Applies only to fields of type "float" and affects how many significant digits are shown.Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically andfield.groupingMode
is unset.If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.defaultIconSrc
.Optional "default width" for this field.Specifies theoptionDataSource
field used to retrieve the display values that are to be mapped from the internal values specified byvalueField
.If adisplayField
is set, should this field show record values from thedisplayField
?If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconHeight
.
If this property unset, the iconHeight property from the editor can be picked up fromiconHeight
instead.If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconWidth
.
If this property unset, the iconWidth property from the editor can be picked up fromiconWidth
instead.When some cell in this field is being edited, this property can be used to apply an explicitFormItem.imageURLPrefix
to the editor in question.When some cell in this field is being edited, this property can be used to apply an explicitFormItem.imageURLSuffix
to the editor in question.When some cell in this field is being edited, setting this property will specify the height for value icons in the cell's editor.When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's editor.The value to display for a cell whose value is null or the empty string after applyingformatting
and valueMap (if any).Criteria to be evaluated to determine whether this field should be enabled.What to do when a user hits enter while editing this field?
Overrides theenterKeyEditAction
as specified at the listGrid level while focus is in this field.By default HTML values in ListGrid cells will be interpreted by the browser.What to do when a user hits escape while editing this field?
Overrides theescapeKeyEditAction
as specified at the listGrid level while focus is in this field.If true, then this field is excluded from the bound component's view state.boolean
When exporting data to Excel/OpenOffice format usingListGrid.exportData()
orListGrid.exportClientData()
withListGrid.exportFieldWidths
set, set this flag false to cause this field to "opt out" of width export.FormatString
used during exports for numeric or date formatting.Dictates whether numeric values should be exported as raw numbers instead of formatted values when usingexportClientData()
.Dictates whether the data in this field should be exported raw byexportClientData()
.If set this will override thefilterOnKeypress setting at the grid level
With theFilterEditor
showing, the defaultOperator
to use when matching values for this field.FormatString
for numeric or date formatting.Whether this field should be "frozen" for the purposes of horizontal scrolling.Granularity of grouping for numeric fields.For a field that allows multiplegrouping modes
, the current grouping mode.If this field can be grouped, this attribute represents the set of grouping styles that are available.For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping.Custom base style to apply to this field's header button instead ofListGrid.headerBaseStyle
.
Note that depending on the header button constructor, you may have to overrideheaderTitleStyle
as well.Aria role
for the header button for this field.Aria state
for the header button for this field.Delay in ms for hovers shown over this field's header.Optional title for the header button for this field.Custom titleStyle to apply to this field's header button instead ofListGrid.headerTitleStyle
.
Note that this will typically only have an effect ifListGrid.headerButtonConstructor
is set toStretchImgButton
or a subclass thereof.Marks field as initially hidden.
The user will still be able to show the field via a context menu.Set this property to true to suppress showing this field on mobile phones (handset-sized devices).Set this property to true to suppress showing this field on tablets (tablet-sized devices).If set to true, custom HTML applied as part of hiliting will be applied afterformatting
for each cell in this column.Height for hilite icons for this field.How much padding should there be on the left ofhilite icons
for this field? OverridesListGrid.hiliteIconLeftPadding
WhenListGrid.hiliteIcons
are present, where the hilite icon will be placed relative to the field value.How much padding should there be on the right ofhilite icons
for this field? OverridesListGrid.hiliteIconRightPadding
Default width and height ofhilite icons
in this field.Width for hilite icons for this field.Delay in ms for hovers shown for cells in this field.Specifies the width of the canvas shown when the mouse hovers over cells in this field.This property may be set to customize thewrap
attribute for the canvas shown when the mouse hovers over cells in this field.getIcon()
Optional icon to show next to the title for this field.Specifies the cursor to display when the mouse pointer is over an icon image in a cell for either a field of typeicon
or avalueIcon
.Ificon
is specified, this property can be used to specify the height of the icon to be displayed in the ListGrid header button.If this field is showing an icon, should it appear to the left or right of the title?
Valid options are"left"
or"right"
Ificon
is specified, this property can be used to specify the size of the icon to be displayed in the ListGrid header button.int
Pixels between icon and title text.If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconVAlign
.Ificon
is specified, this property can be used to specify the width of the icon to be displayed in the ListGrid header button.If the user is navigating through the grid using the keyboard, record click or double click events may be generated via keyboard interactions (seeListGrid.generateClickOnSpace
,ListGrid.generateClickOnEnter
,ListGrid.generateDoubleClickOnSpace
,ListGrid.generateDoubleClickOnEnter
andListGrid.arrowKeyAction
).int
Height of image shown for fieldTypes image and imageFile in this field.int
Size of images shown for fieldTypes image and imageFile in this field.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 anyvalueIcons
when determining the URL for the image.If any cells in this field are showing a value icon (see:valueIcons
) or this is hasListGridFieldType
set to"image"
, 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 asFormItem.imageURLSuffix
.int
Width of images shown for fieldTypes image and imageFile in this field.Indicates this field's values should be fetched from another, related DataSource.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.String[]
If this listGrid has any fields of type"summary"
and this field will beincluded
in summary calculations by default, this attribute provides an opportunity to explicitly specify which summary fields the record should be displayed in.In an editable ListGrid, initial value for this field when the user begins editing a new record.If set to true andListGrid.canRemoveRecords
is true, this field will be rendered as the remove-field for this grid.The HTML to display in cells of this field if the fieldType is set to link.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".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.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.Return the live ListGrid instance to which this ListGridField is assigned.WhenListGrid.showHeader
is false and a field is subject to autofitting (seeListGrid.autoFitFieldWidths
), sets the maximum width of the field.When a field is subject to autofitting (seeListGrid.autoFitFieldWidths
), sets the minimum width of the field.Indicates that this field should always be Array-valued.getName()
Name of this field.This value is managed by the menu item titled"Filter using"
in theheaderContextMenu
that appears whenallowFilterOperators
has been set to true.IfoptionDataSource
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 mappingsIf 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.If this field has an optionDataSource specified andautoFetchDisplayMap
is set, this attribute provides a way to customize theDSRequest.operationId
passed todataSource.fetchData()
when retrieving the display map from the option dataSource.For fields with anoptionDataSource
, whereautoFetchDisplayMap
is true, this property will govern thetextMatchStyle
attribute of theDSRequest
parameter passed toDataSource.fetchData()
when retrieving the remote data set to be used as a basis for this field's valueMap.static ListGridField
getOrCreateRef
(JavaScriptObject jsObj) Only applies to fields of type"summary"
.A field-specific value to display for cells whose value is pending asynchronous generation.Causes a tooltip hover to appear on the header generated for this field (effectively setsCanvas.prompt
for the header).Only applies to fields of type"summary"
.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 theDataSourceField
, enabling both client and server side validation.Whether to rotate the field's title so it's rendered vertically from bottom to top.Should the cell content be natively selected (ready for copying to clip-board) on click?Whether this field should be included in the printable representation of the grid.When set to false, don't apply alternate-row styling to this field.When set to false, this field will not show a context menu in its header.If using an icon for this button, whether to switch the icon image if the button becomes disabled.If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.Should ellipses be displayed when this field's cell content is clipped? To set this property at the grid level, useListGrid.showEllipsisWhenClipped
For a field of type:"imageFile", indicates whether to stream the image and display it inline or to display the View and Download icons.When set to false, no hover is shown for the field editor in this field.If using an icon for this button, whether to switch the icon image when the button receives focus.IfListGrid.showGridSummary
is true, should this field show a summary value.IfListGrid.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 explicitsummaryFunction
is specified or if adefault summary function
is defined for the specified field type.Determines whether hiliting for this field is shown in a group summary.Whether to show hovers for this field.When set to true and showHover is also true for the field, shows a widget hovering at the mouse point.If using an icon for this button, whether to switch the icon image on mouse rollover.If using an icon for this button, whether to switch the icon image when the button becomes selected.This property may be set tofalse
to explicitly suppress display of the field title in the column header button for the field.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.By default, whenescaping HTML
, we convert line breaks (\r\n, \r, and \n) to HTML <br> tags so that visible cell content respects the original break characters.For a field withdisplayField
configured, should client-side sorting be performed on the display field value? Unless explicitly set tofalse
, the display field value is used.Specifies the default sorting direction for this column.Custom base style to apply to this field's header button instead ofListGrid.spannedHeaderBaseStyle
when the grid is showing header spans.Deprecated.Rather than customizing the summaryTitle developers should typically use theheaderTitle
attribute to show a different title in the column header button than the title used elsewhere.The value to display for a ListGridField when it appears in thesummaryRow
.IfListGrid.showGridSummary
orListGrid.showGroupSummary
is true and thesummaryFunction
is set to"title"
, this attribute may be set to a string to display in the group and/or grid summary.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.By default, clicking a link rendered by this item opens it in a new browser window.Time-format to apply to date type values within this field.getTitle()
A title for this field, to display in the header for the field and in other contexts such as themenu for picking visible fields
.getType()
ListGrids picks a renderer for the view and edit mode of a field based on this attribute.Formula definition for this field.Summary definition for this field.If set to true, anyvalidators
for this field will be run whenever the value of the field is changed.Specifies vertical alignment in the column header for this field: "top", "center", or "bottom".Specifies theoptionDataSource
field used to retrieve the stored values that are to be mapped to the display values (specified bydisplayField
).Height for value icons for this listGrid field.How much padding should there be on the left of valueIcons for this field OverridesListGrid.valueIconLeftPadding
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.How much padding should there be on the right of valueIcons for this field OverridesListGrid.valueIconRightPadding
Default width and height of value icons in this field.Width for value icons for this listGrid field.Criteria to be evaluated to determine whether this field should be visible.getWidth()
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space like "25%", or "*" to split remaining space among all fields which have "*".getWrap()
Should the field title wrap if there is not enough space horizontally to accommodate it.setAIFieldRequest
(AIFieldRequest aiFieldRequest) The settings that configure requests to AI to generate the values for this field.setAiHoverContentsPrefix
(String aiHoverContentsPrefix) If set to a non-null
value, override ofListGrid.aiHoverContentsPrefix
for this field.setAIHoverRequest
(AIHoverRequest aiHoverRequest) If set and AI isenabled
, the settings that configure requests to AI to generate the contents of the hover displayed when the user hovers the mouse pointer over a cell of the field.void
Horizontal alignment for field's column header: "left", "right" or "center".setAllowFilterExpressions
(Boolean allowFilterExpressions) Field-level setting forListGrid.allowFilterExpressions
:true - controls whether search expressions can be entered directly into the filter item for this field.setAllowFilterOperators
(Boolean allowFilterOperators) Per-field setting forListGrid.allowFilterOperators
.setAlwaysShowOperatorIcon
(Boolean alwaysShowOperatorIcon) Per-field setting forListGrid.alwaysShowOperatorIcon
.setApplyAfterSummary
(Boolean applyAfterSummary) IfuserFormula
is set for this field, and this grid is showinggroup summaries
or agrid summary
, this property determines what field value should be present in those summary rows.setArrowKeyEditAction
(ArrowKeyEditAction arrowKeyEditAction) What to do when a user hits arrow key while editing this field?
SeeListGrid.getArrowKeyEditAction()
.setAsyncErrorCellValue
(String asyncErrorCellValue) A field-specific value to display for cells when an error occurred during asynchronous generation.setAsyncMissingCellValue
(String asyncMissingCellValue) A field-specific value to display for cells whose value was not generated by the previous asynchronous operation to generate it, or will not be generated by an asynchronous operation due to currently being disabled.setAutoComplete
(AutoComplete autoComplete) Whether to allow browser autoComplete when editing this field.setAutoFetchDisplayMap
(Boolean autoFetchDisplayMap) If true, automatically fetches records and derives a valueMap fromoptionDataSource
.setAutoFit
(AutoFitWidthApproach autoFit) When set, this attribute causes this field to be auto-sized directly by effectively settingautoFitWidth
to true and applying anautoFitWidthApproach
.setAutoFitWidth
(Boolean autoFitWidth) Should this listGrid field autofit its width to either titles or content?setAutoFitWidthApproach
(AutoFitWidthApproach autoFitWidthApproach) When a user requests column autofitting via theheader contextMenu
or via amouse gesture
, what autofit approach is used.setAutoFreeze
(Boolean autoFreeze) Whether this field should be automatically frozen when other fields are frozen.setBaseStyle
(String baseStyle) Custom base style to apply to all cells in this field instead ofListGrid.baseStyle
To override the baseStyle at the row level, userecord[listGrid.recordBaseStyleProperty]
instead.setCanAutoFitWidth
(Boolean canAutoFitWidth) Should the user be allowed to perform one-time autofitting of this field via a header context-menu option?setCanDragResize
(Boolean canDragResize) Whether this field can be dragResized using the mouse.setCanEdit
(Boolean canEdit) This property establishes default editability for the field.setCanEditAISummary
(Boolean canEditAISummary) Can this AI summary or sort field be edited from the header context menu? Setting this property tofalse
prevents editing by the user.setCanEditFormula
(Boolean canEditFormula) Can formula be edited from header context menu? Setting attribute tofalse
prevents editing.setCanEditSummary
(Boolean canEditSummary) Can summary be edited from header context menu? Setting attribute tofalse
prevents editing.setCanExport
(Boolean canExport) Dictates whether the data in this field be exported.setCanFilter
(Boolean canFilter) If showing a filter row for this ListGrid, should the filter criteria for this field be editablesetCanFreeze
(Boolean canFreeze) Whether this field should display freezing/unfreezing options in its header context menu.setCanGroupBy
(Boolean canGroupBy) Determines whether this field will be groupable in the header context menu.setCanHide
(Boolean canHide) If set to false, this field will be omitted from the column picker that appears in the header context menu whenListGrid.canPickFields
is enabled.setCanHilite
(Boolean canHilite) Determines whether this field can be hilited.setCanReorder
(Boolean canReorder) Whether this field can be reordered using the mouse.setCanSort
(Boolean canSort) Enables or disables sorting by this column.setCanSortClientOnly
(Boolean canSortClientOnly) When true, this field can only be used for sorting if the data is entirely client-side.setCanToggle
(Boolean canToggle) Allows a boolean orvalueMapped
field to be edited without going into edit mode.setCellAlign
(Alignment cellAlign) Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived fromalign
.void
setCellFormatter
(CellFormatter formatter) Sets a formatter that returns the HTML to display in each cell of the field, given the raw cell value.setCellIcon
(String cellIcon) For a field of type:"icon" only, set the icon that appears in body cells.setCellPrompt
(String cellPrompt) HTML to show in a hover over cells in this field.setDataPath
(String dataPath) dataPath for this field.setDateFormatter
(DateDisplayFormat dateFormatter) Display format to use for date type values within this field.setDecimalPad
(Integer decimalPad) Applies only to fields of type "float" and enforces a minimum number of digits shown after the decimal point.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
(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
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.setDefaultGroupingMode
(String defaultGroupingMode) Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically andfield.groupingMode
is unset.setDefaultIconSrc
(String defaultIconSrc) If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.defaultIconSrc
.void
setDefaultValue
(Boolean defaultValue) If this fieldcan 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
setDefaultValue
(Float defaultValue) If this fieldcan 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
setDefaultValue
(Integer defaultValue) If this fieldcan 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
setDefaultValue
(Long defaultValue) If this fieldcan 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
setDefaultValue
(String defaultValue) If this fieldcan 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
setDefaultValue
(Date defaultValue) If this fieldcan be edited
, this property can be used to specify a default value for this field's editor when adding new rows to the grid.setDefaultWidth
(Integer defaultWidth) Optional "default width" for this field.setDisplayField
(String displayField) Specifies theoptionDataSource
field used to retrieve the display values that are to be mapped from the internal values specified byvalueField
.setDisplayValueFromRecord
(Boolean displayValueFromRecord) If adisplayField
is set, should this field show record values from thedisplayField
?setEditorFormula
(UserFormula editorFormula) setEditorIconHeight
(Integer editorIconHeight) If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconHeight
.
If this property unset, the iconHeight property from the editor can be picked up fromiconHeight
instead.setEditorIconWidth
(Integer editorIconWidth) If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconWidth
.
If this property unset, the iconWidth property from the editor can be picked up fromiconWidth
instead.setEditorImageURLPrefix
(String editorImageURLPrefix) When some cell in this field is being edited, this property can be used to apply an explicitFormItem.imageURLPrefix
to the editor in question.setEditorImageURLSuffix
(String editorImageURLSuffix) When some cell in this field is being edited, this property can be used to apply an explicitFormItem.imageURLSuffix
to the editor in question.void
setEditorProperties
(FormItem editorProperties) Set the defaultFormItem
properties to be used whenever this field is edited.setEditorTextFormula
(UserSummary editorTextFormula) void
setEditorType
(FormItem editorType) Deprecated.void
setEditorType
(Class<? extends FormItem> editorType) TheFormItem
class to be used when this field is edited.void
setEditorType
(String editorType) TheFormItem
class to be used when this field is edited.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.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.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.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
Method used to convert the value displayed in an editor for some cell in this field into a raw value for saving.setEmptyCellValue
(String emptyCellValue) The value to display for a cell whose value is null or the empty string after applyingformatting
and valueMap (if any).setEnableWhen
(Criteria enableWhen) Criteria to be evaluated to determine whether this field should be enabled.setEnterKeyEditAction
(EnterKeyEditAction enterKeyEditAction) What to do when a user hits enter while editing this field?
Overrides theenterKeyEditAction
as specified at the listGrid level while focus is in this field.setEscapeHTML
(Boolean escapeHTML) By default HTML values in ListGrid cells will be interpreted by the browser.setEscapeKeyEditAction
(EscapeKeyEditAction escapeKeyEditAction) What to do when a user hits escape while editing this field?
Overrides theescapeKeyEditAction
as specified at the listGrid level while focus is in this field.setExcludeFromState
(Boolean excludeFromState) If true, then this field is excluded from the bound component's view state.setExportFieldWidth
(boolean exportFieldWidth) When exporting data to Excel/OpenOffice format usingListGrid.exportData()
orListGrid.exportClientData()
withListGrid.exportFieldWidths
set, set this flag false to cause this field to "opt out" of width export.setExportFormat
(String exportFormat) FormatString
used during exports for numeric or date formatting.setExportRawNumbers
(Boolean exportRawNumbers) Dictates whether numeric values should be exported as raw numbers instead of formatted values when usingexportClientData()
.setExportRawValues
(Boolean exportRawValues) Dictates whether the data in this field should be exported raw byexportClientData()
.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
(FormItem filterEditorType) Deprecated.void
setFilterEditorType
(Class<? extends FormItem> editorType) If this ListGrid is showing a filter row, this property can be used to specify theFormItem
class to use for the filter form item associated with this field.void
setFilterEditorType
(String editorType) If this ListGrid is showing a filter row, this property can be used to specify theFormItem
class to use for the filter form item associated with this field.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.setFilterOnKeypress
(Boolean filterOnKeypress) If set this will override thefilterOnKeypress setting at the grid level
setFilterOperator
(OperatorId filterOperator) With theFilterEditor
showing, the defaultOperator
to use when matching values for this field.FormatString
for numeric or date formatting.Whether this field should be "frozen" for the purposes of horizontal scrolling.void
setGridSummaryCustomizer
(GridSummaryCustomizer gridSummaryCustomizer) setGroupGranularity
(Integer groupGranularity) Granularity of grouping for numeric fields.setGroupingMode
(String groupingMode) For a field that allows multiplegrouping modes
, the current grouping mode.setGroupingModes
(Map groupingModes) If this field can be grouped, this attribute represents the set of grouping styles that are available.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.setHeaderBaseStyle
(String headerBaseStyle) Custom base style to apply to this field's header button instead ofListGrid.headerBaseStyle
.
Note that depending on the header button constructor, you may have to overrideheaderTitleStyle
as well.setHeaderButtonAriaRole
(String headerButtonAriaRole) Aria role
for the header button for this field.setHeaderButtonAriaState
(Map headerButtonAriaState) Aria state
for the header button for this field.void
setHeaderButtonProperties
(Canvas buttonProperties) Set the properties of the header button used for this field.setHeaderHoverDelay
(Integer headerHoverDelay) Delay in ms for hovers shown over this field's header.setHeaderTitle
(String headerTitle) Optional title for the header button for this field.setHeaderTitleStyle
(String headerTitleStyle) Custom titleStyle to apply to this field's header button instead ofListGrid.headerTitleStyle
.
Note that this will typically only have an effect ifListGrid.headerButtonConstructor
is set toStretchImgButton
or a subclass thereof.Marks field as initially hidden.
The user will still be able to show the field via a context menu.setHideOnPhone
(Boolean hideOnPhone) Set this property to true to suppress showing this field on mobile phones (handset-sized devices).setHideOnTablet
(Boolean hideOnTablet) Set this property to true to suppress showing this field on tablets (tablet-sized devices).setHiliteHTMLAfterFormat
(Boolean hiliteHTMLAfterFormat) If set to true, custom HTML applied as part of hiliting will be applied afterformatting
for each cell in this column.setHiliteIconHeight
(Integer hiliteIconHeight) Height for hilite icons for this field.setHiliteIconLeftPadding
(Integer hiliteIconLeftPadding) How much padding should there be on the left ofhilite icons
for this field? OverridesListGrid.hiliteIconLeftPadding
setHiliteIconPosition
(HiliteIconPosition hiliteIconPosition) WhenListGrid.hiliteIcons
are present, where the hilite icon will be placed relative to the field value.setHiliteIconRightPadding
(Integer hiliteIconRightPadding) How much padding should there be on the right ofhilite icons
for this field? OverridesListGrid.hiliteIconRightPadding
setHiliteIconSize
(Integer hiliteIconSize) Default width and height ofhilite icons
in this field.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.setHoverDelay
(Integer hoverDelay) Delay in ms for hovers shown for cells in this field.setHoverWidth
(Integer hoverWidth) Specifies the width of the canvas shown when the mouse hovers over cells in this field.setHoverWrap
(Boolean hoverWrap) This property may be set to customize thewrap
attribute for the canvas shown when the mouse hovers over cells in this field.Optional icon to show next to the title for this field.setIconCursor
(Cursor iconCursor) Specifies the cursor to display when the mouse pointer is over an icon image in a cell for either a field of typeicon
or avalueIcon
.setIconHeight
(Integer iconHeight) Ificon
is specified, this property can be used to specify the height of the icon to be displayed in the ListGrid header button.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"
setIcons
(FormItemIcon... icons) If this field is editable, this property can be used to specifyicons
to be displayed in the editors displayed for this fieldsetIconSize
(Integer iconSize) Ificon
is specified, this property can be used to specify the size of the icon to be displayed in the ListGrid header button.setIconSpacing
(int iconSpacing) Pixels between icon and title text.setIconVAlign
(String iconVAlign) If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconVAlign
.setIconWidth
(Integer iconWidth) Ificon
is specified, this property can be used to specify the width of the icon to be displayed in the ListGrid header button.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 (seeListGrid.generateClickOnSpace
,ListGrid.generateClickOnEnter
,ListGrid.generateDoubleClickOnSpace
,ListGrid.generateDoubleClickOnEnter
andListGrid.arrowKeyAction
).setImageHeight
(int imageHeight) Height of image shown for fieldTypes image and imageFile in this field.setImageSize
(int imageSize) Size of images shown for fieldTypes image and imageFile in this field.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 anyvalueIcons
when determining the URL for the image.setImageURLSuffix
(String imageURLSuffix) If any cells in this field are showing a value icon (see:valueIcons
) or this is hasListGridFieldType
set to"image"
, 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 asFormItem.imageURLSuffix
.setImageWidth
(int imageWidth) Width of images shown for fieldTypes image and imageFile in this field.void
Deprecated.Renamed tosetImageURLPrefix(java.lang.String)
void
setInactiveCellFormatter
(CellFormatter formatter) Field-level formatter for inactive content.setIncludeFrom
(String includeFrom) Indicates this field's values should be fetched from another, related DataSource.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.setIncludeInRecordSummaryFields
(String... includeInRecordSummaryFields) If this listGrid has any fields of type"summary"
and this field will beincluded
in summary calculations by default, this attribute provides an opportunity to explicitly specify which summary fields the record should be displayed in.setInitialValue
(Object initialValue) In an editable ListGrid, initial value for this field when the user begins editing a new record.setIsRemoveField
(Boolean isRemoveField) If set to true andListGrid.canRemoveRecords
is true, this field will be rendered as the remove-field for this grid.setLeaveHeaderMenuButtonSpace
(Boolean leaveHeaderMenuButtonSpace) IfListGrid.showHeaderMenuButton
is true, when auto-fitting fields to the title width viaListGrid.autoFitFieldWidths
orautoFitWidth
, should the button be sized such that there is enough space for the header menu button to show without covering the field title?setLinkText
(String linkText) The HTML to display in cells of this field if the fieldType is set to link.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".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.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.setMaxWidth
(Integer maxWidth) WhenListGrid.showHeader
is false and a field is subject to autofitting (seeListGrid.autoFitFieldWidths
), sets the maximum width of the field.setMinWidth
(Integer minWidth) When a field is subject to autofitting (seeListGrid.autoFitFieldWidths
), sets the minimum width of the field.setMultiple
(Boolean multiple) Indicates that this field should always be Array-valued.Name of this field.setOptionCriteria
(Criteria optionCriteria) IfoptionDataSource
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 mappingssetOptionDataSource
(DataSource optionDataSource) Derive acom.smartgwt.client.types.ValueMap
by fetching records from another DataSource and extracting thevalueField
anddisplayField
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.setOptionOperationId
(String optionOperationId) If this field has an optionDataSource specified andautoFetchDisplayMap
is set, this attribute provides a way to customize theDSRequest.operationId
passed todataSource.fetchData()
when retrieving the display map from the option dataSource.setOptionTextMatchStyle
(TextMatchStyle optionTextMatchStyle) For fields with anoptionDataSource
, whereautoFetchDisplayMap
is true, this property will govern thetextMatchStyle
attribute of theDSRequest
parameter passed toDataSource.fetchData()
when retrieving the remote data set to be used as a basis for this field's valueMap.setPartialSummary
(Boolean partialSummary) Only applies to fields of type"summary"
.setPendingAsyncCellValue
(String pendingAsyncCellValue) A field-specific value to display for cells whose value is pending asynchronous generation.Causes a tooltip hover to appear on the header generated for this field (effectively setsCanvas.prompt
for the header).void
setRecordSummaryFunction
(RecordSummaryFunctionType recordSummaryFunction) Only applies to fields of type"summary"
.void
setRecordSummaryFunction
(RecordSummaryFunction recordSummaryFunction) Only applies to fields of type"summary"
.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 theDataSourceField
, enabling both client and server side validation.setRotateTitle
(Boolean rotateTitle) Whether to rotate the field's title so it's rendered vertically from bottom to top.setSelectCellTextOnClick
(Boolean selectCellTextOnClick) Should the cell content be natively selected (ready for copying to clip-board) on click?setShouldPrint
(Boolean shouldPrint) Whether this field should be included in the printable representation of the grid.setShowAlternateStyle
(Boolean showAlternateStyle) When set to false, don't apply alternate-row styling to this field.setShowDefaultContextMenu
(Boolean showDefaultContextMenu) When set to false, this field will not show a context menu in its header.setShowDisabledIcon
(Boolean showDisabledIcon) If using an icon for this button, whether to switch the icon image if the button becomes disabled.setShowDownIcon
(Boolean showDownIcon) If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.setShowEllipsisWhenClipped
(Boolean showEllipsisWhenClipped) Should ellipses be displayed when this field's cell content is clipped? To set this property at the grid level, useListGrid.showEllipsisWhenClipped
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.setShowFilterEditorHovers
(Boolean showFilterEditorHovers) When set to false, no hover is shown for the field editor in this field.setShowFocusedIcon
(Boolean showFocusedIcon) If using an icon for this button, whether to switch the icon image when the button receives focus.setShowGridSummary
(Boolean showGridSummary) IfListGrid.showGridSummary
is true, should this field show a summary value.setShowGroupSummary
(Boolean showGroupSummary) IfListGrid.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 explicitsummaryFunction
is specified or if adefault summary function
is defined for the specified field type.setShowHilitesInGroupSummary
(Boolean showHilitesInGroupSummary) Determines whether hiliting for this field is shown in a group summary.setShowHover
(Boolean showHover) Whether to show hovers for this field.setShowHoverComponents
(Boolean showHoverComponents) When set to true and showHover is also true for the field, shows a widget hovering at the mouse point.void
A function, if provided, is evaluated to conditionally determine whether this field should be displayed.setShowRollOverIcon
(Boolean showRollOverIcon) If using an icon for this button, whether to switch the icon image on mouse rollover.setShowSelectedIcon
(Boolean showSelectedIcon) If using an icon for this button, whether to switch the icon image when the button becomes selected.setShowTitle
(Boolean showTitle) This property may be set tofalse
to explicitly suppress display of the field title in the column header button for the field.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.setSkipLineBreaks
(Boolean skipLineBreaks) By default, whenescaping HTML
, we convert line breaks (\r\n, \r, and \n) to HTML <br> tags so that visible cell content respects the original break characters.setSortByDisplayField
(Boolean sortByDisplayField) For a field withdisplayField
configured, should client-side sorting be performed on the display field value? Unless explicitly set tofalse
, the display field value is used.setSortByMappedValue
(Boolean sortByMappedValue) 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.setSpannedHeaderBaseStyle
(String spannedHeaderBaseStyle) Custom base style to apply to this field's header button instead ofListGrid.spannedHeaderBaseStyle
when the grid is showing header spans.void
setSummaryFunction
(SummaryFunctionType summaryFunction) IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify aSummaryFunctionType
for calculating the summary value to display.void
setSummaryFunction
(SummaryFunction summaryFunction) IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify aSummaryFunction
for calculating the summary value to display.void
setSummaryFunction
(String summaryFunction) IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify the name of a summary function registered viaSimpleType.registerSummaryFunction(java.lang.String, com.smartgwt.client.widgets.grid.SummaryFunction)
for calculating the summary value to display.setSummaryTitle
(String summaryTitle) Deprecated.Rather than customizing the summaryTitle developers should typically use theheaderTitle
attribute to show a different title in the column header button than the title used elsewhere.setSummaryValue
(String summaryValue) The value to display for a ListGridField when it appears in thesummaryRow
.setSummaryValueTitle
(String summaryValueTitle) IfListGrid.showGridSummary
orListGrid.showGroupSummary
is true and thesummaryFunction
is set to"title"
, this attribute may be set to a string to display in the group and/or grid summary.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.By default, clicking a link rendered by this item opens it in a new browser window.setTimeFormatter
(TimeDisplayFormat timeFormatter) Time-format to apply to date type values within this field.A title for this field, to display in the header for the field and in other contexts such as themenu for picking visible fields
.setType
(SimpleType type) Set the type directly to a defined SimpleType.setType
(ListGridFieldType type) ListGrids picks a renderer for the view and edit mode of a field based on this attribute.setUserFormula
(UserFormula userFormula) Formula definition for this field.setUserSummary
(UserSummary userSummary) Summary definition for this field.setValidateOnChange
(Boolean validateOnChange) If set to true, anyvalidators
for this field will be run whenever the value of the field is changed.setValidators
(Validator... validators) Array ofValidator
objects for this field.setValign
(VerticalAlignment valign) Specifies vertical alignment in the column header for this field: "top", "center", or "bottom".setValueField
(String valueField) Specifies theoptionDataSource
field used to retrieve the stored values that are to be mapped to the display values (specified bydisplayField
).setValueIconHeight
(Integer valueIconHeight) Height for value icons for this listGrid field.setValueIconLeftPadding
(Integer valueIconLeftPadding) How much padding should there be on the left of valueIcons for this field OverridesListGrid.valueIconLeftPadding
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.setValueIconRightPadding
(Integer valueIconRightPadding) How much padding should there be on the right of valueIcons for this field OverridesListGrid.valueIconRightPadding
setValueIcons
(Map<String, String> valueIcons) This property is a mapping from data values for this field tourls
for icons to display for those data values.setValueIconSize
(Integer valueIconSize) Default width and height of value icons in this field.setValueIconWidth
(Integer valueIconWidth) Width for value icons for this listGrid field.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 (seeListGrid.canEdit
,canEdit
), editors displayed for this field will pick up their valueMap either from this value or fromeditorValueMap
.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 (seeListGrid.canEdit
,canEdit
), editors displayed for this field will pick up their valueMap either from this value or fromeditorValueMap
.setVisibleWhen
(Criteria visibleWhen) Criteria to be evaluated to determine whether this field should be visible.void
setWidth
(int width) The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space like "25%", or "*" to split remaining space among all fields which have "*".void
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space like "25%", or "*" to split remaining space among all fields which have "*".Should the field title wrap if there is not enough space horizontally to accommodate it.Methods inherited from class com.smartgwt.client.data.Field
getExportTitle, getSortByField, getValueMap, setExportTitle, setSortByField
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetID
Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, 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, setFactoryCreated
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 Details
-
ListGridField
public ListGridField() -
ListGridField
-
ListGridField
-
ListGridField
-
ListGridField
-
ListGridField
-
-
Method Details
-
getOrCreateRef
-
setAIFieldRequest
The settings that configure requests to AI to generate the values for this field. This can be set by the application directly or created and edited by the user with an AIFieldBuilder, either directly or via the grid header menu items to add an AI summary or sort field (seeListGrid.canAddAISummaryFields
).Note that setting an
aiFieldRequest
will cause the default value ofescapeHTML
to betrue
.- Parameters:
aiFieldRequest
- New aiFieldRequest value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAIFieldRequest
The settings that configure requests to AI to generate the values for this field. This can be set by the application directly or created and edited by the user with an AIFieldBuilder, either directly or via the grid header menu items to add an AI summary or sort field (seeListGrid.canAddAISummaryFields
).Note that setting an
aiFieldRequest
will cause the default value ofescapeHTML
to betrue
.- Returns:
- Current aiFieldRequest value. Default value is null
- See Also:
-
setAiHoverContentsPrefix
If set to a non-null
value, override ofListGrid.aiHoverContentsPrefix
for this field.- Parameters:
aiHoverContentsPrefix
- New aiHoverContentsPrefix value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAiHoverContentsPrefix
If set to a non-null
value, override ofListGrid.aiHoverContentsPrefix
for this field.- Returns:
- Current aiHoverContentsPrefix value. Default value is null
- See Also:
-
setAIHoverRequest
If set and AI isenabled
, the settings that configure requests to AI to generate the contents of the hover displayed when the user hovers the mouse pointer over a cell of the field.Note:
showHover
must betrue
on this field, orListGrid.showHover
must betrue
on the grid for the hovers to be displayed.While an AI request to generate hover text is pending,
ListGrid.placeholderAIHoverContents
is used as the hover contents.If the AI request is successful, then
ListGrid.aiHoverContentsPrefix
is prepended to the AI-generated hover text, which is always HTML-escaped.
If, however, the AI request is not successful, then the error message (seeSummarizeValueResult.errorMessage
) will be displayed if available, otherwise theDataBoundComponent.defaultAsyncErrorHoverContents
will be displayed. Additionally, properties on the hover when displaying error information can be specified withDataBoundComponent.asyncErrorHoverProperties
.- Parameters:
aiHoverRequest
- New aiHoverRequest value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAIHoverRequest
If set and AI isenabled
, the settings that configure requests to AI to generate the contents of the hover displayed when the user hovers the mouse pointer over a cell of the field.Note:
showHover
must betrue
on this field, orListGrid.showHover
must betrue
on the grid for the hovers to be displayed.While an AI request to generate hover text is pending,
ListGrid.placeholderAIHoverContents
is used as the hover contents.If the AI request is successful, then
ListGrid.aiHoverContentsPrefix
is prepended to the AI-generated hover text, which is always HTML-escaped.
If, however, the AI request is not successful, then the error message (seeSummarizeValueResult.errorMessage
) will be displayed if available, otherwise theDataBoundComponent.defaultAsyncErrorHoverContents
will be displayed. Additionally, properties on the hover when displaying error information can be specified withDataBoundComponent.asyncErrorHoverProperties
.- Returns:
- Current aiHoverRequest value. Default value is null
- See Also:
-
setAllowFilterExpressions
Field-level setting forListGrid.allowFilterExpressions
:true - controls whether search expressions can be entered directly into the filter item for this field. You can also have parsing of the expression remove the operator symbol and apply it to anicon
in the editor.,This attribute can also be set at the
ListGrid level
.For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.- Parameters:
allowFilterExpressions
- New allowFilterExpressions value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAllowFilterExpressions
Field-level setting forListGrid.allowFilterExpressions
:true - controls whether search expressions can be entered directly into the filter item for this field. You can also have parsing of the expression remove the operator symbol and apply it to anicon
in the editor.,This attribute can also be set at the
ListGrid level
.For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.- Returns:
- Current allowFilterExpressions value. Default value is null
- See Also:
-
setAllowFilterOperators
Per-field setting forListGrid.allowFilterOperators
. Can be used to enable the filter operators UI for a particular field if the ListGrid-level setting is not enabled, or to disable filter operators for a particular field if the ListGrid-level setting is enabled.For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.- Parameters:
allowFilterOperators
- New allowFilterOperators value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getAllowFilterOperators
Per-field setting forListGrid.allowFilterOperators
. Can be used to enable the filter operators UI for a particular field if the ListGrid-level setting is not enabled, or to disable filter operators for a particular field if the ListGrid-level setting is enabled.For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.- Returns:
- Current allowFilterOperators value. Default value is null
-
setAlwaysShowOperatorIcon
Per-field setting forListGrid.alwaysShowOperatorIcon
. Can be used to force a particular field to always show it'soperatorIcon
, even if it has no filter-value, or is using the defaultsearch operator
.For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.- Parameters:
alwaysShowOperatorIcon
- New alwaysShowOperatorIcon value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getAlwaysShowOperatorIcon
Per-field setting forListGrid.alwaysShowOperatorIcon
. Can be used to force a particular field to always show it'soperatorIcon
, even if it has no filter-value, or is using the defaultsearch operator
.For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.- Returns:
- Current alwaysShowOperatorIcon value. Default value is null
-
setApplyAfterSummary
IfuserFormula
is set for this field, and this grid is showinggroup summaries
or agrid summary
, this property determines what field value should be present in those summary rows. Should the field's user-formula be applied to the calculated summary row (applyAfterSummarytrue
), or should a standard grid or group summary be applied to the user-formula values displayed in the grid (applyAfterSummaryfalse
)?Default behavior may be specified at the grid level via
ListGrid.applyFormulaAfterSummary
- Parameters:
applyAfterSummary
- New applyAfterSummary value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getApplyAfterSummary
IfuserFormula
is set for this field, and this grid is showinggroup summaries
or agrid summary
, this property determines what field value should be present in those summary rows. Should the field's user-formula be applied to the calculated summary row (applyAfterSummarytrue
), or should a standard grid or group summary be applied to the user-formula values displayed in the grid (applyAfterSummaryfalse
)?Default behavior may be specified at the grid level via
ListGrid.applyFormulaAfterSummary
- Returns:
- Current applyAfterSummary value. Default value is null
-
setArrowKeyEditAction
What to do when a user hits arrow key while editing this field?
SeeListGrid.getArrowKeyEditAction()
.- Parameters:
arrowKeyEditAction
- New arrowKeyEditAction value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getArrowKeyEditAction
What to do when a user hits arrow key while editing this field?
SeeListGrid.getArrowKeyEditAction()
.- Returns:
- Current arrowKeyEditAction value. Default value is null
- See Also:
-
setAsyncErrorCellValue
A field-specific value to display for cells when an error occurred during asynchronous generation.If set, this will override the grid-wide
ListGrid.asyncErrorCellValue
setting for the field.- Parameters:
asyncErrorCellValue
- New asyncErrorCellValue value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAsyncErrorCellValue
A field-specific value to display for cells when an error occurred during asynchronous generation.If set, this will override the grid-wide
ListGrid.asyncErrorCellValue
setting for the field.- Returns:
- Current asyncErrorCellValue value. Default value is null
- See Also:
-
setAsyncMissingCellValue
A field-specific value to display for cells whose value was not generated by the previous asynchronous operation to generate it, or will not be generated by an asynchronous operation due to currently being disabled.If set, this will override the grid-wide
ListGrid.asyncMissingCellValue
setting for the field.- Parameters:
asyncMissingCellValue
- New asyncMissingCellValue value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAsyncMissingCellValue
A field-specific value to display for cells whose value was not generated by the previous asynchronous operation to generate it, or will not be generated by an asynchronous operation due to currently being disabled.If set, this will override the grid-wide
ListGrid.asyncMissingCellValue
setting for the field.- Returns:
- Current asyncMissingCellValue value. Default value is null
- See Also:
-
setAutoComplete
Whether to allow browser autoComplete when editing this field.If unset, defaults to listGrid.autoComplete
- Parameters:
autoComplete
- New autoComplete value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAutoComplete
Whether to allow browser autoComplete when editing this field.If unset, defaults to listGrid.autoComplete
- Returns:
- Current autoComplete value. Default value is null
- See Also:
-
setAutoFetchDisplayMap
If true, automatically fetches records and derives a valueMap fromoptionDataSource
.Same as
ListGrid.autoFetchDisplayMap
, but defined on a per-field basis.- Parameters:
autoFetchDisplayMap
- New autoFetchDisplayMap value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAutoFetchDisplayMap
If true, automatically fetches records and derives a valueMap fromoptionDataSource
.Same as
ListGrid.autoFetchDisplayMap
, but defined on a per-field basis.- Returns:
- Current autoFetchDisplayMap value. Default value is null
- See Also:
-
setAutoFit
When set, this attribute causes this field to be auto-sized directly by effectively settingautoFitWidth
to true and applying anautoFitWidthApproach
. This direct approach is different from and less verbose than applyingsimilar properties
on thegrid
and overriding them on a per-field basis.- Parameters:
autoFit
- New autoFit value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getAutoFit
When set, this attribute causes this field to be auto-sized directly by effectively settingautoFitWidth
to true and applying anautoFitWidthApproach
. This direct approach is different from and less verbose than applyingsimilar properties
on thegrid
and overriding them on a per-field basis.- Returns:
- Current autoFit value. Default value is null
-
setAutoFitWidth
Should this listGrid field autofit its width to either titles or content?This overrides the
ListGrid.autoFitFieldWidths
attribute on a per-field basis.Note that if
showing record components
, per-cell record components are not taken into account when determining the size for column auto fit. The defaultListGrid.getDefaultFieldWidth()
implementation looks at cell content only. We typically recommend that, for fields showing record-components,autoFitWidth
andcanAutoFitWidth
be disabled, or if the record components are of a predictable size, adefaultWidth
be specified.
This is particularly pertinent whereListGrid.recordComponentPosition
is set to "within", in which case cells' content is often empty or completely covered by record-components.For a more direct alternative, see
autoFit
, which effectively turns on this setting and appliesautoFitWidthApproach
with a single property.
If this method is called after the component has been drawn/initialized: Setter forautoFitWidth
. Enables or disables dynamic autoFitWidth behavior on the specified field. Note if the field is currently autoFitWidth:true, and this method is disabling autoFit, the field will not be resized by default - if you wish to resize to an explicit width, useListGrid.resizeField()
.- Parameters:
autoFitWidth
- field to auto-fit. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getAutoFitWidth
Should this listGrid field autofit its width to either titles or content?This overrides the
ListGrid.autoFitFieldWidths
attribute on a per-field basis.Note that if
showing record components
, per-cell record components are not taken into account when determining the size for column auto fit. The defaultListGrid.getDefaultFieldWidth()
implementation looks at cell content only. We typically recommend that, for fields showing record-components,autoFitWidth
andcanAutoFitWidth
be disabled, or if the record components are of a predictable size, adefaultWidth
be specified.
This is particularly pertinent whereListGrid.recordComponentPosition
is set to "within", in which case cells' content is often empty or completely covered by record-components.For a more direct alternative, see
autoFit
, which effectively turns on this setting and appliesautoFitWidthApproach
with a single property.- Returns:
- Current autoFitWidth value. Default value is null
- See Also:
-
setAutoFitWidthApproach
When a user requests column autofitting via theheader contextMenu
or via amouse gesture
, what autofit approach is used. If set, this setting overrides the autoFitWidthApproach specified at the ListGrid level.For a more direct alternative, see
autoFit
, which effectively sets this attribute and turns onautoFitWidth
.- Parameters:
autoFitWidthApproach
- New autoFitWidthApproach value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getAutoFitWidthApproach
When a user requests column autofitting via theheader contextMenu
or via amouse gesture
, what autofit approach is used. If set, this setting overrides the autoFitWidthApproach specified at the ListGrid level.For a more direct alternative, see
autoFit
, which effectively sets this attribute and turns onautoFitWidth
.- Returns:
- Current autoFitWidthApproach value. Default value is null
-
setAutoFreeze
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 generatedcheckbox
,expansion
androwNumber
fields are examples of fields that specifyautoFreeze: true
.You can control the position of this field in the array of frozen fields by providing a
getAutoFreezePosition()
implementation.- Parameters:
autoFreeze
- New autoFreeze value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 generatedcheckbox
,expansion
androwNumber
fields are examples of fields that specifyautoFreeze: true
.You can control the position of this field in the array of frozen fields by providing a
getAutoFreezePosition()
implementation.- Returns:
- Current autoFreeze value. Default value is null
- See Also:
-
setBaseStyle
Custom base style to apply to all cells in this field instead ofListGrid.baseStyle
To override the baseStyle at the row level, userecord[listGrid.recordBaseStyleProperty]
instead.- Parameters:
baseStyle
- New baseStyle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getBaseStyle
Custom base style to apply to all cells in this field instead ofListGrid.baseStyle
To override the baseStyle at the row level, userecord[listGrid.recordBaseStyleProperty]
instead.- Returns:
- Current baseStyle value. Default value is null
- See Also:
-
setCanAutoFitWidth
Should the user be allowed to perform one-time autofitting of this field via a header context-menu option?When enabled, the default header context menu for this field will include an item to auto-fit the field and users will be able to autofit the field via the
ListGrid.headerAutoFitEvent
.If unset, these behaviors are enabled when
ListGrid.canAutoFitFields
is true.If this property is set to false, and
ListGrid.canAutoFitFields
is true, this field will be ommitted from auto-fit when the user selects the header menu option toauto fit all fields
.Note - this property governs user-initiated auto-fit only. It has no impact on autoFit set up via
autoFitWidth
andListGrid.autoFitFieldWidths
.Note that if
showing record components
, per-cell record components are not taken into account when determining the size for column auto fit. The defaultListGrid.getDefaultFieldWidth()
implementation looks at cell content only. We typically recommend that, for fields showing record-components,autoFitWidth
andListGrid.canAutoFitFields
be disabled, or if the record components are of a predictable size, adefaultWidth
be specified.
This is particularly pertinent whereListGrid.recordComponentPosition
is set to "within", in which case cells' content is often empty or completely covered by record-components.- Parameters:
canAutoFitWidth
- New canAutoFitWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCanAutoFitWidth
Should the user be allowed to perform one-time autofitting of this field via a header context-menu option?When enabled, the default header context menu for this field will include an item to auto-fit the field and users will be able to autofit the field via the
ListGrid.headerAutoFitEvent
.If unset, these behaviors are enabled when
ListGrid.canAutoFitFields
is true.If this property is set to false, and
ListGrid.canAutoFitFields
is true, this field will be ommitted from auto-fit when the user selects the header menu option toauto fit all fields
.Note - this property governs user-initiated auto-fit only. It has no impact on autoFit set up via
autoFitWidth
andListGrid.autoFitFieldWidths
.Note that if
showing record components
, per-cell record components are not taken into account when determining the size for column auto fit. The defaultListGrid.getDefaultFieldWidth()
implementation looks at cell content only. We typically recommend that, for fields showing record-components,autoFitWidth
andListGrid.canAutoFitFields
be disabled, or if the record components are of a predictable size, adefaultWidth
be specified.
This is particularly pertinent whereListGrid.recordComponentPosition
is set to "within", in which case cells' content is often empty or completely covered by record-components.- Returns:
- Current canAutoFitWidth value. Default value is null
- See Also:
-
setCanDragResize
Whether this field can be dragResized using the mouse. If unset, the default behavior is governed byListGrid.canResizeFields
.- Parameters:
canDragResize
- New canDragResize value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getCanDragResize
Whether this field can be dragResized using the mouse. If unset, the default behavior is governed byListGrid.canResizeFields
.- Returns:
- Current canDragResize value. Default value is null
-
setCanEdit
This property establishes default editability for the field. May be overridden by setting the 'canEdit' property at the listGrid level. If not explicitly set and this grid is bound to a dataSource, theListGrid.canEditFieldAttribute
may be used to set default editability at the field level.An override of
ListGrid.canEditCell()
can be used for more dynamic control over whether fields can be edited.Note that this property may validly be
null
as a distinct state fromfalse
. SeeListGrid.fieldIsEditable()
for an API that will always returntrue
orfalse
as to whether editing is possible by default.- Overrides:
setCanEdit
in classField
- Parameters:
canEdit
- New canEdit value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCanEdit
This property establishes default editability for the field. May be overridden by setting the 'canEdit' property at the listGrid level. If not explicitly set and this grid is bound to a dataSource, theListGrid.canEditFieldAttribute
may be used to set default editability at the field level.An override of
ListGrid.canEditCell()
can be used for more dynamic control over whether fields can be edited.Note that this property may validly be
null
as a distinct state fromfalse
. SeeListGrid.fieldIsEditable()
for an API that will always returntrue
orfalse
as to whether editing is possible by default.- Overrides:
getCanEdit
in classField
- Returns:
- Current canEdit value. Default value is null
- See Also:
-
setCanEditAISummary
Can this AI summary or sort field be edited from the header context menu? Setting this property tofalse
prevents editing by the user.- Parameters:
canEditAISummary
- New canEditAISummary value. Default value is true- Returns:
ListGridField
instance, for chaining setter calls
-
getCanEditAISummary
Can this AI summary or sort field be edited from the header context menu? Setting this property tofalse
prevents editing by the user.- Returns:
- Current canEditAISummary value. Default value is true
-
setCanEditFormula
Can formula be edited from header context menu? Setting attribute tofalse
prevents editing. Anull
ortrue
value allows editing.Has no effect when
ListGrid.canAddFormulaFields
isfalse
.- Parameters:
canEditFormula
- New canEditFormula value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getCanEditFormula
Can formula be edited from header context menu? Setting attribute tofalse
prevents editing. Anull
ortrue
value allows editing.Has no effect when
ListGrid.canAddFormulaFields
isfalse
.- Returns:
- Current canEditFormula value. Default value is null
-
setCanEditSummary
Can summary be edited from header context menu? Setting attribute tofalse
prevents editing. Anull
ortrue
value allows editing.Has no effect when
ListGrid.canAddSummaryFields
isfalse
.- Parameters:
canEditSummary
- New canEditSummary value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getCanEditSummary
Can summary be edited from header context menu? Setting attribute tofalse
prevents editing. Anull
ortrue
value allows editing.Has no effect when
ListGrid.canAddSummaryFields
isfalse
.- Returns:
- Current canEditSummary value. Default value is null
-
setCanExport
Dictates whether the data in this field be exported. Explicitly set this to false to prevent exporting. Has no effect if the underlyingdataSourceField
is explicitly set to canExport: false.- Overrides:
setCanExport
in classField
- Parameters:
canExport
- New canExport value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getCanExport
Dictates whether the data in this field be exported. Explicitly set this to false to prevent exporting. Has no effect if the underlyingdataSourceField
is explicitly set to canExport: false.- Overrides:
getCanExport
in classField
- Returns:
- Current canExport value. Default value is null
-
setCanFilter
If showing a filter row for this ListGrid, should the filter criteria for this field be editable- Parameters:
canFilter
- New canFilter value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCanFilter
If showing a filter row for this ListGrid, should the filter criteria for this field be editable- Returns:
- Current canFilter value. Default value is null
- See Also:
-
setCanFreeze
Whether this field should display freezing/unfreezing options in its header context menu. SeeFrozenFields
.- Parameters:
canFreeze
- New canFreeze value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCanFreeze
Whether this field should display freezing/unfreezing options in its header context menu. SeeFrozenFields
.- Returns:
- Current canFreeze value. Default value is null
- See Also:
-
setCanGroupBy
Determines whether this field will be groupable in the header context menu.- Parameters:
canGroupBy
- New canGroupBy value. Default value is true- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCanGroupBy
Determines whether this field will be groupable in the header context menu.- Returns:
- Current canGroupBy value. Default value is true
- See Also:
-
setCanHide
If set to false, this field will be omitted from the column picker that appears in the header context menu whenListGrid.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 theadvanced field picker
is shown, if the field ishidden
, 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
- New canHide value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCanHide
If set to false, this field will be omitted from the column picker that appears in the header context menu whenListGrid.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 theadvanced field picker
is shown, if the field ishidden
, 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:
- Current canHide value. Default value is null
- See Also:
-
setCanHilite
Determines whether this field can be hilited. Set to false to prevent this field from appearing in HiliteEditor.- Parameters:
canHilite
- New canHilite value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getCanHilite
Determines whether this field can be hilited. Set to false to prevent this field from appearing in HiliteEditor.- Returns:
- Current canHilite value. Default value is null
-
setCanReorder
Whether this field can be reordered using the mouse. If unset, the default behavior is governed byListGrid.canReorderFields
. Note that setting this property tofalse
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.Note that setting
canReorder:false
on a field in the middle of a grid is mostly useless, since it's possible that such a "locked" field may still be reordered automatically, as a result of the user dragging one unlocked field onto another unlocked field.Fields in
headerSpans
are treated as if they havecanReorder:false
to keep the fields in the span together, except that unlocked fields not in a span may be drag-reordered across them, even if they're at the header's extreme left or right. HeaderSpans themselves may not be drag-reordered.- Parameters:
canReorder
- New canReorder value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getCanReorder
Whether this field can be reordered using the mouse. If unset, the default behavior is governed byListGrid.canReorderFields
. Note that setting this property tofalse
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.Note that setting
canReorder:false
on a field in the middle of a grid is mostly useless, since it's possible that such a "locked" field may still be reordered automatically, as a result of the user dragging one unlocked field onto another unlocked field.Fields in
headerSpans
are treated as if they havecanReorder:false
to keep the fields in the span together, except that unlocked fields not in a span may be drag-reordered across them, even if they're at the header's extreme left or right. HeaderSpans themselves may not be drag-reordered.- Returns:
- Current canReorder value. Default value is null
-
setCanSort
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 tosort()
orsetSort()
will work as expected.- Parameters:
canSort
- New canSort value. Default value is true- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 tosort()
orsetSort()
will work as expected.- Returns:
- Current canSort value. Default value is true
- See Also:
-
setCanSortClientOnly
When true, this field can only be used for sorting if the data is entirely client-side.- Parameters:
canSortClientOnly
- New canSortClientOnly value. Default value is false- Returns:
ListGridField
instance, for chaining setter calls
-
getCanSortClientOnly
When true, this field can only be used for sorting if the data is entirely client-side.- Returns:
- Current canSortClientOnly value. Default value is false
-
setCanToggle
Allows a boolean orvalueMapped
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 betweentrue
andfalse
, and for valueMapped fields, advancing the value to the next option in the valueMap.To enable this feature,
ListGrid.canEdit
must be set to true. For boolean type fieldscanToggle
is true by default, meaning settingcanEdit
to true implies the user can toggle the value via a single click without going into edit mode. You can disable this by explicitly settingcanToggle
to false for a boolean field.
Note that you can enable toggling only (without allowing the user to edit other fields) by just settinggrid.editEvent:"none"
.If
ListGrid.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 ifListGrid.autoSaveEdits
has been set to false, will be stored as an edit value for the record.Note : This is an advanced setting
- Parameters:
canToggle
- New canToggle value. Default value is varies- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCanToggle
Allows a boolean orvalueMapped
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 betweentrue
andfalse
, and for valueMapped fields, advancing the value to the next option in the valueMap.To enable this feature,
ListGrid.canEdit
must be set to true. For boolean type fieldscanToggle
is true by default, meaning settingcanEdit
to true implies the user can toggle the value via a single click without going into edit mode. You can disable this by explicitly settingcanToggle
to false for a boolean field.
Note that you can enable toggling only (without allowing the user to edit other fields) by just settinggrid.editEvent:"none"
.If
ListGrid.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 ifListGrid.autoSaveEdits
has been set to false, will be stored as an edit value for the record.- Returns:
- Current canToggle value. Default value is varies
- See Also:
-
setCellAlign
Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived fromalign
. If this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.- Parameters:
cellAlign
- New cellAlign value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCellAlign
Horizontal alignment for cells in this field's column: "left", "right" or "center".
If null, alignment is derived fromalign
. If this field is editable, the alignment of cells in the body will also be reflected in any editors for the field.- Returns:
- Current cellAlign value. Default value is null
- See Also:
-
setCellIcon
For a field of type:"icon" only, set the icon that appears in body cells. Unless settingfield.icon
, setting field.cellIcon will not show an icon in the header.To change this property after fields have been passed to
ListGrid.setFields()
, useListGrid.setFieldCellIcon()
.- Parameters:
cellIcon
- New cellIcon value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCellIcon
For a field of type:"icon" only, set the icon that appears in body cells. Unless settingfield.icon
, setting field.cellIcon will not show an icon in the header.To change this property after fields have been passed to
ListGrid.setFields()
, useListGrid.setFieldCellIcon()
.- Returns:
- Current cellIcon value. Default value is null
- See Also:
-
setCellPrompt
HTML to show in a hover over cells in this field. Useful for fixed hover text, such as a tooltip for an icon in a field of type "icon". To show a custom prompt per cell, seehoverHTML
.- Parameters:
cellPrompt
- New cellPrompt value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getCellPrompt
HTML to show in a hover over cells in this field. Useful for fixed hover text, such as a tooltip for an icon in a field of type "icon". To show a custom prompt per cell, seehoverHTML
.- Returns:
- Current cellPrompt value. Default value is null
- See Also:
-
setDataPath
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
- New dataPath value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getDataPath
dataPath for this field. This property allows the grid to display details of nested data structures in a flat list of columns.- Returns:
- Current dataPath value. Default value is null
-
setDateFormatter
Display format to use for date type values within this field.The
timeFormatter
may also be used to format underlying Date values as times (omitting the date part entirely). If bothdateFormatter
andtimeFormatter
are specified on a field, for fields specified astype "time"
thetimeFormatter
will be used, otherwise thedateFormatter
If
field.dateFormatter
andfield.timeFormatter
is unspecified, date display format may be defined at the component level viaListGrid.dateFormatter
, or for fields of type"datetime"
ListGrid.datetimeFormatter
. Otherwise the default is to use the system-wide default short date format, configured viaDateUtil.setShortDisplayFormat()
. Specify any validDateDisplayFormat
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
- New dateFormatter value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 (omitting the date part entirely). If bothdateFormatter
andtimeFormatter
are specified on a field, for fields specified astype "time"
thetimeFormatter
will be used, otherwise thedateFormatter
If
field.dateFormatter
andfield.timeFormatter
is unspecified, date display format may be defined at the component level viaListGrid.dateFormatter
, or for fields of type"datetime"
ListGrid.datetimeFormatter
. Otherwise the default is to use the system-wide default short date format, configured viaDateUtil.setShortDisplayFormat()
. Specify any validDateDisplayFormat
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:
- Current dateFormatter value. Default value is null
- See Also:
-
setDecimalPad
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
- New decimalPad value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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:
- Current decimalPad value. Default value is null
- See Also:
-
setDecimalPrecision
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
DataSourceField.decimalPad
for this.A number is always shown with its original precision when edited.
- Parameters:
decimalPrecision
- New decimalPrecision value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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
DataSourceField.decimalPad
for this.A number is always shown with its original precision when edited.
- Returns:
- Current decimalPrecision value. Default value is null
- See Also:
-
setDefaultGroupingMode
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically andfield.groupingMode
is unset. Seefield.groupingModes
.- Parameters:
defaultGroupingMode
- New defaultGroupingMode value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getDefaultGroupingMode
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically andfield.groupingMode
is unset. Seefield.groupingModes
.- Returns:
- Current defaultGroupingMode value. Default value is null
- See Also:
-
setDefaultIconSrc
If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.defaultIconSrc
.Note : This is an advanced setting
- Parameters:
defaultIconSrc
- New defaultIconSrc value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getDefaultIconSrc
If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.defaultIconSrc
.- Returns:
- Current defaultIconSrc value. Default value is null
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getIcons
Grid Editing
-
setDefaultWidth
Optional "default width" for this field. If set, this value will be returned by theListGrid.getDefaultFieldWidth()
method, and used as the autoFit size for the field's content.- Parameters:
defaultWidth
- New defaultWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getDefaultWidth
Optional "default width" for this field. If set, this value will be returned by theListGrid.getDefaultFieldWidth()
method, and used as the autoFit size for the field's content.- Returns:
- Current defaultWidth value. Default value is null
-
setDisplayField
Specifies theoptionDataSource
field used to retrieve the display values that are to be mapped from the internal values specified byvalueField
.If no
optionDataSource
is defined for the field anddisplayValueFromRecord
is not set tofalse
, 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 acom.smartgwt.client.types.ValueMap
- seeoptionDataSource
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 viaListGrid.getDisplayValue()
.- Parameters:
displayField
- New displayField value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getDisplayField
Specifies theoptionDataSource
field used to retrieve the display values that are to be mapped from the internal values specified byvalueField
.If no
optionDataSource
is defined for the field anddisplayValueFromRecord
is not set tofalse
, 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 acom.smartgwt.client.types.ValueMap
- seeoptionDataSource
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 viaListGrid.getDisplayValue()
.- Returns:
- Current displayField value. Default value is null
- See Also:
-
setDisplayValueFromRecord
If adisplayField
is set, should this field show record values from thedisplayField
?If
displayField
is specified, and there is no separateoptionDataSource
, 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
(andautoFetchDisplayMap
is false), the displayField would be ignored for the field and the underlyingrecord[fieldName] value
would be displayed to the user. This property may be set to true to override this behavior and pick up values from thedisplayField
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
- New displayValueFromRecord value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getDisplayValueFromRecord
If adisplayField
is set, should this field show record values from thedisplayField
?If
displayField
is specified, and there is no separateoptionDataSource
, 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
(andautoFetchDisplayMap
is false), the displayField would be ignored for the field and the underlyingrecord[fieldName] value
would be displayed to the user. This property may be set to true to override this behavior and pick up values from thedisplayField
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:
- Current displayValueFromRecord value. Default value is null
-
setEditorFormula
- Parameters:
editorFormula
- New editorFormula value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getEditorFormula
- Returns:
- Current editorFormula value. Default value is null
-
setEditorIconHeight
If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconHeight
.
If this property unset, the iconHeight property from the editor can be picked up fromiconHeight
instead.Note : This is an advanced setting
- Parameters:
editorIconHeight
- New editorIconHeight value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEditorIconHeight
If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconHeight
.
If this property unset, the iconHeight property from the editor can be picked up fromiconHeight
instead.- Returns:
- Current editorIconHeight value. Default value is null
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getIcons
Grid Editing
-
setEditorIconWidth
If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconWidth
.
If this property unset, the iconWidth property from the editor can be picked up fromiconWidth
instead.Note : This is an advanced setting
- Parameters:
editorIconWidth
- New editorIconWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEditorIconWidth
If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconWidth
.
If this property unset, the iconWidth property from the editor can be picked up fromiconWidth
instead.- Returns:
- Current editorIconWidth value. Default value is null
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getIcons
Grid Editing
-
setEditorImageURLPrefix
When some cell in this field is being edited, this property can be used to apply an explicitFormItem.imageURLPrefix
to the editor in question. This can be used to modify the valueIcons within the editor.
If unset, butimageURLPrefix
is specified, that will be used instead.Note : This is an advanced setting
- Parameters:
editorImageURLPrefix
- New editorImageURLPrefix value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEditorImageURLPrefix
When some cell in this field is being edited, this property can be used to apply an explicitFormItem.imageURLPrefix
to the editor in question. This can be used to modify the valueIcons within the editor.
If unset, butimageURLPrefix
is specified, that will be used instead.- Returns:
- Current editorImageURLPrefix value. Default value is null
- See Also:
-
setEditorImageURLSuffix
When some cell in this field is being edited, this property can be used to apply an explicitFormItem.imageURLSuffix
to the editor in question. This can be used to modify the valueIcons within the editor.
If unset, butimageURLPrefix
is specified, that will be used instead.Note : This is an advanced setting
- Parameters:
editorImageURLSuffix
- New editorImageURLSuffix value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEditorImageURLSuffix
When some cell in this field is being edited, this property can be used to apply an explicitFormItem.imageURLSuffix
to the editor in question. This can be used to modify the valueIcons within the editor.
If unset, butimageURLPrefix
is specified, that will be used instead.- Returns:
- Current editorImageURLSuffix value. Default value is null
- See Also:
-
setEditorTextFormula
- Parameters:
editorTextFormula
- New editorTextFormula value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getEditorTextFormula
- Returns:
- Current editorTextFormula value. Default value is null
-
setEditorValueIconHeight
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
- New editorValueIconHeight value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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:
- Current editorValueIconHeight value. Default value is null
- See Also:
-
setEditorValueIcons
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
- New editorValueIcons value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
setEditorValueIconWidth
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
- New editorValueIconWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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:
- Current editorValueIconWidth value. Default value is null
- See Also:
-
setEditorValueMap
A valueMap to use for editors shown for this field. By default if this is not specifiedfield.valueMap
will be used instead.Dynamic valueMaps can be provided by implementing
ListGrid.getEditorValueMap()
.- Parameters:
editorValueMap
- New editorValueMap value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
com.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap
ListGrid.setEditorValueMap(java.lang.String, java.util.LinkedHashMap)
Grid Editing
-
setEmptyCellValue
The value to display for a cell whose value is null or the empty string after applyingformatting
and valueMap (if any).This is the field-specific attribute. You may also set the
ListGrid.emptyCellValue
at the grid level to define the emptyCellValue for all empty fields in the grid.- Parameters:
emptyCellValue
- New emptyCellValue value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEmptyCellValue
The value to display for a cell whose value is null or the empty string after applyingformatting
and valueMap (if any).This is the field-specific attribute. You may also set the
ListGrid.emptyCellValue
at the grid level to define the emptyCellValue for all empty fields in the grid.- Returns:
- Current emptyCellValue value. Default value is null
- See Also:
-
setEnableWhen
Criteria to be evaluated to determine whether this field should be enabled.This criteria is dynamic and will be renterpreted each time the rule context changes.
- Parameters:
enableWhen
- New enableWhen value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEnableWhen
Criteria to be evaluated to determine whether this field should be enabled.This criteria is dynamic and will be renterpreted each time the rule context changes.
- Returns:
- Current enableWhen value. Default value is null
- See Also:
-
setEnterKeyEditAction
What to do when a user hits enter while editing this field?
Overrides theenterKeyEditAction
as specified at the listGrid level while focus is in this field.- Parameters:
enterKeyEditAction
- New enterKeyEditAction value. Default value is "done"- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEnterKeyEditAction
What to do when a user hits enter while editing this field?
Overrides theenterKeyEditAction
as specified at the listGrid level while focus is in this field.- Returns:
- Current enterKeyEditAction value. Default value is "done"
- See Also:
-
setEscapeHTML
By default HTML values in ListGrid cells will be interpreted by the browser. Setting this flag totrue
will cause HTML characters to be escaped, meaning the raw value of the field (for example"<b>AAA</b>"
) is displayed to the user rather than being interpreted as HTML (for example"AAA"
)If this field has an
aiFieldRequest
, then the default value of this setting istrue
.- Overrides:
setEscapeHTML
in classField
- Parameters:
escapeHTML
- New escapeHTML value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEscapeHTML
By default HTML values in ListGrid cells will be interpreted by the browser. Setting this flag totrue
will cause HTML characters to be escaped, meaning the raw value of the field (for example"<b>AAA</b>"
) is displayed to the user rather than being interpreted as HTML (for example"AAA"
)If this field has an
aiFieldRequest
, then the default value of this setting istrue
.- Overrides:
getEscapeHTML
in classField
- Returns:
- Current escapeHTML value. Default value is null
- See Also:
-
setEscapeKeyEditAction
What to do when a user hits escape while editing this field?
Overrides theescapeKeyEditAction
as specified at the listGrid level while focus is in this field.- Parameters:
escapeKeyEditAction
- New escapeKeyEditAction value. Default value is "cancel"- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getEscapeKeyEditAction
What to do when a user hits escape while editing this field?
Overrides theescapeKeyEditAction
as specified at the listGrid level while focus is in this field.- Returns:
- Current escapeKeyEditAction value. Default value is "cancel"
- See Also:
-
setExcludeFromState
If true, then this field is excluded from the bound component's view state. In addition, the field will not be selected as the default title field byDataBoundComponent.getTitleField()
ifDataBoundComponent.titleField
is not provided.- Parameters:
excludeFromState
- New excludeFromState value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getExcludeFromState
If true, then this field is excluded from the bound component's view state. In addition, the field will not be selected as the default title field byDataBoundComponent.getTitleField()
ifDataBoundComponent.titleField
is not provided.- Returns:
- Current excludeFromState value. Default value is null
- See Also:
-
setExportFieldWidth
When exporting data to Excel/OpenOffice format usingListGrid.exportData()
orListGrid.exportClientData()
withListGrid.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
- New exportFieldWidth value. Default value is true- Returns:
ListGridField
instance, for chaining setter calls
-
getExportFieldWidth
public boolean getExportFieldWidth()When exporting data to Excel/OpenOffice format usingListGrid.exportData()
orListGrid.exportClientData()
withListGrid.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:
- Current exportFieldWidth value. Default value is true
-
setExportFormat
FormatString
used during exports for numeric or date formatting. SeeDataSourceField.exportFormat
.- Parameters:
exportFormat
- New exportFormat value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getExportFormat
FormatString
used during exports for numeric or date formatting. SeeDataSourceField.exportFormat
.- Returns:
- Current exportFormat value. Default value is null
- See Also:
-
setExportRawNumbers
Dictates whether numeric values should be exported as raw numbers instead of formatted values when usingexportClientData()
.This property is only consulted if
exportRawValues
is not set to true at thegrid
orfield
level. That property causes all values, including numeric values, to be exported unformatted.This is useful for cases where an explicit ListGrid formatter function simply displays the number as a formatted string for the user (for example "1,234"). Exporting that formatted string rather than the underlying numeric value causes spreadsheet applications such as Excel to lose some functionality.
If this property is not explicitly set, numeric values will be exported as raw numbers for
XLS and OOXML export
only.This property overrides the setting at the
grid
level.- Parameters:
exportRawNumbers
- New exportRawNumbers value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getExportRawNumbers
Dictates whether numeric values should be exported as raw numbers instead of formatted values when usingexportClientData()
.This property is only consulted if
exportRawValues
is not set to true at thegrid
orfield
level. That property causes all values, including numeric values, to be exported unformatted.This is useful for cases where an explicit ListGrid formatter function simply displays the number as a formatted string for the user (for example "1,234"). Exporting that formatted string rather than the underlying numeric value causes spreadsheet applications such as Excel to lose some functionality.
If this property is not explicitly set, numeric values will be exported as raw numbers for
XLS and OOXML export
only.This property overrides the setting at the
grid
level.- Returns:
- Current exportRawNumbers value. Default value is null
-
setExportRawValues
Dictates whether the data in this field should be exported raw byexportClientData()
. 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
- New exportRawValues value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getExportRawValues
Dictates whether the data in this field should be exported raw byexportClientData()
. 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:
- Current exportRawValues value. Default value is null
-
setFilterEditorValueMap
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
- New filterEditorValueMap value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
setFilterOnKeypress
If set this will override thefilterOnKeypress setting at the grid level
For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.Note : This is an advanced setting
- Parameters:
filterOnKeypress
- New filterOnKeypress value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getFilterOnKeypress
If set this will override thefilterOnKeypress setting at the grid level
For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.- Returns:
- Current filterOnKeypress value. Default value is null
- See Also:
-
setFilterOperator
With theFilterEditor
showing, the defaultOperator
to use when matching values for this field.For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.Users can override this default operator, or revert to it, with the
"Filter using"
submenu, in the grid'sheaderContextMenu
; developers can useListGrid.setFieldSearchOperator()
to modify the operator andListGrid.clearFieldSearchOperator()
to reset to the default.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 produceAdvancedCriteria
rather than the simplerCriteria
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
- New filterOperator value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#setOperator
-
getFilterOperator
With theFilterEditor
showing, the defaultOperator
to use when matching values for this field.For a discussion of the various filtering and criteria-management APIs and when to use them, see the
Grid Filtering overview
.Users can override this default operator, or revert to it, with the
"Filter using"
submenu, in the grid'sheaderContextMenu
; developers can useListGrid.setFieldSearchOperator()
to modify the operator andListGrid.clearFieldSearchOperator()
to reset to the default.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 produceAdvancedCriteria
rather than the simplerCriteria
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:
- Current filterOperator value. Default value is null
- See Also:
-
setFormat
FormatString
for numeric or date formatting. SeeDataSourceField.format
.- Parameters:
format
- New format value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getFormat
FormatString
for numeric or date formatting. SeeDataSourceField.format
.- Returns:
- Current format value. Default value is null
- See Also:
-
setFrozen
Whether this field should be "frozen" for the purposes of horizontal scrolling. SeeFrozenFields
.- Parameters:
frozen
- New frozen value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getFrozen
Whether this field should be "frozen" for the purposes of horizontal scrolling. SeeFrozenFields
.- Returns:
- Current frozen value. Default value is null
- See Also:
-
setGroupGranularity
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
- New groupGranularity value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
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:
- Current groupGranularity value. Default value is null
-
setGroupingMode
For a field that allows multiplegrouping 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
- New groupingMode value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getGroupingMode
For a field that allows multiplegrouping 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:
- Current groupingMode value. Default value is null
- See Also:
-
setGroupingModes
If this field can be grouped, this attribute represents the set of grouping styles that are available. For example, a "date" field might be able to be grouped by week or month, as well as by the date itself.If
groupingModes
are present andgrouping is enabled
, the menu for this field includes a submenu of possible grouping modes generated from thegroupingModes
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 thefield
parameter togetGroupValue()
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 onSimpleType
declarations. See this list ofbuiltin grouping modes
for more information.- Parameters:
groupingModes
- New groupingModes value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getGroupingModes
If this field can be grouped, this attribute represents the set of grouping styles that are available. For example, a "date" field might be able to be grouped by week or month, as well as by the date itself.If
groupingModes
are present andgrouping is enabled
, the menu for this field includes a submenu of possible grouping modes generated from thegroupingModes
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 thefield
parameter togetGroupValue()
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 onSimpleType
declarations. See this list ofbuiltin grouping modes
for more information.- Returns:
- Current groupingModes value. Default value is null
-
setGroupPrecision
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
- New groupPrecision value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
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:
- Current groupPrecision value. Default value is null
-
setHeaderBaseStyle
Custom base style to apply to this field's header button instead ofListGrid.headerBaseStyle
.
Note that depending on the header button constructor, you may have to overrideheaderTitleStyle
as well.- Parameters:
headerBaseStyle
- New headerBaseStyle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHeaderBaseStyle
Custom base style to apply to this field's header button instead ofListGrid.headerBaseStyle
.
Note that depending on the header button constructor, you may have to overrideheaderTitleStyle
as well.- Returns:
- Current headerBaseStyle value. Default value is null
- See Also:
-
setHeaderButtonAriaRole
Aria role
for the header button for this field.Note : This is an advanced setting
- Parameters:
headerButtonAriaRole
- New headerButtonAriaRole value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getHeaderButtonAriaRole
Aria role
for the header button for this field.- Returns:
- Current headerButtonAriaRole value. Default value is null
-
setHeaderButtonAriaState
Aria state
for the header button for this field.Note : This is an advanced setting
- Parameters:
headerButtonAriaState
- New headerButtonAriaState value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getHeaderButtonAriaState
Aria state
for the header button for this field.- Returns:
- Current headerButtonAriaState value. Default value is null
-
setHeaderHoverDelay
Delay in ms for hovers shown over this field's header.If unset, any
hoverDelay
will be used for both header hovers and hovers shown over cells in the grid's body.- Parameters:
headerHoverDelay
- New headerHoverDelay value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getHeaderHoverDelay
Delay in ms for hovers shown over this field's header.If unset, any
hoverDelay
will be used for both header hovers and hovers shown over cells in the grid's body.- Returns:
- Current headerHoverDelay value. Default value is null
-
setHeaderTitle
Optional title for the header button for this field. If specified this will be displayed in the header button instead oftitle
orname
. Set to an empty string to suppress the title in the header button entirely.- Parameters:
headerTitle
- New headerTitle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHeaderTitle
Optional title for the header button for this field. If specified this will be displayed in the header button instead oftitle
orname
. Set to an empty string to suppress the title in the header button entirely.- Returns:
- Current headerTitle value. Default value is null
- See Also:
-
setHeaderTitleStyle
Custom titleStyle to apply to this field's header button instead ofListGrid.headerTitleStyle
.
Note that this will typically only have an effect ifListGrid.headerButtonConstructor
is set toStretchImgButton
or a subclass thereof.- Parameters:
headerTitleStyle
- New headerTitleStyle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHeaderTitleStyle
Custom titleStyle to apply to this field's header button instead ofListGrid.headerTitleStyle
.
Note that this will typically only have an effect ifListGrid.headerButtonConstructor
is set toStretchImgButton
or a subclass thereof.- Returns:
- Current headerTitleStyle value. Default value is null
- See Also:
-
setHidden
Marks field as initially hidden.
The user will still be able to show the field via a context menu. This may be suppressed by settingcanHide
to false, or by settingListGrid.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
DataSourceField.hidden
instead.- Parameters:
hidden
- New hidden value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 settingcanHide
to false, or by settingListGrid.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
DataSourceField.hidden
instead.- Returns:
- Current hidden value. Default value is null
- See Also:
-
setHideOnPhone
Set this property to true to suppress showing this field on mobile phones (handset-sized devices). To update this property at runtime useListGrid.setHideOnPhone()
Note that if
hidden
is set, or an explicitshowIf()
function exists that will take precedence over this setting. Similarly, an explicit call toListGrid.showField()
orListGrid.hideField()
will clear this setting.See also the related property
hideOnTablet
.- Parameters:
hideOnPhone
- New hideOnPhone value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHideOnPhone
Set this property to true to suppress showing this field on mobile phones (handset-sized devices). To update this property at runtime useListGrid.setHideOnPhone()
Note that if
hidden
is set, or an explicitshowIf()
function exists that will take precedence over this setting. Similarly, an explicit call toListGrid.showField()
orListGrid.hideField()
will clear this setting.See also the related property
hideOnTablet
.- Returns:
- Current hideOnPhone value. Default value is null
- See Also:
-
setHideOnTablet
Set this property to true to suppress showing this field on tablets (tablet-sized devices). To update this property at runtime useListGrid.setHideOnTablet()
Note that if
hidden
is set, or an explicitshowIf()
function exists that will take precedence over this setting. Similarly, an explicit call toListGrid.showField()
orListGrid.hideField()
will clear this setting.See also the related property
hideOnPhone
.- Parameters:
hideOnTablet
- New hideOnTablet value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHideOnTablet
Set this property to true to suppress showing this field on tablets (tablet-sized devices). To update this property at runtime useListGrid.setHideOnTablet()
Note that if
hidden
is set, or an explicitshowIf()
function exists that will take precedence over this setting. Similarly, an explicit call toListGrid.showField()
orListGrid.hideField()
will clear this setting.See also the related property
hideOnPhone
.- Returns:
- Current hideOnTablet value. Default value is null
- See Also:
-
setHiliteHTMLAfterFormat
If set to true, custom HTML applied as part of hiliting will be applied afterformatting
for each cell in this column. If false, hilite HTML will be applied before formatting.This attribute overrides
ListGrid.hiliteHTMLAfterFormat
as defined at the component level.- Parameters:
hiliteHTMLAfterFormat
- New hiliteHTMLAfterFormat value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getHiliteHTMLAfterFormat
If set to true, custom HTML applied as part of hiliting will be applied afterformatting
for each cell in this column. If false, hilite HTML will be applied before formatting.This attribute overrides
ListGrid.hiliteHTMLAfterFormat
as defined at the component level.- Returns:
- Current hiliteHTMLAfterFormat value. Default value is null
-
setHiliteIconHeight
Height for hilite icons for this field. OverridesListGrid.hiliteIconSize
,ListGrid.hiliteIconHeight
, andhiliteIconSize
.- Parameters:
hiliteIconHeight
- New hiliteIconHeight value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHiliteIconHeight
Height for hilite icons for this field. OverridesListGrid.hiliteIconSize
,ListGrid.hiliteIconHeight
, andhiliteIconSize
.- Returns:
- Current hiliteIconHeight value. Default value is null
- See Also:
-
setHiliteIconLeftPadding
How much padding should there be on the left ofhilite icons
for this field? OverridesListGrid.hiliteIconLeftPadding
- Parameters:
hiliteIconLeftPadding
- New hiliteIconLeftPadding value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHiliteIconLeftPadding
How much padding should there be on the left ofhilite icons
for this field? OverridesListGrid.hiliteIconLeftPadding
- Returns:
- Current hiliteIconLeftPadding value. Default value is null
- See Also:
-
setHiliteIconPosition
WhenListGrid.hiliteIcons
are present, where the hilite icon will be placed relative to the field value. SeeHiliteIconPosition
. OverridesListGrid.hiliteIconPosition
.- Parameters:
hiliteIconPosition
- New hiliteIconPosition value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHiliteIconPosition
WhenListGrid.hiliteIcons
are present, where the hilite icon will be placed relative to the field value. SeeHiliteIconPosition
. OverridesListGrid.hiliteIconPosition
.- Returns:
- Current hiliteIconPosition value. Default value is null
- See Also:
-
setHiliteIconRightPadding
How much padding should there be on the right ofhilite icons
for this field? OverridesListGrid.hiliteIconRightPadding
- Parameters:
hiliteIconRightPadding
- New hiliteIconRightPadding value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHiliteIconRightPadding
How much padding should there be on the right ofhilite icons
for this field? OverridesListGrid.hiliteIconRightPadding
- Returns:
- Current hiliteIconRightPadding value. Default value is null
- See Also:
-
setHiliteIconSize
Default width and height ofhilite icons
in this field. Takes precedence over hiliteIconWidth, hiliteIconHeight and hiliteIconSize specified at the component level. Can be overridden viahiliteIconWidth
andhiliteIconHeight
- Parameters:
hiliteIconSize
- New hiliteIconSize value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHiliteIconSize
Default width and height ofhilite icons
in this field. Takes precedence over hiliteIconWidth, hiliteIconHeight and hiliteIconSize specified at the component level. Can be overridden viahiliteIconWidth
andhiliteIconHeight
- Returns:
- Current hiliteIconSize value. Default value is null
- See Also:
-
setHiliteIconWidth
Width for hilite icons for this field. OverridesListGrid.hiliteIconSize
,ListGrid.hiliteIconWidth
, andhiliteIconSize
.- Parameters:
hiliteIconWidth
- New hiliteIconWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getHiliteIconWidth
Width for hilite icons for this field. OverridesListGrid.hiliteIconSize
,ListGrid.hiliteIconWidth
, andhiliteIconSize
.- Returns:
- Current hiliteIconWidth value. Default value is null
- See Also:
-
setHoverDelay
Delay in ms for hovers shown for cells in this field. If unset, the grid's hoverDelay will be used.This property also governes the hoverDelay for the header button. Developers wishing to have a different delay for hovers on the header can use
headerHoverDelay
in addition to this property.- Parameters:
hoverDelay
- New hoverDelay value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getHoverDelay
Delay in ms for hovers shown for cells in this field. If unset, the grid's hoverDelay will be used.This property also governes the hoverDelay for the header button. Developers wishing to have a different delay for hovers on the header can use
headerHoverDelay
in addition to this property.- Returns:
- Current hoverDelay value. Default value is null
-
setHoverWidth
Specifies the width of the canvas shown when the mouse hovers over cells in this field.If unset, default behavior is derived from
ListGrid.headerHoverWidth
.- Parameters:
hoverWidth
- New hoverWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getHoverWidth
Specifies the width of the canvas shown when the mouse hovers over cells in this field.If unset, default behavior is derived from
ListGrid.headerHoverWidth
.- Returns:
- Current hoverWidth value. Default value is null
-
setHoverWrap
This property may be set to customize thewrap
attribute for the canvas shown when the mouse hovers over cells in this field. Note that this causes a soft-wrap - if set, the hover text will wrap at word boundaries.If unset, default behavior is derived from
ListGrid.headerHoverWrap
.- Parameters:
hoverWrap
- New hoverWrap value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getHoverWrap
This property may be set to customize thewrap
attribute for the canvas shown when the mouse hovers over cells in this field. Note that this causes a soft-wrap - if set, the hover text will wrap at word boundaries.If unset, default behavior is derived from
ListGrid.headerHoverWrap
.- Returns:
- Current hoverWrap value. Default value is null
-
setIcon
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 alsofield.cellIcon
.To change this property after fields have been passed to
ListGrid.setFields()
, useListGrid.setFieldIcon()
.- Parameters:
icon
- New icon value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 alsofield.cellIcon
.To change this property after fields have been passed to
ListGrid.setFields()
, useListGrid.setFieldIcon()
.- Returns:
- Current icon value. Default value is null
- See Also:
-
setIconCursor
Specifies the cursor to display when the mouse pointer is over an icon image in a cell for either a field of typeicon
or avalueIcon
.If not explicitly specified, see
ListGrid.getIconCursor()
for how"icon"
fields determine icon image cursors, andListGrid.getValueIconCursor()
for how value icon image cursors are determined.Note : This is an advanced setting
- Parameters:
iconCursor
- New iconCursor value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getIconCursor
Specifies the cursor to display when the mouse pointer is over an icon image in a cell for either a field of typeicon
or avalueIcon
.If not explicitly specified, see
ListGrid.getIconCursor()
for how"icon"
fields determine icon image cursors, andListGrid.getValueIconCursor()
for how value icon image cursors are determined.- Returns:
- Current iconCursor value. Default value is null
-
setIconHeight
Ificon
is specified, this property can be used to specify the height of the icon to be displayed in the ListGrid header button. (SeeStatefulCanvas.iconHeight
)
If this field is editable, andeditorIconHeight
is unset, this property will be passed onto the editors for this field asFormItem.iconWidth
, which will effect the default size foricons
displayed in the editor.- Parameters:
iconHeight
- New iconHeight value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getIconHeight
Ificon
is specified, this property can be used to specify the height of the icon to be displayed in the ListGrid header button. (SeeStatefulCanvas.iconHeight
)
If this field is editable, andeditorIconHeight
is unset, this property will be passed onto the editors for this field asFormItem.iconWidth
, which will effect the default size foricons
displayed in the editor.- Returns:
- Current iconHeight value. Default value is null
- See Also:
-
getIcon()
com.smartgwt.client.widgets.grid.ListGridField#getIcons
-
setIconOrientation
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
- New iconOrientation value. Default value is "left"- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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:
- Current iconOrientation value. Default value is "left"
- See Also:
-
setIcons
If this field is editable, this property can be used to specifyicons
to be displayed in the editors displayed for this fieldNote : This is an advanced setting
- Parameters:
icons
- New icons value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
setIconSize
Ificon
is specified, this property can be used to specify the size of the icon to be displayed in the ListGrid header button. (SeeStatefulCanvas.iconSize
)- Parameters:
iconSize
- New iconSize value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getIconSize
Ificon
is specified, this property can be used to specify the size of the icon to be displayed in the ListGrid header button. (SeeStatefulCanvas.iconSize
)- Returns:
- Current iconSize value. Default value is null
- See Also:
-
setIconSpacing
Pixels between icon and title text.- Parameters:
iconSpacing
- New iconSpacing value. Default value is 6- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getIconSpacing
public int getIconSpacing()Pixels between icon and title text.- Returns:
- Current iconSpacing value. Default value is 6
- See Also:
-
setIconVAlign
If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconVAlign
.Note : This is an advanced setting
- Parameters:
iconVAlign
- New iconVAlign value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getIconVAlign
If this field is editable, this property will be passed to editors displayed for cells within this field asFormItem.iconVAlign
.- Returns:
- Current iconVAlign value. Default value is null
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getIcons
Grid Editing
-
setIconWidth
Ificon
is specified, this property can be used to specify the width of the icon to be displayed in the ListGrid header button. (SeeStatefulCanvas.iconWidth
)
If this field is editable, andeditorIconWidth
is unset, this property will be passed onto the editors for this field asFormItem.iconWidth
, which will effect the default size foricons
displayed in the editor.- Parameters:
iconWidth
- New iconWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getIconWidth
Ificon
is specified, this property can be used to specify the width of the icon to be displayed in the ListGrid header button. (SeeStatefulCanvas.iconWidth
)
If this field is editable, andeditorIconWidth
is unset, this property will be passed onto the editors for this field asFormItem.iconWidth
, which will effect the default size foricons
displayed in the editor.- Returns:
- Current iconWidth value. Default value is null
- See Also:
-
getIcon()
com.smartgwt.client.widgets.grid.ListGridField#getIcons
-
setIgnoreKeyboardClicks
If the user is navigating through the grid using the keyboard, record click or double click events may be generated via keyboard interactions (seeListGrid.generateClickOnSpace
,ListGrid.generateClickOnEnter
,ListGrid.generateDoubleClickOnSpace
,ListGrid.generateDoubleClickOnEnter
andListGrid.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
- New ignoreKeyboardClicks value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getIgnoreKeyboardClicks
If the user is navigating through the grid using the keyboard, record click or double click events may be generated via keyboard interactions (seeListGrid.generateClickOnSpace
,ListGrid.generateClickOnEnter
,ListGrid.generateDoubleClickOnSpace
,ListGrid.generateDoubleClickOnEnter
andListGrid.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:
- Current ignoreKeyboardClicks value. Default value is null
-
setImageHeight
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
- New imageHeight value. Default value is 16- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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:
- Current imageHeight value. Default value is 16
- See Also:
-
setImageSize
Size of images shown for fieldTypes image and imageFile in this field. This setting overrides the global ListGrid defaultListGrid.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
- New imageSize value. Default value is 16- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getImageSize
public int getImageSize()Size of images shown for fieldTypes image and imageFile in this field. This setting overrides the global ListGrid defaultListGrid.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:
- Current imageSize value. Default value is 16
- See Also:
-
setImageURLPrefix
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 anyvalueIcons
when determining the URL for the image.Note : This is an advanced setting
- Parameters:
imageURLPrefix
- New imageURLPrefix value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 anyvalueIcons
when determining the URL for the image.- Returns:
- Current imageURLPrefix value. Default value is null
- See Also:
-
setImageURLSuffix
If any cells in this field are showing a value icon (see:valueIcons
) or this is hasListGridFieldType
set to"image"
, 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 asFormItem.imageURLSuffix
.Note : This is an advanced setting
- Parameters:
imageURLSuffix
- New imageURLSuffix value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getImageURLSuffix
If any cells in this field are showing a value icon (see:valueIcons
) or this is hasListGridFieldType
set to"image"
, 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 asFormItem.imageURLSuffix
.- Returns:
- Current imageURLSuffix value. Default value is null
- See Also:
-
setImageWidth
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
- New imageWidth value. Default value is 16- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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:
- Current imageWidth value. Default value is 16
- See Also:
-
setIncludeFrom
Indicates this field's values should be fetched from another, related DataSource. The individual field will inherit settings such asfield.type
andfield.title
from the related DataSource just like fields from the primary DataSource.When
fechData()
is called, the automatically createdDSRequest
will specifyDSRequest.additionalOutputs
requesting the field, and anyCriteria
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 andfield.name
is not explicitly specified, this field'sname
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 usinglistGridField.includeFrom
todataSourceField.includeFrom
. This is because server responses to "add" and "update" operations which are initiated outside of this grid do not know about thelistGridField.includeFrom
setting, and so will not automatically return data for fields included in this way. Switching todataSourceField.includeFrom
ensures the field is always included in server responses, avoiding the issue.- Parameters:
includeFrom
- New includeFrom value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getIncludeFrom
Indicates this field's values should be fetched from another, related DataSource. The individual field will inherit settings such asfield.type
andfield.title
from the related DataSource just like fields from the primary DataSource.When
fechData()
is called, the automatically createdDSRequest
will specifyDSRequest.additionalOutputs
requesting the field, and anyCriteria
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 andfield.name
is not explicitly specified, this field'sname
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 usinglistGridField.includeFrom
todataSourceField.includeFrom
. This is because server responses to "add" and "update" operations which are initiated outside of this grid do not know about thelistGridField.includeFrom
setting, and so will not automatically return data for fields included in this way. Switching todataSourceField.includeFrom
ensures the field is always included in server responses, avoiding the issue.- Returns:
- Current includeFrom value. Default value is null
-
setIncludeInRecordSummary
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 alsoincludeInRecordSummaryFields
.- Parameters:
includeInRecordSummary
- New includeInRecordSummary value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
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 alsoincludeInRecordSummaryFields
.- Returns:
- Current includeInRecordSummary value. Default value is null
-
setIncludeInRecordSummaryFields
If this listGrid has any fields of type"summary"
and this field will beincluded
in summary calculations by default, this attribute provides an opportunity to explicitly specify which summary fields the record should be displayed in.Specified as an array of fieldNames. If set, this field value will only be included for record summary value calculations for summary fields who's name is included in this array.
- Parameters:
includeInRecordSummaryFields
- New includeInRecordSummaryFields value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getIncludeInRecordSummaryFields
If this listGrid has any fields of type"summary"
and this field will beincluded
in summary calculations by default, this attribute provides an opportunity to explicitly specify which summary fields the record should be displayed in.Specified as an array of fieldNames. If set, this field value will only be included for record summary value calculations for summary fields who's name is included in this array.
- Returns:
- Current includeInRecordSummaryFields value. Default value is null
- See Also:
-
setInitialValue
In an editable ListGrid, initial value for this field when the user begins editing a new record.initialValue
applies only if a new record is created by end user action (such as navigating past the end of the data whenListGrid.listEndEditAction
is "next") or by a call toListGrid.startEditingNew()
that does not specify theinitialValues
argument.- Parameters:
initialValue
- New initialValue value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getInitialValue
In an editable ListGrid, initial value for this field when the user begins editing a new record.initialValue
applies only if a new record is created by end user action (such as navigating past the end of the data whenListGrid.listEndEditAction
is "next") or by a call toListGrid.startEditingNew()
that does not specify theinitialValues
argument.- Returns:
- Current initialValue value. Default value is null
- See Also:
-
setIsRemoveField
If set to true andListGrid.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 thanisRemoveField
, such asname
ortitle
, may be left unset.Note : This is an advanced setting
- Parameters:
isRemoveField
- New isRemoveField value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getIsRemoveField
If set to true andListGrid.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 thanisRemoveField
, such asname
ortitle
, may be left unset.- Returns:
- Current isRemoveField value. Default value is null
- See Also:
-
setLeaveHeaderMenuButtonSpace
IfListGrid.showHeaderMenuButton
is true, when auto-fitting fields to the title width viaListGrid.autoFitFieldWidths
orautoFitWidth
, should the button be sized such that there is enough space for the header menu button to show without covering the field title?May be explicitly specified at the
field level
or at thegrid level
. If not explicitly specified space will be left for fields withalign
set to"left"
or"right"
, but not for fields with align set to"center"
.Note : This is an advanced setting
- Parameters:
leaveHeaderMenuButtonSpace
- New leaveHeaderMenuButtonSpace value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
setLinkText
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
ListGridRecord.linkText
.- Parameters:
linkText
- New linkText value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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
ListGridRecord.linkText
.- Returns:
- Current linkText value. Default value is null
- See Also:
-
setLinkTextProperty
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
- New linkTextProperty value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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:
- Current linkTextProperty value. Default value is null
- See Also:
-
setLinkURLPrefix
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
- New linkURLPrefix value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
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:
- Current linkURLPrefix value. Default value is null
-
setLinkURLSuffix
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
- New linkURLSuffix value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
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:
- Current linkURLSuffix value. Default value is null
-
setMaxWidth
WhenListGrid.showHeader
is false and a field is subject to autofitting (seeListGrid.autoFitFieldWidths
), sets the maximum width of the field. The actual effective maximum will be the largest of this property,minWidth
, andListGrid.minFieldWidth
. That is,minWidth
andListGrid.minFieldWidth
dominate this property.- Parameters:
maxWidth
- New maxWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getMaxWidth
WhenListGrid.showHeader
is false and a field is subject to autofitting (seeListGrid.autoFitFieldWidths
), sets the maximum width of the field. The actual effective maximum will be the largest of this property,minWidth
, andListGrid.minFieldWidth
. That is,minWidth
andListGrid.minFieldWidth
dominate this property.- Returns:
- Current maxWidth value. Default value is null
- See Also:
-
setMinWidth
When a field is subject to autofitting (seeListGrid.autoFitFieldWidths
), sets the minimum width of the field. The actual allowed minimum will be the maximum of:- this property,
-
width
(if a number), - the aufofit value determined by the widest value content in this field's column
-
ListGrid.minFieldWidth
- Parameters:
minWidth
- New minWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getMinWidth
When a field is subject to autofitting (seeListGrid.autoFitFieldWidths
), sets the minimum width of the field. The actual allowed minimum will be the maximum of:- this property,
-
width
(if a number), - the aufofit value determined by the widest value content in this field's column
-
ListGrid.minFieldWidth
- Returns:
- Current minWidth value. Default value is null
- See Also:
-
setMultiple
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 ifvalueMap
is set, the default editor will be aSelectItem
withSelectItem.multiple
set to true.Note that for databound grids it typically makes sense to set
DataSourceField.multiple
rather than setting the property directly on the ListGridField object.- Overrides:
setMultiple
in classField
- Parameters:
multiple
- New multiple value. Default value is false- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 ifvalueMap
is set, the default editor will be aSelectItem
withSelectItem.multiple
set to true.Note that for databound grids it typically makes sense to set
DataSourceField.multiple
rather than setting the property directly on the ListGridField object.- Overrides:
getMultiple
in classField
- Returns:
- Current multiple value. Default value is false
- See Also:
-
setName
Name of this field. Must be unique within theListGrid
as well as a valid JavaScript identifier - seeFieldName
for details and how to check for validity.The name of the field is also the property in each record which holds the record's value for the field.
If a
ListGrid.dataSource
is specified and theDataSource
has a field with the samename
, theListGridField
andDataSourceField
are merged, with any properties on theListGridField
overriding those on theDataSourceField
.- Overrides:
setName
in classDBCField
- Parameters:
name
- New name value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getName
Name of this field. Must be unique within theListGrid
as well as a valid JavaScript identifier - seeFieldName
for details and how to check for validity.The name of the field is also the property in each record which holds the record's value for the field.
If a
ListGrid.dataSource
is specified and theDataSource
has a field with the samename
, theListGridField
andDataSourceField
are merged, with any properties on theListGridField
overriding those on theDataSourceField
. -
setOptionCriteria
IfoptionDataSource
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 mappingsSee also
optionTextMatchStyle
.- Parameters:
optionCriteria
- New optionCriteria value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getOptionCriteria
IfoptionDataSource
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 mappingsSee also
optionTextMatchStyle
.- Returns:
- Current optionCriteria value. Default value is null
-
setOptionOperationId
If this field has an optionDataSource specified andautoFetchDisplayMap
is set, this attribute provides a way to customize theDSRequest.operationId
passed todataSource.fetchData()
when retrieving the display map from the option dataSource.- Parameters:
optionOperationId
- New optionOperationId value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getOptionOperationId
If this field has an optionDataSource specified andautoFetchDisplayMap
is set, this attribute provides a way to customize theDSRequest.operationId
passed todataSource.fetchData()
when retrieving the display map from the option dataSource.- Returns:
- Current optionOperationId value. Default value is null
-
setOptionTextMatchStyle
For fields with anoptionDataSource
, whereautoFetchDisplayMap
is true, this property will govern thetextMatchStyle
attribute of theDSRequest
parameter passed toDataSource.fetchData()
when retrieving the remote data set to be used as a basis for this field's valueMap.- Parameters:
optionTextMatchStyle
- New optionTextMatchStyle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getOptionTextMatchStyle
For fields with anoptionDataSource
, whereautoFetchDisplayMap
is true, this property will govern thetextMatchStyle
attribute of theDSRequest
parameter passed toDataSource.fetchData()
when retrieving the remote data set to be used as a basis for this field's valueMap.- Returns:
- Current optionTextMatchStyle value. Default value is null
-
setPartialSummary
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
- New partialSummary value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
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:
- Current partialSummary value. Default value is null
-
setPendingAsyncCellValue
A field-specific value to display for cells whose value is pending asynchronous generation.If set, this will override the grid-wide
ListGrid.pendingAsyncCellValue
setting for the field.- Parameters:
pendingAsyncCellValue
- New pendingAsyncCellValue value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getPendingAsyncCellValue
A field-specific value to display for cells whose value is pending asynchronous generation.If set, this will override the grid-wide
ListGrid.pendingAsyncCellValue
setting for the field.- Returns:
- Current pendingAsyncCellValue value. Default value is null
- See Also:
-
setPrompt
Causes a tooltip hover to appear on the header generated for this field (effectively setsCanvas.prompt
for the header).- Parameters:
prompt
- New prompt value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getPrompt
Causes a tooltip hover to appear on the header generated for this field (effectively setsCanvas.prompt
for the header).- Returns:
- Current prompt value. Default value is null
- See Also:
-
setRequired
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 theDataSourceField
, enabling both client and server side validation.- Overrides:
setRequired
in classField
- Parameters:
required
- New required value. Default value is false- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 theDataSourceField
, enabling both client and server side validation.- Returns:
- Current required value. Default value is false
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getValidators
GridValidation overview and related methods
-
setRotateTitle
Whether to rotate the field's title so it's rendered vertically from bottom to top. If unset, default behavior is derived fromListGrid.rotateHeaderTitles
.- Parameters:
rotateTitle
- New rotateTitle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getRotateTitle
Whether to rotate the field's title so it's rendered vertically from bottom to top. If unset, default behavior is derived fromListGrid.rotateHeaderTitles
.- Returns:
- Current rotateTitle value. Default value is null
- See Also:
-
setSelectCellTextOnClick
Should the cell content be natively selected (ready for copying to clip-board) on click?See
ListGrid.selectCellTextOnClick
for more information.- Parameters:
selectCellTextOnClick
- New selectCellTextOnClick value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getSelectCellTextOnClick
Should the cell content be natively selected (ready for copying to clip-board) on click?See
ListGrid.selectCellTextOnClick
for more information.- Returns:
- Current selectCellTextOnClick value. Default value is null
-
setShouldPrint
Whether this field should be included in the printable representation of the grid.- Parameters:
shouldPrint
- New shouldPrint value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getShouldPrint
Whether this field should be included in the printable representation of the grid.- Returns:
- Current shouldPrint value. Default value is null
- See Also:
-
setShowAlternateStyle
When set to false, don't apply alternate-row styling to this field.Note : This is an advanced setting
- Parameters:
showAlternateStyle
- New showAlternateStyle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getShowAlternateStyle
When set to false, don't apply alternate-row styling to this field.- Returns:
- Current showAlternateStyle value. Default value is null
-
setShowDefaultContextMenu
When set to false, this field will not show a context menu in its header.- Parameters:
showDefaultContextMenu
- New showDefaultContextMenu value. Default value is true- Returns:
ListGridField
instance, for chaining setter calls
-
getShowDefaultContextMenu
When set to false, this field will not show a context menu in its header.- Returns:
- Current showDefaultContextMenu value. Default value is true
-
setShowDisabledIcon
If using an icon for this button, whether to switch the icon image if the button becomes disabled.- Parameters:
showDisabledIcon
- New showDisabledIcon value. Default value is true- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getShowDisabledIcon
If using an icon for this button, whether to switch the icon image if the button becomes disabled.- Returns:
- Current showDisabledIcon value. Default value is true
- See Also:
-
setShowDownIcon
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.- Parameters:
showDownIcon
- New showDownIcon value. Default value is false- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getShowDownIcon
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button.- Returns:
- Current showDownIcon value. Default value is false
- See Also:
-
setShowEllipsisWhenClipped
Should ellipses be displayed when this field's cell content is clipped? To set this property at the grid level, useListGrid.showEllipsisWhenClipped
- Parameters:
showEllipsisWhenClipped
- New showEllipsisWhenClipped value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getShowEllipsisWhenClipped
Should ellipses be displayed when this field's cell content is clipped? To set this property at the grid level, useListGrid.showEllipsisWhenClipped
- Returns:
- Current showEllipsisWhenClipped value. Default value is null
-
setShowFileInline
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
- New showFileInline value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
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:
- Current showFileInline value. Default value is null
-
setShowFilterEditorHovers
When set to false, no hover is shown for the field editor in this field. Otherwise, a hover shows the current field's criteria description along with theListGrid.filterWindowCriteria
description if configured.All hovers for the filter editor can be disabled using
ListGrid.showFilterEditorHovers
.The descriptive text for criteria is formatted by
DataSource.getAdvancedCriteriaDescription()
.- Parameters:
showFilterEditorHovers
- New showFilterEditorHovers value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getShowFilterEditorHovers
When set to false, no hover is shown for the field editor in this field. Otherwise, a hover shows the current field's criteria description along with theListGrid.filterWindowCriteria
description if configured.All hovers for the filter editor can be disabled using
ListGrid.showFilterEditorHovers
.The descriptive text for criteria is formatted by
DataSource.getAdvancedCriteriaDescription()
.- Returns:
- Current showFilterEditorHovers value. Default value is null
- See Also:
-
setShowFocusedIcon
If using an icon for this button, whether to switch the icon image when the button receives focus.If
StatefulCanvas.showFocusedAsOver
is true, the"Over"
icon will be displayed when the canvas has focus, otherwise a separate"Focused"
icon will be displayed- Parameters:
showFocusedIcon
- New showFocusedIcon value. Default value is false- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getShowFocusedIcon
If using an icon for this button, whether to switch the icon image when the button receives focus.If
StatefulCanvas.showFocusedAsOver
is true, the"Over"
icon will be displayed when the canvas has focus, otherwise a separate"Focused"
icon will be displayed- Returns:
- Current showFocusedIcon value. Default value is false
- See Also:
-
setShowGridSummary
IfListGrid.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 explicitsummaryFunction
is specified or if adefault summary function
is defined for the specified field type.- Parameters:
showGridSummary
- New showGridSummary value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getShowGridSummary
IfListGrid.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 explicitsummaryFunction
is specified or if adefault summary function
is defined for the specified field type.- Returns:
- Current showGridSummary value. Default value is null
-
setShowGroupSummary
IfListGrid.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 explicitsummaryFunction
is specified or if adefault summary function
is defined for the specified field type.- Parameters:
showGroupSummary
- New showGroupSummary value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getShowGroupSummary
IfListGrid.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 explicitsummaryFunction
is specified or if adefault summary function
is defined for the specified field type.- Returns:
- Current showGroupSummary value. Default value is null
-
setShowHilitesInGroupSummary
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
ListGrid.showHilitesInGroupSummary
property.- Parameters:
showHilitesInGroupSummary
- New showHilitesInGroupSummary value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
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
ListGrid.showHilitesInGroupSummary
property.- Returns:
- Current showHilitesInGroupSummary value. Default value is null
-
setShowHover
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 viafield.hoverHTML()
.ListGrid.showHover
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
ListGrid.canHover
to false.- Parameters:
showHover
- New showHover value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 viafield.hoverHTML()
.ListGrid.showHover
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
ListGrid.canHover
to false.- Returns:
- Current showHover value. Default value is null
- See Also:
-
setShowHoverComponents
When set to true and showHover is also true for the field, shows a widget hovering at the mouse point.A number of builtin modes are provided - see
HoverMode
.Also supported at the
ListGrid-level
.- Parameters:
showHoverComponents
- New showHoverComponents value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getShowHoverComponents
When set to true and showHover is also true for the field, shows a widget hovering at the mouse point.A number of builtin modes are provided - see
HoverMode
.Also supported at the
ListGrid-level
.- Returns:
- Current showHoverComponents value. Default value is null
-
setShowRollOverIcon
If using an icon for this button, whether to switch the icon image on mouse rollover.- Parameters:
showRollOverIcon
- New showRollOverIcon value. Default value is false- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getShowRollOverIcon
If using an icon for this button, whether to switch the icon image on mouse rollover.- Returns:
- Current showRollOverIcon value. Default value is false
- See Also:
-
setShowSelectedIcon
If using an icon for this button, whether to switch the icon image when the button becomes selected.- Parameters:
showSelectedIcon
- New showSelectedIcon value. Default value is false- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getShowSelectedIcon
If using an icon for this button, whether to switch the icon image when the button becomes selected.- Returns:
- Current showSelectedIcon value. Default value is false
- See Also:
-
setShowTitle
This property may be set tofalse
to explicitly suppress display of the field title in the column header button for the field.- Parameters:
showTitle
- New showTitle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getShowTitle
This property may be set tofalse
to explicitly suppress display of the field title in the column header button for the field.- Returns:
- Current showTitle value. Default value is null
-
setShowValueIconOnly
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
FormItem.showValueIconOnly
will be passed through to editors displayed in this field.- Parameters:
showValueIconOnly
- New showValueIconOnly value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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
FormItem.showValueIconOnly
will be passed through to editors displayed in this field.- Returns:
- Current showValueIconOnly value. Default value is null
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
getSuppressValueIcon()
ImageColumns overview and related methods
-
setSkipLineBreaks
By default, whenescaping HTML
, we convert line breaks (\r\n, \r, and \n) to HTML <br> tags so that visible cell content respects the original break characters. Set this property true to instead show the content as a single line (or potentially wrapped to avoid clipping ifListGrid.wrapCells
is true).If defaulted to null, behavior is determined by
ListGrid.skipLineBreaks
.- Parameters:
skipLineBreaks
- New skipLineBreaks value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getSkipLineBreaks
By default, whenescaping HTML
, we convert line breaks (\r\n, \r, and \n) to HTML <br> tags so that visible cell content respects the original break characters. Set this property true to instead show the content as a single line (or potentially wrapped to avoid clipping ifListGrid.wrapCells
is true).If defaulted to null, behavior is determined by
ListGrid.skipLineBreaks
.- Returns:
- Current skipLineBreaks value. Default value is null
- See Also:
-
setSortByDisplayField
For a field withdisplayField
configured, should client-side sorting be performed on the display field value? Unless explicitly set tofalse
, the display field value is used.- Parameters:
sortByDisplayField
- New sortByDisplayField value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getSortByDisplayField
For a field withdisplayField
configured, should client-side sorting be performed on the display field value? Unless explicitly set tofalse
, the display field value is used.- Returns:
- Current sortByDisplayField value. Default value is null
-
setSortByMappedValue
IfvalueMap
is set, and the grid issorted
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 tofalse
to sort by underlying data value. Note that this has no effect if asortNormalizer()
has been specified.- Parameters:
sortByMappedValue
- New sortByMappedValue value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getSortByMappedValue
IfvalueMap
is set, and the grid issorted
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 tofalse
to sort by underlying data value. Note that this has no effect if asortNormalizer()
has been specified.- Returns:
- Current sortByMappedValue value. Default value is null
-
setSortDirection
Specifies the default sorting direction for this column. If specified on thedefault sort field
for the listGrid, sorting occurs automatically, otherwise this will be the default direction when the user clicks the field header, or callsListGrid.sort()
without specifying an explicit sort direction.Overrides
ListGrid.sortDirection
.Because the grid's
sortDirection
setting is updated whenever the grid is sorted, it is recommended to explicitly set the field'ssortDirection
if it is important to use a particular sorting direction as the default for the field.- Parameters:
sortDirection
- New sortDirection value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getSortDirection
Specifies the default sorting direction for this column. If specified on thedefault sort field
for the listGrid, sorting occurs automatically, otherwise this will be the default direction when the user clicks the field header, or callsListGrid.sort()
without specifying an explicit sort direction.Overrides
ListGrid.sortDirection
.Because the grid's
sortDirection
setting is updated whenever the grid is sorted, it is recommended to explicitly set the field'ssortDirection
if it is important to use a particular sorting direction as the default for the field.- Returns:
- Current sortDirection value. Default value is null
- See Also:
-
setSpannedHeaderBaseStyle
Custom base style to apply to this field's header button instead ofListGrid.spannedHeaderBaseStyle
when the grid is showing header spans.- Parameters:
spannedHeaderBaseStyle
- New spannedHeaderBaseStyle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getSpannedHeaderBaseStyle
Custom base style to apply to this field's header button instead ofListGrid.spannedHeaderBaseStyle
when the grid is showing header spans.- Returns:
- Current spannedHeaderBaseStyle value. Default value is null
- See Also:
-
setSummaryTitle
Deprecated.Rather than customizing the summaryTitle developers should typically use theheaderTitle
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 totitle
. 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
- New summaryTitle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getSummaryTitle
Deprecated.Rather than customizing the summaryTitle developers should typically use theheaderTitle
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 totitle
. 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. Default value is null
- See Also:
-
setSummaryValue
The value to display for a ListGridField when it appears in thesummaryRow
. The default for normal fields is null and for special fields, like thecheckboxField
, the default is to show a blank value (a non-breaking space).- Parameters:
summaryValue
- New summaryValue value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getSummaryValue
The value to display for a ListGridField when it appears in thesummaryRow
. The default for normal fields is null and for special fields, like thecheckboxField
, the default is to show a blank value (a non-breaking space).- Returns:
- Current summaryValue value. Default value is null
- See Also:
-
setSummaryValueTitle
IfListGrid.showGridSummary
orListGrid.showGroupSummary
is true and thesummaryFunction
is set to"title"
, this attribute may be set to a string to display in the group and/or grid summary. If unspecified thetitle
will show up in the summary.- Parameters:
summaryValueTitle
- New summaryValueTitle value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getSummaryValueTitle
IfListGrid.showGridSummary
orListGrid.showGroupSummary
is true and thesummaryFunction
is set to"title"
, this attribute may be set to a string to display in the group and/or grid summary. If unspecified thetitle
will show up in the summary.- Returns:
- Current summaryValueTitle value. Default value is null
-
setSuppressValueIcon
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
ListGrid.booleanTrueImage
andListGrid.booleanFalseImage
for fields of typeboolean
.- Parameters:
suppressValueIcon
- New suppressValueIcon value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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
ListGrid.booleanTrueImage
andListGrid.booleanFalseImage
for fields of typeboolean
.- Returns:
- Current suppressValueIcon value. Default value is null
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
getShowValueIconOnly()
ImageColumns overview and related methods
-
setTarget
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 thetarget
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
- New target value. Default value is "_blank"- Returns:
ListGridField
instance, for chaining setter calls
-
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 thetarget
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:
- Current target value. Default value is "_blank"
-
setTimeFormatter
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 explicitdateFormatter
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
FormItem.timeFormatter
.Note : This is an advanced setting
- Parameters:
timeFormatter
- New timeFormatter value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 explicitdateFormatter
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
FormItem.timeFormatter
.- Returns:
- Current timeFormatter value. Default value is null
- See Also:
-
setTitle
A title for this field, to display in the header for the field and in other contexts such as themenu for picking visible fields
.Note: To customize the display of just the title in the header, use the
headerTitle
property instead so that other places where the title appears in the UI are not affected. For example, you might setheaderTitle
to an empty string to suppress the header title on a narrow column, but you would retain the normal title in thetitle
property to avoid a blank menu item in the field picker menu,hilite editor
, and other contexts.
If this method is called after the component has been drawn/initialized: Change the title of a field after the grid is created.- Overrides:
setTitle
in classField
- Parameters:
title
- name of the field, or index. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getTitle
A title for this field, to display in the header for the field and in other contexts such as themenu for picking visible fields
.Note: To customize the display of just the title in the header, use the
headerTitle
property instead so that other places where the title appears in the UI are not affected. For example, you might setheaderTitle
to an empty string to suppress the header title on a narrow column, but you would retain the normal title in thetitle
property to avoid a blank menu item in the field picker menu,hilite editor
, and other contexts. -
setType
ListGrids picks a renderer for the view and edit mode of a field based on this attribute. SeeListGridFieldType
for a summary of how types are rendered.- Parameters:
type
- New type value. Default value is "text"- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getType
ListGrids picks a renderer for the view and edit mode of a field based on this attribute. SeeListGridFieldType
for a summary of how types are rendered.- Returns:
- Current type value. Default value is "text"
- See Also:
-
setUserFormula
Formula definition for this field.Advanced applications that wish to save formulas separately from a grid's
viewState
can provide aUserFormula
as part of the field definition, and may subsequently respond to an updated formula via theListGrid.formulaUpdated()
notification.Note that the current implementation of
UserFormula
simply executesUserFormula.text
as a JavaScript string after making special variables and methods available to the formula. It is safe to allow users to define formulas for themselves (since an end user can always execute whatever JavaScript they want via the browser's built-in developer tools), and is safe to allow formulas to be shared between trusted users. However it would not be safe to allow an untrusted user to create formulas that are shared to other users.Also, while the current implementation would allow creation of a formula that calls JavaScript functions that are not part of the standard or custom MathFunctions, this should not be relied upon, as future versions of the formula engine may prohibit such calls.
To change this field's formula, either call
ListGrid.setUserFormula()
with a newUserFormula
object or callListGrid.setUserFormulaText()
to change just theUserFormula.text
.It is undefined behavior to share the same record objects, or the same
ResultSet
instances, among multiple grids if one of the grid's fields specifies auserFormula
,userSummary
,aiFieldRequest
, oraiHoverRequest
, or if one of the grids has aHilite
with an asynchronous filter in the hilite'scriteria
.
If this method is called after the component has been drawn/initialized: Updates theuserFormula
of the specified field. This method is preferred over setting the the 'userFormula' property of the field directly because it also updates any component dependencies and recalculates the field. If the formula is not passed, it is assumed that the formula has already been updated and only the dependency propagation logic will run.Known component dependencies are:
- the cached record values of the formula for this field
- the common formula variable => field name map maintained by the component for calls to the FormulaBuilder
- any generated field that references the field's calculated values
- Parameters:
userFormula
- field owning the formula. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getUserFormula
Formula definition for this field.Advanced applications that wish to save formulas separately from a grid's
viewState
can provide aUserFormula
as part of the field definition, and may subsequently respond to an updated formula via theListGrid.formulaUpdated()
notification.Note that the current implementation of
UserFormula
simply executesUserFormula.text
as a JavaScript string after making special variables and methods available to the formula. It is safe to allow users to define formulas for themselves (since an end user can always execute whatever JavaScript they want via the browser's built-in developer tools), and is safe to allow formulas to be shared between trusted users. However it would not be safe to allow an untrusted user to create formulas that are shared to other users.Also, while the current implementation would allow creation of a formula that calls JavaScript functions that are not part of the standard or custom MathFunctions, this should not be relied upon, as future versions of the formula engine may prohibit such calls.
To change this field's formula, either call
ListGrid.setUserFormula()
with a newUserFormula
object or callListGrid.setUserFormulaText()
to change just theUserFormula.text
.It is undefined behavior to share the same record objects, or the same
ResultSet
instances, among multiple grids if one of the grid's fields specifies auserFormula
,userSummary
,aiFieldRequest
, oraiHoverRequest
, or if one of the grids has aHilite
with an asynchronous filter in the hilite'scriteria
.- Returns:
- Current userFormula value. Default value is null
-
setUserSummary
Summary definition for this field.Advanced applications that wish to save summaries separately from a grid's
viewState
can provide aUserSummary
as part of the field definition, and may subsequently respond to an updated summary via theListGrid.summaryUpdated()
notification.To change this field's summary definition, either call
ListGrid.setUserSummary()
with a newUserSummary
object or callListGrid.setUserSummaryText()
to change just theUserSummary.text
.It is undefined behavior to share the same record objects, or the same
ResultSet
instances, among multiple grids if one of the grid's fields specifies auserSummary
,userFormula
,aiFieldRequest
, oraiHoverRequest
, or if one of the grids has aHilite
with an asynchronous filter in the hilite'scriteria
.
If this method is called after the component has been drawn/initialized: Updates theuserSummary
of the specified field. This method is preferred over setting the 'userSummary' property of the field directly because it also updates any component dependencies and recomputes the field. If the summary is not passed, it is assumed that the summary has already been updated and only the dependency propagation logic will run.Known component dependencies are:
- the cached record values of the summary for this field
- any generated field that references the field's computed summaries
- Parameters:
userSummary
- field owning the summary. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getUserSummary
Summary definition for this field.Advanced applications that wish to save summaries separately from a grid's
viewState
can provide aUserSummary
as part of the field definition, and may subsequently respond to an updated summary via theListGrid.summaryUpdated()
notification.To change this field's summary definition, either call
ListGrid.setUserSummary()
with a newUserSummary
object or callListGrid.setUserSummaryText()
to change just theUserSummary.text
.It is undefined behavior to share the same record objects, or the same
ResultSet
instances, among multiple grids if one of the grid's fields specifies auserSummary
,userFormula
,aiFieldRequest
, oraiHoverRequest
, or if one of the grids has aHilite
with an asynchronous filter in the hilite'scriteria
.- Returns:
- Current userSummary value. Default value is null
-
setValidateOnChange
If set to true, anyvalidators
for this field will be run whenever the value of the field is changed.Analogous to the
FormItem.validateOnChange
property.- Parameters:
validateOnChange
- New validateOnChange value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getValidateOnChange
If set to true, anyvalidators
for this field will be run whenever the value of the field is changed.Analogous to the
FormItem.validateOnChange
property.- Returns:
- Current validateOnChange value. Default value is null
- See Also:
-
setValidators
Array ofValidator
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 theDataSourceField
, enabling both client and server side validation.- Parameters:
validators
- New validators value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
setValign
Specifies vertical alignment in the column header for this field: "top", "center", or "bottom". If unset, default behavior is derived fromListGrid.headerTitleVAlign
.- Parameters:
valign
- New valign value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getValign
Specifies vertical alignment in the column header for this field: "top", "center", or "bottom". If unset, default behavior is derived fromListGrid.headerTitleVAlign
.- Returns:
- Current valign value. Default value is null
- See Also:
-
setValueField
Specifies theoptionDataSource
field used to retrieve the stored values that are to be mapped to the display values (specified bydisplayField
). Note that if this field is editable this will also be applied to this field's editors.- Parameters:
valueField
- New valueField value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
getValueField
Specifies theoptionDataSource
field used to retrieve the stored values that are to be mapped to the display values (specified bydisplayField
). Note that if this field is editable this will also be applied to this field's editors.- Returns:
- Current valueField value. Default value is null
-
setValueIconHeight
Height for value icons for this listGrid field. OverridesListGrid.valueIconSize
,ListGrid.valueIconHeight
, andvalueIconSize
.- Parameters:
valueIconHeight
- New valueIconHeight value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getValueIconHeight
Height for value icons for this listGrid field. OverridesListGrid.valueIconSize
,ListGrid.valueIconHeight
, andvalueIconSize
.- Returns:
- Current valueIconHeight value. Default value is null
- See Also:
-
setValueIconLeftPadding
How much padding should there be on the left of valueIcons for this field OverridesListGrid.valueIconLeftPadding
- Parameters:
valueIconLeftPadding
- New valueIconLeftPadding value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getValueIconLeftPadding
How much padding should there be on the left of valueIcons for this field OverridesListGrid.valueIconLeftPadding
- Returns:
- Current valueIconLeftPadding value. Default value is null
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
ImageColumns overview and related methods
-
setValueIconOrientation
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 ifshowValueIconOnly
is true- Parameters:
valueIconOrientation
- New valueIconOrientation value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 ifshowValueIconOnly
is true- Returns:
- Current valueIconOrientation value. Default value is null
- See Also:
-
setValueIconRightPadding
How much padding should there be on the right of valueIcons for this field OverridesListGrid.valueIconRightPadding
- Parameters:
valueIconRightPadding
- New valueIconRightPadding value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getValueIconRightPadding
How much padding should there be on the right of valueIcons for this field OverridesListGrid.valueIconRightPadding
- Returns:
- Current valueIconRightPadding value. Default value is null
- See Also:
-
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
ImageColumns overview and related methods
-
setValueIcons
This property is a mapping from data values for this field tourls
for icons to display for those data values.For example, given a field named "status" with possible values "Normal", "Slow", "Offline", the follow definition would show various icons for that field:
ListGridField statusField = new ListGridField("status"); statusField.setValueIcons(new HashMap<String, String>() {{ put("Normal", "greenIcon.png"); put("Slow", "yellowIcon.png"); put("Offline", "redIcon.png"); }});
If a simple value-to-URL mapping is not enough, you can override
ListGrid.getValueIcon()
to customize the behavior. You can even specify an emptyvalueIcons
map and useListGrid.getValueIcon()
to return arbitrary icons with no fixed mapping.valueIcons
can either be displayed alongside the normal value or can replace the normal field value so that only the icon is shown. SeeshowValueIconOnly
. When placed alongside the value, usevalueIconOrientation
to control left- vs right-side placement.If inline editing is enabled for this field, editors displayed for this field will also show valueIcons. 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
If
ListGridField.valueIconClick()
is defined for the field, a pointer cursor will be shown when the user rolls over the valueIcon, and the valueIconClick method will execute when the user clicks the icon.- Parameters:
valueIcons
- New valueIcons value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
setValueIconSize
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 viavalueIconWidth
and {ListGridField.valueIconHeight}- Parameters:
valueIconSize
- New valueIconSize value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
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 viavalueIconWidth
and {ListGridField.valueIconHeight}- Returns:
- Current valueIconSize value. Default value is null
- See Also:
-
setValueIconWidth
Width for value icons for this listGrid field. OverridesListGrid.valueIconSize
,ListGrid.valueIconWidth
, andvalueIconSize
.- Parameters:
valueIconWidth
- New valueIconWidth value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getValueIconWidth
Width for value icons for this listGrid field. OverridesListGrid.valueIconSize
,ListGrid.valueIconWidth
, andvalueIconSize
.- Returns:
- Current valueIconWidth value. Default value is null
- See Also:
-
setValueMap
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 (seeListGrid.canEdit
,canEdit
), editors displayed for this field will pick up their valueMap either from this value or fromeditorValueMap
.See also
DataSourceField.valueMap
.- Overrides:
setValueMap
in classField
- Parameters:
valueMap
- New valueMap value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
setValueMap
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 (seeListGrid.canEdit
,canEdit
), editors displayed for this field will pick up their valueMap either from this value or fromeditorValueMap
.See also
DataSourceField.valueMap
.- Parameters:
valueMap
- New valueMap value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
setVisibleWhen
Criteria to be evaluated to determine whether this field should be visible.This criteria is dynamic and will be renterpreted each time the rule context changes. Note that calling
ListGrid.showField()
orListGrid.hideField()
explicitly will cause any visibleWhen attribute to be dropped.- Parameters:
visibleWhen
- New visibleWhen value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
-
getVisibleWhen
Criteria to be evaluated to determine whether this field should be visible.This criteria is dynamic and will be renterpreted each time the rule context changes. Note that calling
ListGrid.showField()
orListGrid.hideField()
explicitly will cause any visibleWhen attribute to be dropped.- Returns:
- Current visibleWhen value. Default value is null
- See Also:
-
setWrap
Should the field title wrap if there is not enough space horizontally to accommodate it. If unset, default behavior is derived fromListGrid.wrapHeaderTitles
. (This is a soft-wrap - if set the title will wrap at word boundaries.)Notes:
- If autofitting is active,
width
andminWidth
can be set to control the minimum field width - see the links for details. - This feature is incompatible with
ListGrid.clipHeaderTitles
, andclipHeaderTitles
will be disabled for wrapping fields.
- Parameters:
wrap
- New wrap value. Default value is null- Returns:
ListGridField
instance, for chaining setter calls- See Also:
- If autofitting is active,
-
getWrap
Should the field title wrap if there is not enough space horizontally to accommodate it. If unset, default behavior is derived fromListGrid.wrapHeaderTitles
. (This is a soft-wrap - if set the title will wrap at word boundaries.)Notes:
- If autofitting is active,
width
andminWidth
can be set to control the minimum field width - see the links for details. - This feature is incompatible with
ListGrid.clipHeaderTitles
, andclipHeaderTitles
will be disabled for wrapping fields.
- Returns:
- Current wrap value. Default value is null
- See Also:
- If autofitting is active,
-
addEditorEnterHandler
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()
orListGrid.setEditValues()
.- Specified by:
addEditorEnterHandler
in interfaceHasEditorEnterHandlers
- Parameters:
handler
- the editorEnter handler- Returns:
HandlerRegistration
used to remove this handler
-
addEditorExitHandler
Add a editorExit handler.Callback fired when the user attempts to navigate away from the current edit cell, or complete the current edit.
CallEditorExitEvent.cancel()
from withinEditorExitHandler.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 interfaceHasEditorExitHandlers
- Parameters:
handler
- the editorExit handler- Returns:
HandlerRegistration
used to remove this handler
-
formatCellValue
public String formatCellValue(Object value, ListGridRecord record, int rowNum, int colNum, ListGrid grid) Deprecated.UsesetCellFormatter()
orListGrid.setCellFormatter()
to install aCellFormatter
. This method is not a valid override point for the default behavior.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 overformatCellValue
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
formatEditorValue()
is provided for that purpose.- Parameters:
value
- raw value for the cell, from the record for the rowrecord
- Record object for the cell. Note: If this is a new row that has not been saved, in an editable grid, it has no associated record object. In this case the edit values will be passed in as this parameter (seeListGrid.getEditValues()
)rowNum
- row number for the cellcolNum
- column number for the cell.grid
- the ListGrid displaying the cell- Returns:
- HTML to display in the cell.
See
HTMLString
- See Also:
-
ListGrid.setCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter)
com.smartgwt.client.widgets.grid.ListGridField#formatEditorValue
- Format values Example
-
getAutoFreezePosition
public int getAutoFreezePosition()When a field hasautoFreeze
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
andcheckboxField
, provide default implementations of this method.- Returns:
- the index at which this autoFreeze field should appear in the frozen body
- See Also:
-
addRecordClickHandler
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. CallRecordClickEvent.cancel()
from withinRecordClickHandler.onRecordClick(com.smartgwt.client.widgets.grid.events.RecordClickEvent)
to prevent the grid-level handler from firing.- Specified by:
addRecordClickHandler
in interfaceHasRecordClickHandlers
- Parameters:
handler
- the recordClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addValueIconClickHandler
Add a valueIconClick handler.Executed when the user clicks on a
value icon
within this field. CallValueIconClickEvent.cancel()
from withinValueIconClickHandler.onValueIconClick(com.smartgwt.client.widgets.grid.events.ValueIconClickEvent)
to suppress default behavior of firingListGridField.recordClick()
handlers, etc.- Specified by:
addValueIconClickHandler
in interfaceHasValueIconClickHandlers
- Parameters:
handler
- the valueIconClick handler- Returns:
HandlerRegistration
used to remove this handler
-
setDefaultFilterValue
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
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
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
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
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
Sets a formatter that returns the HTML to display in each cell of the field, given the raw cell value. OverridesListGrid.setCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter)
.- Parameters:
formatter
- formatter to apply to the cell values- See Also:
-
setInactiveCellFormatter
Field-level formatter for inactive content.If present, this method will be invoked instead of
setCellFormatter()
in cases where the grid is rendering non-interactive content outside. SeeListGrid.setInactiveCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter)
for more details.- Parameters:
formatter
- formatter to apply to inactive cell values- See Also:
-
setEditValueFormatter
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:
-
setEditValueParser
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:
-
setSortNormalizer
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.For custom sort orders that can be executed both client and server, consider
sortByField
.- Parameters:
normalizer
- the sort normalizer
-
setHoverCustomizer
* HTML to be shown in hovers over cells in the column described by this field.- Parameters:
hoverCustomizer
- the hover customizer
-
setGroupSummaryCustomizer
- Parameters:
groupSummaryCustomizer
- the group summary customizer
-
setGridSummaryCustomizer
- Parameters:
gridSummaryCustomizer
- the grid summary customizer
-
setAlign
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 viacellAlign
.
If null, default alignment depends on the field's declaredtype
- generally "left" except for numbers which are "right" - and ifrotateTitle
has been specified, the default is always "center".
Note that 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
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 viacellAlign
.
If null, default alignment depends on the field's declaredtype
- generally "left" except for numbers which are "right" - and ifrotateTitle
has been specified, the default is always "center".
Note that 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 like "25%", or "*" to split remaining space among all fields which have "*".Caution: stretch sizes are currently ignored if the field is being autofitted (see
autoFitFieldWidths
), unlessshowHeader
is false.Note: if autofitting is active for a field, the width will default to the numerical autofit width for that field (so it will not be stretched larger to fill available space). Otherwise, if not autofitting, the width will default to "*" causing it to be automatically stretched.
The width may be defaulted to a numerical value based on
length
if novalueMap
is set, subject to the initial values ofminWidth
andminFieldWidth
. If you'd rather have the field stretched-sized to fit the available space, set its initial width to "*".See also
minFieldWidth
to ensure no field goes below a minimum size.Use
resizeField
to programmatically change field width after creation.Use
getFieldWidth
to access the rendered field width after the ListGrid is drawn.- Parameters:
width
- width Default value is "*"
-
setWidth
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space like "25%", or "*" to split remaining space among all fields which have "*".Caution: stretch sizes are currently ignored if the field is being autofitted (see
autoFitFieldWidths
), unlessshowHeader
is false.Note: if autofitting is active for a field, the width will default to the numerical autofit width for that field (so it will not be stretched larger to fill available space). Otherwise, if not autofitting, the width will default to "*" causing it to be automatically stretched.
The width may be defaulted to a numerical value based on
length
if novalueMap
is set, subject to the initial values ofminWidth
andminFieldWidth
. If you'd rather have the field stretched-sized to fit the available space, set its initial width to "*".See also
minFieldWidth
to ensure no field goes below a minimum size.Use
resizeField
to programmatically change field width after creation.Use
getFieldWidth
to access the rendered field width after the ListGrid is drawn.- Parameters:
width
- width Default value is "*"
-
getWidth
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space like "25%", or "*" to split remaining space among all fields which have "*".Caution: stretch sizes are currently ignored if the field is being autofitted (see
autoFitFieldWidths
), unlessshowHeader
is false.Note: if autofitting is active for a field, the width will default to the numerical autofit width for that field (so it will not be stretched larger to fill available space). Otherwise, if not autofitting, the width will default to "*" causing it to be automatically stretched.
The width may be defaulted to a numerical value based on
length
if novalueMap
is set, subject to the initial values ofminWidth
andminFieldWidth
. If you'd rather have the field stretched-sized to fit the available space, set its initial width to "*".See also
minFieldWidth
to ensure no field goes below a minimum size.Use
resizeField
to programmatically change field width after creation.Use
getFieldWidth
to access the rendered field width after the ListGrid is drawn.- Returns:
- the field width as a String
-
setImgDir
Deprecated.Renamed tosetImageURLPrefix(java.lang.String)
Synonym forsetImageURLPrefix(java.lang.String)
.- Parameters:
imgDir
- the imageURLPrefix
-
setDefaultValue
If this fieldcan 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:
-
setDefaultValue
If this fieldcan 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:
-
setDefaultValue
If this fieldcan 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:
-
setDefaultValue
If this fieldcan 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:
-
setDefaultValue
If this fieldcan 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:
-
setDefaultValue
If this fieldcan 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:
-
setEditorProperties
Set the defaultFormItem
properties to be used whenever this field is edited.If unset, a FormItem will be automatically chosen based on the 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.
For an overview of the template rules, reflection requirements when trying to assign an edit Formitem by type, and an understanding of how the various
setEditorProperties()
calls on different classes relate to each other in determining what configuration ultimately gets applied to the edit FormItem, seeDataSourceField.setEditorProperties(FormItem)
.- Parameters:
editorProperties
- the editor properties- See Also:
-
setEditorType
Deprecated.Renamed tosetEditorProperties(com.smartgwt.client.widgets.form.fields.FormItem)
. You can also consider usingsetEditorType(java.lang.Class<? extends com.smartgwt.client.widgets.form.fields.FormItem>)
orsetEditorType(java.lang.String)
instead.- Parameters:
editorType
- FormItem with default properties to be applied when editing
-
setEditorType
TheFormItem
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 insetEditorProperties(com.smartgwt.client.widgets.form.fields.FormItem)
. If the editorType cannot be resolved via reflection, this method will still work if editorType refers to a built-in SmartGWT framework class, such asSetFilterItem
.- Parameters:
editorType
- the fully-qualified class name of aFormItem
subclass, which must have been registered with thereflection mechanism
(except for built-in framework classes).- Throws:
IllegalArgumentException
- if the editorType class has not been registered for use with thereflection mechanism
, and it is not a built-in framework class, or if it does not inherit fromFormItem
.
-
setEditorType
TheFormItem
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 insetEditorProperties(com.smartgwt.client.widgets.form.fields.FormItem)
. If the editorType cannot be resolved via reflection, this method will still work if editorType refers to a built-in SmartGWT framework class, such asSetFilterItem
.- Parameters:
editorType
- aFormItem
subclass, which must have been registered with thereflection mechanism
(except for built-in framework classes).- Throws:
IllegalArgumentException
- if the editorType class has not been registered for use with thereflection mechanism
, and it is not a built-in framework class, or if it does not inherit fromFormItem
.
-
setFilterEditorType
Deprecated.Renamed tosetFilterEditorProperties(com.smartgwt.client.widgets.form.fields.FormItem)
. You can also consider usingsetFilterEditorType(java.lang.Class<? extends com.smartgwt.client.widgets.form.fields.FormItem>)
orsetFilterEditorType(java.lang.String)
instead.- Parameters:
filterEditorType
- FormItem with default properties to be applied when editing in the filter row
-
setFilterEditorType
If this ListGrid is showing a filter row, this property can be used to specify theFormItem
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 insetFilterEditorProperties(com.smartgwt.client.widgets.form.fields.FormItem)
. If the editorType cannot be resolved via reflection, this method will still work if editorType refers to a built-in SmartGWT framework class, such asSetFilterItem
.- Parameters:
editorType
- the fully-qualified class name of aFormItem
subclass, which must have been registered with thereflection mechanism
(except for built-in framework classes).- Throws:
IllegalArgumentException
- if the editorType class has not been registered for use with thereflection mechanism
, and it is not a built-in framework class, or if it does not inherit fromFormItem
.
-
setFilterEditorType
If this ListGrid is showing a filter row, this property can be used to specify theFormItem
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 insetFilterEditorProperties(com.smartgwt.client.widgets.form.fields.FormItem)
. If the editorType cannot be resolved via reflection, this method will still work if editorType refers to a built-in SmartGWT framework class, such asSetFilterItem
.- Parameters:
editorType
- aFormItem
subclass, which must have been registered with thereflection mechanism
(except for built-in framework classes).- Throws:
IllegalArgumentException
- if the editorType class has not been registered for use with thereflection mechanism
, and it is not a built-in framework class, or if it does not inherit fromFormItem
.
-
setFilterEditorProperties
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.
For an overview of the template rules, reflection requirements when trying to assign an edit Formitem by type, and an understanding of how the various
setFilterEditorProperties()
calls on different classes relate to each other in determining what configuration ultimately gets applied to the edit FormItem, seeDataSourceField.setEditorProperties(FormItem)
.- Parameters:
filterEditorProperties
- the filter editor properties- See Also:
-
setOptionDataSource
Derive acom.smartgwt.client.types.ValueMap
by fetching records from another DataSource and extracting thevalueField
anddisplayField
in the loaded records, to derive one valueMap entry per record loaded from the optionDataSource.Unlike the similar use of PickList.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 correct approach is:- do not set listGridField.optionDataSource
- declare two fields in the DataSource, eg "accountId" and "accountName".
- Set the
displayField
attribute on the data field to the name of the display field. - When fetching records for display in a grid, have your server send back values for both fields, but show only the data field ("accountId") in the grid.
If you are using the Smart GWT Server Framework with the SQL or JPA/Hibernate built-in connectors, this entire approach can be achieved very easily using the
DataSourceField.includeFrom
setting - see thedocs for includeFrom
for details.Notes:
- When using the above approach, it is key that the server return both the underlying stored value and
the display value, as suggested above. This approach allows the PickList.optionDataSource property to be used to
provide paged valueMaps during inline editing and
inline filtering
. This can be achieved by setting theoptionDataSource
attribute on the form item used to edit the field viaeditorProperties
(for editing) orfield.filterEditorProperties
(for filtering), without specifying an optionDataSource at the listGridField level. Alternatively developers can useautoFetchDisplayMap
to suppress the fetch against the optionDataSource at the listGrid level. - Setting
listGridField.optionDataSource
to the same dataSource as the listGrid is not the same as omitting the optionDataSource setting entirely. UnlessautoFetchDisplayMap
has been set to explicitly disable fetching, a fetch will be performed against the dataSource to build a valueMap which will be used as the definitive mapping from data to display values, rather than picking up the display values from the records themselves. This distinction is required to support cases where thevalueField
points to a different field in the grid (useful for hierarchical relationships, for example), or whereoptionCriteria
oroptionOperationId
are specified and return different data from the records displayed within the grid. - If a displayField is specified, with no associated
optionDataSource, and the field is editable, updating the edit value for the field may not automatically update the
displayField edit value, meaning the user may not realize the edit value has been modified. If the new value came from
the user editing the field, and the edit item has a valueMap or optionDataSource specified, the display value is picked
up automatically and stored out on the displayField for the record. However if the value was set programmatically, the
developer should also set the edit value for the display field to ensure the displayed value reflects the new edit
value. Note that when this occurs, a warning will be logged which can be disabled via
ListGrid.warnOnUnmappedValueFieldChange
. - For very advanced usage a developer can use
displayValueFromRecord
to explicitly tell the grid whether or not to display the display field value for the record in this field when a displayField is specified. See documentation on that property for more information
- Parameters:
optionDataSource
- optionDataSource Default value is null- Returns:
ListGridField
instance, for chaining setter calls
-
setShowIfCondition
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
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. This provides, among other capabilities, a way to trigger the server to return summary records.- Parameters:
optionFilterContext
- optionFilterContext Default value is null
-
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. This provides, among other capabilities, a way to trigger the server to return summary records.- Returns:
- DSRequest Properties
-
addCellSavedHandler
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 interfaceHasCellSavedHandlers
- Parameters:
handler
- the cellSaved handler- Returns:
HandlerRegistration
used to remove this handler
-
addChangeHandler
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 theListGridField.change
andListGridField.changed
handlers will fire but theform
anditem
parameters will be null.- Specified by:
addChangeHandler
in interfaceHasChangeHandlers
- Parameters:
handler
- the change handler- Returns:
HandlerRegistration
used to remove this handler
-
addChangedHandler
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 ifcanToggle
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 theListGridField.change
andListGridField.changed
handlers will fire but theform
anditem
parameters will be null.- Specified by:
addChangedHandler
in interfaceHasChangedHandlers
- Parameters:
handler
- the changed handler- Returns:
HandlerRegistration
used to remove this handler
-
setGroupTitleRenderer
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
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
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
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
IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify aSummaryFunctionType
for calculating the summary value to display.If an array of summaryFunctions is specified, they will be executed in turn and the grid will show multiple summary rows at the grid or group level (or both) containing the resulting values.
- Parameters:
summaryFunction
- summaryFunction
-
setSummaryFunction
IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify the name of a summary function registered viaSimpleType.registerSummaryFunction(java.lang.String, com.smartgwt.client.widgets.grid.SummaryFunction)
for calculating the summary value to display.If an array of summaryFunctions is specified, they will be executed in turn and the grid will show multiple summary rows at the grid or group level (or both) containing the resulting values.
- Parameters:
summaryFunction
- summaryFunction
-
setSummaryFunction
IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify aSummaryFunction
for calculating the summary value to display.If an array of summaryFunctions is specified, they will be executed in turn and the grid will show multiple summary rows at the grid or group level (or both) containing the resulting values.
- Parameters:
summaryFunction
- summaryFunction
-
addSummaryFunction
IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify aSummaryFunction
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
IfshowGridSummary
orshowGroupSummary
is true, this method can be used to specify aSummaryFunctionType
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
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.
The fields to be used for the summary calculation can be determined either by explicitly listing them (
includeInRecordSummaryFields
), or by settingincludeInRecordSummary
to true on fields that should be included and false on fields that should not.By default, all visible fields of numeric type are used. Note that, in this mode, if the user is able to hide some fields, this could change the formula. If this isn't desirable, consider setting
canHide
to prevent fields from being hidden. Consider this even if fields to include in the summary are explicitly listed, as hidden fields involved in a visible calculation can be confusing for an end user.If
showGridSummary
orshowGroupSummary
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'sisGroupSummary
andisGridSummary
attributes.- Parameters:
recordSummaryFunction
- recordSummaryFunction Default value is null
-
setRecordSummaryFunction
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.
The fields to be used for the summary calculation can be determined either by explicitly listing them (
includeInRecordSummaryFields
), or by settingincludeInRecordSummary
to true on fields that should be included and false on fields that should not.By default, all visible fields of numeric type are used. Note that, in this mode, if the user is able to hide some fields, this could change the formula. If this isn't desirable, consider setting
canHide
to prevent fields from being hidden. Consider this even if fields to include in the summary are explicitly listed, as hidden fields involved in a visible calculation can be confusing for an end user.If
showGridSummary
orshowGroupSummary
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'sisGroupSummary
andisGridSummary
attributes.- Parameters:
recordSummaryFunction
- recordSummaryFunction Default value is null
-
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
orshowGroupSummary
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'sisGroupSummary
andisGridSummary
attributes.- Returns:
- RecordSummaryFunction
-
getListGrid
Return the live ListGrid instance to which this ListGridField is assigned. May return null, if not yet assigned to a grid, or if the live grid instance has not yet been created, or has already been destroyed.- Returns:
- ListGrid instance
-
setType
Set the type directly to a defined SimpleType.- Parameters:
type
- the SimpleType
-
getOperator
This value is managed by the menu item titled"Filter using"
in theheaderContextMenu
that appears whenallowFilterOperators
has been set to true.If you need to reset this filter operator you should call
listGrid.setFieldProperties
, as in this example:listGrid.setFieldProperties(fieldName, {operator: null});
Note that this property is not listed as "initializable" and is not intended as a means of applying a default operator to the field. Rather, it simply reflects any non-default operator already applied to menu item"Filter using"
. UsefilterOperator
to specify the default operator for the field.The value returned is from the
OperatorId
enum.- Returns:
- Current operator value. Default value is null
- See Also:
-
setCellFormatter()
orListGrid.setCellFormatter()
to install aCellFormatter
.