Class ListGrid

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, DataBoundComponent, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragCompleteHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropCompleteHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFetchDataHandlers, HasFocusChangedHandlers, HasFormulaUpdatedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers, HasBodyKeyPressHandlers, HasCellClickHandlers, HasCellContextClickHandlers, HasCellDoubleClickHandlers, HasCellErrorIconHoverHandlers, HasCellErrorIconOutHandlers, HasCellErrorIconOverHandlers, HasCellHoverHandlers, HasCellMouseDownHandlers, HasCellMouseUpHandlers, HasCellOutHandlers, HasCellOverHandlers, HasCellSavedHandlers, HasCellSelectionChangedHandlers, HasCellValueHoverHandlers, HasCriteriaChangedHandlers, HasDataArrivedHandlers, HasDataChangedHandlers, HasDrawAreaChangedHandlers, HasEditCompleteHandlers, HasEditFailedHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasFieldStateChangedHandlers, HasFilterEditorSubmitHandlers, HasGroupByCompleteHandlers, HasGroupByHandlers, HasGroupStateChangedHandlers, HasGroupTreeChangedHandlers, HasHeaderClickHandlers, HasHeaderDoubleClickHandlers, HasHeaderHoverHandlers, HasHilitesChangedHandlers, HasRecordClickHandlers, HasRecordCollapseHandlers, HasRecordDoubleClickHandlers, HasRecordDropHandlers, HasRecordExpandHandlers, HasRegroupHandlers, HasRemoveRecordClickHandlers, HasRowContextClickHandlers, HasRowEditorEnterHandlers, HasRowEditorExitHandlers, HasRowHoverHandlers, HasRowMouseDownHandlers, HasRowMouseUpHandlers, HasRowOutHandlers, HasRowOverHandlers, HasSelectionChangedHandlers, HasSelectionUpdatedHandlers, HasSetSortHandlers, HasSortChangedHandlers, HasSorterClickHandlers, HasSorterContextClickHandlers, HasViewStateChangedHandlers, HasMembersChangedHandlers
Direct Known Subclasses:
CalendarView, CubeGrid, DateGrid, ListPalette, Menu, PickListMenu, RecordEditor, TableView, TreeGrid

public class ListGrid extends VLayout implements DataBoundComponent, HasCellSavedHandlers, HasCellClickHandlers, HasCellContextClickHandlers, HasCellDoubleClickHandlers, HasCellErrorIconHoverHandlers, HasCellErrorIconOutHandlers, HasCellErrorIconOverHandlers, HasCellHoverHandlers, HasCellMouseDownHandlers, HasCellMouseUpHandlers, HasCellOutHandlers, HasCellOverHandlers, HasCellSelectionChangedHandlers, HasCellValueHoverHandlers, HasCriteriaChangedHandlers, HasDataArrivedHandlers, HasDataChangedHandlers, HasDrawAreaChangedHandlers, HasEditCompleteHandlers, HasEditFailedHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasFieldStateChangedHandlers, HasFilterEditorSubmitHandlers, HasFormulaUpdatedHandlers, HasGroupByCompleteHandlers, HasGroupStateChangedHandlers, HasGroupTreeChangedHandlers, HasGroupByHandlers, HasRegroupHandlers, HasHeaderDoubleClickHandlers, HasHeaderHoverHandlers, HasHilitesChangedHandlers, HasBodyKeyPressHandlers, HasRecordCollapseHandlers, HasRecordExpandHandlers, HasHeaderClickHandlers, HasRecordClickHandlers, HasRecordDropHandlers, HasRemoveRecordClickHandlers, HasRecordDoubleClickHandlers, HasRowContextClickHandlers, HasRowEditorEnterHandlers, HasRowEditorExitHandlers, HasRowHoverHandlers, HasRowMouseDownHandlers, HasRowMouseUpHandlers, HasRowOutHandlers, HasRowOverHandlers, HasSelectionChangedHandlers, HasSelectionUpdatedHandlers, HasSetSortHandlers, HasSortChangedHandlers, HasSorterClickHandlers, HasSorterContextClickHandlers, HasViewStateChangedHandlers
A ListGrid is a DataBoundComponent that displays a list of objects in a grid, where each row represents one object and each cell in the row represents one property.
See Also:
  • Constructor Details

    • ListGrid

      public ListGrid()
    • ListGrid

      public ListGrid(JavaScriptObject jsObj)
    • ListGrid

      public ListGrid(DataSource dataSource)
  • Method Details

    • getOrCreateRef

      public static ListGrid getOrCreateRef(JavaScriptObject jsObj)
    • getTestInstance

      protected ListGrid getTestInstance()
      Overrides:
      getTestInstance in class Canvas
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • create

      protected JavaScriptObject create()
      Overrides:
      create in class VLayout
    • setAdvancedFieldPickerThreshold

      public ListGrid setAdvancedFieldPickerThreshold(int advancedFieldPickerThreshold) throws IllegalStateException
      When useAdvancedFieldPicker is set, total number of available fields that must be present in the grid before the advanced field picker interface is used instead of the normal columns submenu.

      Set to 0 to have the advanced picker always used (when useAdvancedFieldPicker is true).

      Parameters:
      advancedFieldPickerThreshold - New advancedFieldPickerThreshold value. Default value is 25
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAdvancedFieldPickerThreshold

      public int getAdvancedFieldPickerThreshold()
      When useAdvancedFieldPicker is set, total number of available fields that must be present in the grid before the advanced field picker interface is used instead of the normal columns submenu.

      Set to 0 to have the advanced picker always used (when useAdvancedFieldPicker is true).

      Returns:
      Current advancedFieldPickerThreshold value. Default value is 25
    • setAdvancedFilteringText

      public ListGrid setAdvancedFilteringText(String advancedFilteringText)
      If we're showing a headerContextMenu for this grid, and a filter-editor is visible and allowFilterWindow is enabled, this attribute will be shown as the menu item title to configure advanced filtering. This menu-item is displayed in the context menu for the sorter button and in the filter using operators menu.
      Parameters:
      advancedFilteringText - New advancedFilteringText value. Default value is "Advanced filtering..."
      Returns:
      ListGrid instance, for chaining setter calls
    • getAdvancedFilteringText

      public String getAdvancedFilteringText()
      If we're showing a headerContextMenu for this grid, and a filter-editor is visible and allowFilterWindow is enabled, this attribute will be shown as the menu item title to configure advanced filtering. This menu-item is displayed in the context menu for the sorter button and in the filter using operators menu.
      Returns:
      Current advancedFilteringText value. Default value is "Advanced filtering..."
    • getAiFilterWindow

      public Window getAiFilterWindow() throws IllegalStateException
      Instance of AIWindow that allows a user to enter a description of how they would like the AI to filter this grid.

      This component is an AutoChild named "aiFilterWindow". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current aiFilterWindow value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setAiFilterWindowHint

      public ListGrid setAiFilterWindowHint(String aiFilterWindowHint) throws IllegalStateException
      The inline hint-text displayed in the user-entry area in the aiFilterWindow.
      Parameters:
      aiFilterWindowHint - New aiFilterWindowHint value. Default value is "Explain which records should be shown"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAiFilterWindowHint

      public String getAiFilterWindowHint()
      The inline hint-text displayed in the user-entry area in the aiFilterWindow.
      Returns:
      Current aiFilterWindowHint value. Default value is "Explain which records should be shown"
      See Also:
    • setAiFilterWindowInstructions

      public ListGrid setAiFilterWindowInstructions(String aiFilterWindowInstructions) throws IllegalStateException
      The descriptive text displayed above the user-entry area in the aiFilterWindow.
      Parameters:
      aiFilterWindowInstructions - New aiFilterWindowInstructions value. Default value is "Show records that match this description..."
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAiFilterWindowInstructions

      public String getAiFilterWindowInstructions()
      The descriptive text displayed above the user-entry area in the aiFilterWindow.
      Returns:
      Current aiFilterWindowInstructions value. Default value is "Show records that match this description..."
      See Also:
    • setAiFilterWindowTitle

      public ListGrid setAiFilterWindowTitle(String aiFilterWindowTitle) throws IllegalStateException
      The title for the AI-driven filter window.
      Parameters:
      aiFilterWindowTitle - New aiFilterWindowTitle value. Default value is "AI Filtering"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAiFilterWindowTitle

      public String getAiFilterWindowTitle()
      The title for the AI-driven filter window.
      Returns:
      Current aiFilterWindowTitle value. Default value is "AI Filtering"
      See Also:
    • getAiHiliteWindow

      public Window getAiHiliteWindow() throws IllegalStateException
      Instance of AIWindow that allows a user to enter a description of how they would like the AI to filter this grid.

      This component is an AutoChild named "aiHiliteWindow". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current aiHiliteWindow value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setAiHoverContentsPrefix

      public ListGrid setAiHoverContentsPrefix(String aiHoverContentsPrefix)
      Optional prefix for the AI-generated hover text displayed when hovering over fields specifying an aiHoverRequest.

      This can be overridden per-field by ListGridField.aiHoverContentsPrefix.

      Parameters:
      aiHoverContentsPrefix - New aiHoverContentsPrefix value. Default value is "<b>AI-generated summary:</b><br>"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAiHoverContentsPrefix

      public String getAiHoverContentsPrefix()
      Optional prefix for the AI-generated hover text displayed when hovering over fields specifying an aiHoverRequest.

      This can be overridden per-field by ListGridField.aiHoverContentsPrefix.

      Returns:
      Current aiHoverContentsPrefix value. Default value is "<b>AI-generated summary:</b><br>"
      See Also:
    • setAiHoverRetryDelay

      public ListGrid setAiHoverRetryDelay(Integer aiHoverRetryDelay)
      Minimum number of milliseconds to wait before retrying to generate hover contents via AI.

      The results of SummarizeValueRequests generated from a field's aiHoverRequest are cached, whether it was a successful or non-successful result. In the case of a non-successful result, the message therefrom will be displayed to the user for this configurable number of milliseconds before another request is made to try to generate the hover contents.

      Parameters:
      aiHoverRetryDelay - New aiHoverRetryDelay value. Default value is 30000
      Returns:
      ListGrid instance, for chaining setter calls
    • getAiHoverRetryDelay

      public Integer getAiHoverRetryDelay()
      Minimum number of milliseconds to wait before retrying to generate hover contents via AI.

      The results of SummarizeValueRequests generated from a field's aiHoverRequest are cached, whether it was a successful or non-successful result. In the case of a non-successful result, the message therefrom will be displayed to the user for this configurable number of milliseconds before another request is made to try to generate the hover contents.

      Returns:
      Current aiHoverRetryDelay value. Default value is 30000
    • setAiSortFieldMaxRecordsMessage

      public ListGrid setAiSortFieldMaxRecordsMessage(String aiSortFieldMaxRecordsMessage)
      The message to show when a user asks the AI to sort more than the maximum allowed records.
      Parameters:
      aiSortFieldMaxRecordsMessage - New aiSortFieldMaxRecordsMessage value. Default value is "There were too many records to sort using AI; the number of records exceeded the limit of ${aiSortFieldMaxRecords} records."
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAiSortFieldMaxRecordsMessage

      public String getAiSortFieldMaxRecordsMessage()
      The message to show when a user asks the AI to sort more than the maximum allowed records.
      Returns:
      Current aiSortFieldMaxRecordsMessage value. Default value is "There were too many records to sort using AI; the number of records exceeded the limit of ${aiSortFieldMaxRecords} records."
      See Also:
    • getAiSortProgressDialog

      public Canvas getAiSortProgressDialog() throws IllegalStateException
      Dialog that shows progress after requesting AI-sorting of a field.

      This component is an AutoChild named "aiSortProgressDialog". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current aiSortProgressDialog value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setAllowFilterExpressions

      public ListGrid setAllowFilterExpressions(Boolean allowFilterExpressions) throws IllegalStateException
      For use with showFilterEditor:true, allows simple search expressions to be entered into filter fields, as though DynamicForm.allowExpressions were true.

      This attribute can also be set at the field level.

      Parameters:
      allowFilterExpressions - New allowFilterExpressions value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAllowFilterExpressions

      public Boolean getAllowFilterExpressions()
      For use with showFilterEditor:true, allows simple search expressions to be entered into filter fields, as though DynamicForm.allowExpressions were true.

      This attribute can also be set at the field level.

      Returns:
      Current allowFilterExpressions value. Default value is null
      See Also:
    • setAllowFilterOperators

      public ListGrid setAllowFilterOperators(Boolean allowFilterOperators) throws IllegalStateException
      Causes a menu item titled "Filter using" to appear in the headerContextMenu that allows the end user to pick an advanced search operator to use for this field.

      Once an operator has been chosen, the active operator is indicated by an operatorIcon placed within the field (you can alternatively cause the icon to always be present). The operatorIcon shows the same textual representation of the search operator as is used by the FormItem.allowExpressions feature. Clicking on the icon provides a second way to modify the search operator.

      This feature is enabled by default if DataSource.supportsAdvancedCriteria() is true, for all fields where it is normally possible to filter by typing in a search string. This excludes field types such as "date" or "boolean" which show specialized filter controls. Use ListGridField.allowFilterOperators to disable this interface for individual fields, or set DataSourceField.canFilter to false to disallow filtering entirely for a field.

      Note that this feature is similar to allowFilterExpressions, which allows the end users to directly type in characters such as ">" to control filtering. allowFilterOperators is easier to use and more discoverable than allowFilterExpressions, and also avoids the drawback where special characters like ">" cannot be used in filter values. However, allowFilterExpressions allows users to make use of certain operators that allowFilterOperators does not support, such as using the "betweenInclusive" operator by typing "5...10".

      When both allowfilterExpressions and allowFilterOperators are set, filter expressions entered in to the edit-area are parsed and the operator automatically applied to the operatorIcon.

      If allowFilterWindow is enabled another option, "Advanced Filtering", is added to the "Filter using" menu.

      Parameters:
      allowFilterOperators - New allowFilterOperators value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAllowFilterOperators

      public Boolean getAllowFilterOperators()
      Causes a menu item titled "Filter using" to appear in the headerContextMenu that allows the end user to pick an advanced search operator to use for this field.

      Once an operator has been chosen, the active operator is indicated by an operatorIcon placed within the field (you can alternatively cause the icon to always be present). The operatorIcon shows the same textual representation of the search operator as is used by the FormItem.allowExpressions feature. Clicking on the icon provides a second way to modify the search operator.

      This feature is enabled by default if DataSource.supportsAdvancedCriteria() is true, for all fields where it is normally possible to filter by typing in a search string. This excludes field types such as "date" or "boolean" which show specialized filter controls. Use ListGridField.allowFilterOperators to disable this interface for individual fields, or set DataSourceField.canFilter to false to disallow filtering entirely for a field.

      Note that this feature is similar to allowFilterExpressions, which allows the end users to directly type in characters such as ">" to control filtering. allowFilterOperators is easier to use and more discoverable than allowFilterExpressions, and also avoids the drawback where special characters like ">" cannot be used in filter values. However, allowFilterExpressions allows users to make use of certain operators that allowFilterOperators does not support, such as using the "betweenInclusive" operator by typing "5...10".

      When both allowfilterExpressions and allowFilterOperators are set, filter expressions entered in to the edit-area are parsed and the operator automatically applied to the operatorIcon.

      If allowFilterWindow is enabled another option, "Advanced Filtering", is added to the "Filter using" menu.

      Returns:
      Current allowFilterOperators value. Default value is null
      See Also:
    • setAllowFilterWindow

      public ListGrid setAllowFilterWindow(Boolean allowFilterWindow) throws IllegalStateException
      Adds the ability for a user to define additional criteria above and beyond those expressed in the filter editor via a FilterBuilder which appears in a modal Window over the grid and can be accessed by various menus within the grid or triggered by external controls.

      Causes a menu item titled "Advanced Filtering" to appear in the "Filter using" menu show in the headerContextMenu that allows the end user to configure an advanced filter on the grid that can supplement the filter editor. Note that the menu option will show even if filter operators is disabled.

      To use this feature, the grid must be configured with a DataSource. In fact, this feature is enabled by default if the grid has a DataSource and both DataSource.supportsAdvancedCriteria() and allowFilterOperators are true. This default can be disabled by setting allowFilterWindow to false.

      This example shows the allowFilterWindow setting in use.

      Note: this feature requires Smart GWT Pro or better.

      Enabling filter via AI forces this setting to true.

      Parameters:
      allowFilterWindow - New allowFilterWindow value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAllowFilterWindow

      public Boolean getAllowFilterWindow()
      Adds the ability for a user to define additional criteria above and beyond those expressed in the filter editor via a FilterBuilder which appears in a modal Window over the grid and can be accessed by various menus within the grid or triggered by external controls.

      Causes a menu item titled "Advanced Filtering" to appear in the "Filter using" menu show in the headerContextMenu that allows the end user to configure an advanced filter on the grid that can supplement the filter editor. Note that the menu option will show even if filter operators is disabled.

      To use this feature, the grid must be configured with a DataSource. In fact, this feature is enabled by default if the grid has a DataSource and both DataSource.supportsAdvancedCriteria() and allowFilterOperators are true. This default can be disabled by setting allowFilterWindow to false.

      This example shows the allowFilterWindow setting in use.

      Note: this feature requires Smart GWT Pro or better.

      Enabling filter via AI forces this setting to true.

      Returns:
      Current allowFilterWindow value. Default value is null
      See Also:
    • setAllowRowSpanning

      public ListGrid setAllowRowSpanning(Boolean allowRowSpanning) throws IllegalStateException
      Should cells in this grid be allowed to span multiple rows? If set to true, the getRowSpan() method will be called for every cell when rendering out the listGrid to determine how many rows the cell should span.

      See getRowSpan() for more details

      Parameters:
      allowRowSpanning - New allowRowSpanning value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAllowRowSpanning

      public Boolean getAllowRowSpanning()
      Should cells in this grid be allowed to span multiple rows? If set to true, the getRowSpan() method will be called for every cell when rendering out the listGrid to determine how many rows the cell should span.

      See getRowSpan() for more details

      Returns:
      Current allowRowSpanning value. Default value is false
    • setAlternateBodyStyleName

      public ListGrid setAlternateBodyStyleName(String alternateBodyStyleName)
      Optional css style to apply to the body if alternateRecordStyles is true for this grid. If unset bodyStyleName will be used to style the body regardless of the alternateRecordStyles setting.

      If this method is called after the component has been drawn/initialized: Update the alternateBodyStyleName for this listGrid.

      Note : This is an advanced setting

      Parameters:
      alternateBodyStyleName - new body style name when showing alternateRecordStyles. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAlternateBodyStyleName

      public String getAlternateBodyStyleName()
      Optional css style to apply to the body if alternateRecordStyles is true for this grid. If unset bodyStyleName will be used to style the body regardless of the alternateRecordStyles setting.
      Returns:
      Current alternateBodyStyleName value. Default value is null
      See Also:
    • setAlternateFieldFrequency

      public ListGrid setAlternateFieldFrequency(int alternateFieldFrequency)
      The number of consecutive columns to draw in the same style before alternating, when alternateColumnStyles is true.
      Parameters:
      alternateFieldFrequency - New alternateFieldFrequency value. Default value is 1
      Returns:
      ListGrid instance, for chaining setter calls
    • getAlternateFieldFrequency

      public int getAlternateFieldFrequency()
      The number of consecutive columns to draw in the same style before alternating, when alternateColumnStyles is true.
      Returns:
      Current alternateFieldFrequency value. Default value is 1
    • setAlternateFieldStyles

      public ListGrid setAlternateFieldStyles(boolean alternateFieldStyles)
      Whether alternating columns (or blocks of columns, depending on GridRenderer.alternateColumnFrequency) should be drawn in alternating styles, in order to create a vertical "ledger" effect for easier reading.

      If enabled, the cell style for alternate rows will have the GridRenderer.alternateColumnSuffix appended to it. See also GridRenderer.alternateRowStyles.

      Parameters:
      alternateFieldStyles - New alternateFieldStyles value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getAlternateFieldStyles

      public boolean getAlternateFieldStyles()
      Whether alternating columns (or blocks of columns, depending on GridRenderer.alternateColumnFrequency) should be drawn in alternating styles, in order to create a vertical "ledger" effect for easier reading.

      If enabled, the cell style for alternate rows will have the GridRenderer.alternateColumnSuffix appended to it. See also GridRenderer.alternateRowStyles.

      Returns:
      Current alternateFieldStyles value. Default value is false
    • setAlternateFieldSuffix

      public ListGrid setAlternateFieldSuffix(String alternateFieldSuffix)
      Suffix to append to alternate columns. Note that if GridRenderer.alternateRowStyles is enabled, cells which fall into both an alternate row and column will have both suffixes appended - for example "cellDarkAltCol".
      Parameters:
      alternateFieldSuffix - New alternateFieldSuffix value. Default value is "AltCol"
      Returns:
      ListGrid instance, for chaining setter calls
    • getAlternateFieldSuffix

      public String getAlternateFieldSuffix()
      Suffix to append to alternate columns. Note that if GridRenderer.alternateRowStyles is enabled, cells which fall into both an alternate row and column will have both suffixes appended - for example "cellDarkAltCol".
      Returns:
      Current alternateFieldSuffix value. Default value is "AltCol"
    • setAlternateRecordFrequency

      public ListGrid setAlternateRecordFrequency(int alternateRecordFrequency)
      The number of consecutive rows to draw in the same style before alternating, when alternateRowStyles is true.
      Parameters:
      alternateRecordFrequency - New alternateRecordFrequency value. Default value is 1
      Returns:
      ListGrid instance, for chaining setter calls
    • getAlternateRecordFrequency

      public int getAlternateRecordFrequency()
      The number of consecutive rows to draw in the same style before alternating, when alternateRowStyles is true.
      Returns:
      Current alternateRecordFrequency value. Default value is 1
    • setAlternateRecordStyles

      public ListGrid setAlternateRecordStyles(Boolean alternateRecordStyles)
      Whether alternating rows (or blocks of rows, depending on GridRenderer.alternateRowFrequency) should be drawn in alternating styles, in order to create a "ledger" effect for easier reading.

      If enabled, the cell style for alternate rows will have the GridRenderer.alternateRowSuffix appended to it. See also GridRenderer.alternateColumnStyles.

      If this method is called after the component has been drawn/initialized: Setter for alternateRecordStyles

      Parameters:
      alternateRecordStyles - New value for this.alternateRecordStyles. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAlternateRecordStyles

      public Boolean getAlternateRecordStyles()
      Whether alternating rows (or blocks of rows, depending on GridRenderer.alternateRowFrequency) should be drawn in alternating styles, in order to create a "ledger" effect for easier reading.

      If enabled, the cell style for alternate rows will have the GridRenderer.alternateRowSuffix appended to it. See also GridRenderer.alternateColumnStyles.

      Returns:
      Current alternateRecordStyles value. Default value is false
      See Also:
    • setAlternateRecordSuffix

      public ListGrid setAlternateRecordSuffix(String alternateRecordSuffix)
      Suffix to append to alternate rows. Note that if GridRenderer.alternateColumnStyles is enabled, cells which fall into both an alternate row and column will have both suffixes appended - for example "cellDarkAltCol".
      Parameters:
      alternateRecordSuffix - New alternateRecordSuffix value. Default value is "Dark"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAlternateRecordSuffix

      public String getAlternateRecordSuffix()
      Suffix to append to alternate rows. Note that if GridRenderer.alternateColumnStyles is enabled, cells which fall into both an alternate row and column will have both suffixes appended - for example "cellDarkAltCol".
      Returns:
      Current alternateRecordSuffix value. Default value is "Dark"
      See Also:
    • setAlwaysShowEditors

      public ListGrid setAlwaysShowEditors(Boolean alwaysShowEditors) throws IllegalStateException
      When this attribute is set, editors will be appear to be present in every row of the grid, allowing the user to immediately start editing any cell, rather than showing up in a single record at a time.
      This attribute is only valid when editByCell is false.

      This setting has some limitations and is typically only used for simple grids with a limited set of fields and standard editors.

      • Not all formItem types are supported. Default editors for standard data types (text, boolean, date, datetime, integer and float) are all supported, but custom editorType, including CanvasItem based editors are not. Fields with an unsupported editor type will show static values for all rows other than the current edit row, though users can start editing these with a single click
      • alwaysShowEditors:true grids do not support showing different editor types for the same field in different rows
      • In some cases there may be visual differences between the editor displayed in the edit row and the editor displayed in other rows.
      • From a design perspective, this mode presents a very "busy-looking" UI, which can made it harder to read the actual data. Functionally having editEvent set to "click" provides the same single-click to edit any cell user experience without the busy UI.
      • In some cases there may be a performance penalty for writing out so many controls (editors for every cell of the grid).
      Note that in addition to alwaysShowEditors, listGrid support single-click editing via editEvent:"click", and, for boolean fields, ListGridField.canToggle

      Note : This is an advanced setting

      Parameters:
      alwaysShowEditors - New alwaysShowEditors value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAlwaysShowEditors

      public Boolean getAlwaysShowEditors()
      When this attribute is set, editors will be appear to be present in every row of the grid, allowing the user to immediately start editing any cell, rather than showing up in a single record at a time.
      This attribute is only valid when editByCell is false.

      This setting has some limitations and is typically only used for simple grids with a limited set of fields and standard editors.

      • Not all formItem types are supported. Default editors for standard data types (text, boolean, date, datetime, integer and float) are all supported, but custom editorType, including CanvasItem based editors are not. Fields with an unsupported editor type will show static values for all rows other than the current edit row, though users can start editing these with a single click
      • alwaysShowEditors:true grids do not support showing different editor types for the same field in different rows
      • In some cases there may be visual differences between the editor displayed in the edit row and the editor displayed in other rows.
      • From a design perspective, this mode presents a very "busy-looking" UI, which can made it harder to read the actual data. Functionally having editEvent set to "click" provides the same single-click to edit any cell user experience without the busy UI.
      • In some cases there may be a performance penalty for writing out so many controls (editors for every cell of the grid).
      Note that in addition to alwaysShowEditors, listGrid support single-click editing via editEvent:"click", and, for boolean fields, ListGridField.canToggle
      Returns:
      Current alwaysShowEditors value. Default value is null
      See Also:
    • setAlwaysShowOperatorIcon

      public ListGrid setAlwaysShowOperatorIcon(Boolean alwaysShowOperatorIcon) throws IllegalStateException
      When allowFilterOperators is enabled, whether to show the operatorIcon for all filterable fields, or only for fields where the user has explicitly chosen a search operator different from the default operator for the field.

      The default operator for a field is determined by autoFetchTextMatchStyle or by setting ListGridField.filterOperator for a specific field.

      Parameters:
      alwaysShowOperatorIcon - New alwaysShowOperatorIcon value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAlwaysShowOperatorIcon

      public Boolean getAlwaysShowOperatorIcon()
      When allowFilterOperators is enabled, whether to show the operatorIcon for all filterable fields, or only for fields where the user has explicitly chosen a search operator different from the default operator for the field.

      The default operator for a field is determined by autoFetchTextMatchStyle or by setting ListGridField.filterOperator for a specific field.

      Returns:
      Current alwaysShowOperatorIcon value. Default value is null
    • setAnimateFolderEffect

      public ListGrid setAnimateFolderEffect(AnimationAcceleration animateFolderEffect)
      When animating folder opening / closing, this property can be set to apply an animated acceleration effect. This allows the animation speed to be "weighted", for example expanding or collapsing at a faster rate toward the beginning of the animation than at the end.

      For a ListGrid, this property applies when grouping is enabled.

      Parameters:
      animateFolderEffect - New animateFolderEffect value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getAnimateFolderEffect

      public AnimationAcceleration getAnimateFolderEffect()
      When animating folder opening / closing, this property can be set to apply an animated acceleration effect. This allows the animation speed to be "weighted", for example expanding or collapsing at a faster rate toward the beginning of the animation than at the end.

      For a ListGrid, this property applies when grouping is enabled.

      Returns:
      Current animateFolderEffect value. Default value is null
    • setAnimateFolderMaxRows

      public ListGrid setAnimateFolderMaxRows(Integer animateFolderMaxRows)
      If animateFolders is true for this grid, this number can be set to designate the maximum number of rows to animate at a time when opening / closing a folder.

      For a ListGrid, this property applies when grouping is enabled.

      Parameters:
      animateFolderMaxRows - New animateFolderMaxRows value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAnimateFolderMaxRows

      public Integer getAnimateFolderMaxRows()
      If animateFolders is true for this grid, this number can be set to designate the maximum number of rows to animate at a time when opening / closing a folder.

      For a ListGrid, this property applies when grouping is enabled.

      Returns:
      Current animateFolderMaxRows value. Default value is null
      See Also:
    • setAnimateFolders

      public ListGrid setAnimateFolders(Boolean animateFolders)
      If true, when folders are opened / closed children will be animated into view.

      For a ListGrid, this property applies when grouping is enabled.

      Parameters:
      animateFolders - New animateFolders value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getAnimateFolders

      public Boolean getAnimateFolders()
      If true, when folders are opened / closed children will be animated into view.

      For a ListGrid, this property applies when grouping is enabled.

      Returns:
      Current animateFolders value. Default value is true
    • setAnimateFolderSpeed

      public ListGrid setAnimateFolderSpeed(int animateFolderSpeed)
      When animating folder opening / closing, this property designates the speed of the animation in pixels shown (or hidden) per second. Takes precedence over the TreeGrid.animateFolderTime property, which allows the developer to specify a duration for the animation rather than a speed.

      For a ListGrid, this property applies when grouping is enabled.

      Parameters:
      animateFolderSpeed - New animateFolderSpeed value. Default value is 3000
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAnimateFolderSpeed

      public int getAnimateFolderSpeed()
      When animating folder opening / closing, this property designates the speed of the animation in pixels shown (or hidden) per second. Takes precedence over the TreeGrid.animateFolderTime property, which allows the developer to specify a duration for the animation rather than a speed.

      For a ListGrid, this property applies when grouping is enabled.

      Returns:
      Current animateFolderSpeed value. Default value is 3000
      See Also:
    • setAnimateFolderTime

      public ListGrid setAnimateFolderTime(int animateFolderTime)
      When animating folder opening / closing, if TreeGrid.animateFolderSpeed is not set, this property designates the duration of the animation in ms.

      For a ListGrid, this property applies when grouping is enabled.

      Parameters:
      animateFolderTime - New animateFolderTime value. Default value is 100
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAnimateFolderTime

      public int getAnimateFolderTime()
      When animating folder opening / closing, if TreeGrid.animateFolderSpeed is not set, this property designates the duration of the animation in ms.

      For a ListGrid, this property applies when grouping is enabled.

      Returns:
      Current animateFolderTime value. Default value is 100
      See Also:
    • setAnimateRemoveRecord

      public ListGrid setAnimateRemoveRecord(Boolean animateRemoveRecord)
      When canRemoveRecords is enabled, should records be animated out of view when they are removed by the user?
      Parameters:
      animateRemoveRecord - New animateRemoveRecord value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getAnimateRemoveRecord

      public Boolean getAnimateRemoveRecord()
      When canRemoveRecords is enabled, should records be animated out of view when they are removed by the user?
      Returns:
      Current animateRemoveRecord value. Default value is true
    • setAnimateRemoveSpeed

      public ListGrid setAnimateRemoveSpeed(int animateRemoveSpeed)
      When animating record removal, this property designates the speed of the animation in pixels per second. Takes precedence over the animateRemoveTime property, which allows the developer to specify a duration for the animation rather than a speed.
      Parameters:
      animateRemoveSpeed - New animateRemoveSpeed value. Default value is 200
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAnimateRemoveSpeed

      public int getAnimateRemoveSpeed()
      When animating record removal, this property designates the speed of the animation in pixels per second. Takes precedence over the animateRemoveTime property, which allows the developer to specify a duration for the animation rather than a speed.
      Returns:
      Current animateRemoveSpeed value. Default value is 200
      See Also:
    • setAnimateRemoveTime

      public ListGrid setAnimateRemoveTime(int animateRemoveTime)
      When animating record removal (see animateRemoveRecord), if animateRemoveSpeed is not set, this property designates the duration of the animation in ms.
      Parameters:
      animateRemoveTime - New animateRemoveTime value. Default value is 100
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAnimateRemoveTime

      public int getAnimateRemoveTime()
      When animating record removal (see animateRemoveRecord), if animateRemoveSpeed is not set, this property designates the duration of the animation in ms.
      Returns:
      Current animateRemoveTime value. Default value is 100
      See Also:
    • setAnimateRollOver

      public ListGrid setAnimateRollOver(Boolean animateRollOver)
      If the rollOverCanvas is enabled, setting this property to true ensures that when the rollOverCanvas is displayed it is animated into view via Canvas.animateShow(). Note that the animation effect may be customized via Canvas.animateShowEffect, Canvas.animateShowTime and Canvas.animateShowAcceleration set in rollOverCanvasProperties.

      Note : This is an advanced setting

      Parameters:
      animateRollOver - New animateRollOver value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getAnimateRollOver

      public Boolean getAnimateRollOver()
      If the rollOverCanvas is enabled, setting this property to true ensures that when the rollOverCanvas is displayed it is animated into view via Canvas.animateShow(). Note that the animation effect may be customized via Canvas.animateShowEffect, Canvas.animateShowTime and Canvas.animateShowAcceleration set in rollOverCanvasProperties.
      Returns:
      Current animateRollOver value. Default value is false
    • setAnimateRollUnder

      public ListGrid setAnimateRollUnder(Boolean animateRollUnder)
      If the rollUnderCanvas is enabled, setting this property to true ensures that when the rollUnderCanvas is displayed it is animated into view via Canvas.animateShow(). Note that the animation effect may be customized via Canvas.animateShowEffect, Canvas.animateShowTime and Canvas.animateShowAcceleration set in rollUnderCanvasProperties.

      Note : This is an advanced setting

      Parameters:
      animateRollUnder - New animateRollUnder value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAnimateRollUnder

      public Boolean getAnimateRollUnder()
      If the rollUnderCanvas is enabled, setting this property to true ensures that when the rollUnderCanvas is displayed it is animated into view via Canvas.animateShow(). Note that the animation effect may be customized via Canvas.animateShowEffect, Canvas.animateShowTime and Canvas.animateShowAcceleration set in rollUnderCanvasProperties.
      Returns:
      Current animateRollUnder value. Default value is false
      See Also:
    • setAnimateSelection

      public ListGrid setAnimateSelection(Boolean animateSelection)
      If the selectionCanvas is enabled, setting this property to true ensures that when the selectionCanvas is displayed it is animated into view via Canvas.animateShow(). Note that the animation effect may be customized via Canvas.animateShowEffect, Canvas.animateShowTime and Canvas.animateShowAcceleration set in selectionCanvasProperties.

      Note : This is an advanced setting

      Parameters:
      animateSelection - New animateSelection value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAnimateSelection

      public Boolean getAnimateSelection()
      If the selectionCanvas is enabled, setting this property to true ensures that when the selectionCanvas is displayed it is animated into view via Canvas.animateShow(). Note that the animation effect may be customized via Canvas.animateShowEffect, Canvas.animateShowTime and Canvas.animateShowAcceleration set in selectionCanvasProperties.
      Returns:
      Current animateSelection value. Default value is false
      See Also:
    • setAnimateSelectionUnder

      public ListGrid setAnimateSelectionUnder(Boolean animateSelectionUnder)
      If the selectionUnderCanvas is enabled, setting this property to true ensures that when the selectionUnderCanvas is displayed it is animated into view via Canvas.animateShow(). Note that the animation effect may be customized via Canvas.animateShowEffect, Canvas.animateShowTime and Canvas.animateShowAcceleration set in selectionUnderCanvasProperties.

      Note : This is an advanced setting

      Parameters:
      animateSelectionUnder - New animateSelectionUnder value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAnimateSelectionUnder

      public Boolean getAnimateSelectionUnder()
      If the selectionUnderCanvas is enabled, setting this property to true ensures that when the selectionUnderCanvas is displayed it is animated into view via Canvas.animateShow(). Note that the animation effect may be customized via Canvas.animateShowEffect, Canvas.animateShowTime and Canvas.animateShowAcceleration set in selectionUnderCanvasProperties.
      Returns:
      Current animateSelectionUnder value. Default value is false
      See Also:
    • setApplyFormulaAfterSummary

      public ListGrid setApplyFormulaAfterSummary(Boolean applyFormulaAfterSummary)
      If ListGridField.userFormula is set for some field, and this grid is showing group summaries or a grid summary, this property determines what field value should be present in those summary rows. Should the field's user-formula be applied to the calculated summary row (applyFormulaAfterSummary true), or should a standard grid or group summary be applied to the user-formula values displayed in the grid (applyFormulaAfterSummary false)?

      May be overridden at the field level via ListGridField.applyAfterSummary

      Parameters:
      applyFormulaAfterSummary - New applyFormulaAfterSummary value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getApplyFormulaAfterSummary

      public Boolean getApplyFormulaAfterSummary()
      If ListGridField.userFormula is set for some field, and this grid is showing group summaries or a grid summary, this property determines what field value should be present in those summary rows. Should the field's user-formula be applied to the calculated summary row (applyFormulaAfterSummary true), or should a standard grid or group summary be applied to the user-formula values displayed in the grid (applyFormulaAfterSummary false)?

      May be overridden at the field level via ListGridField.applyAfterSummary

      Returns:
      Current applyFormulaAfterSummary value. Default value is false
    • setApplyRowCountToLength

      public ListGrid setApplyRowCountToLength(Boolean applyRowCountToLength)
      This property allows developers to explicitly set ResultSet.applyRowCountToLength for this grid's data object.

      If not explicitly specified this will be derived from canRequestRowCount

      Parameters:
      applyRowCountToLength - New applyRowCountToLength value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getApplyRowCountToLength

      public Boolean getApplyRowCountToLength()
      This property allows developers to explicitly set ResultSet.applyRowCountToLength for this grid's data object.

      If not explicitly specified this will be derived from canRequestRowCount

      Returns:
      Current applyRowCountToLength value. Default value is null
      See Also:
    • setApplyRowNumberStyle

      public ListGrid setApplyRowNumberStyle(boolean applyRowNumberStyle)
      If showRowNumbers is true, should we apply the rowNumberStyle to the rowNumberField

      Note : This is an advanced setting

      Parameters:
      applyRowNumberStyle - New applyRowNumberStyle value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getApplyRowNumberStyle

      public boolean getApplyRowNumberStyle()
      If showRowNumbers is true, should we apply the rowNumberStyle to the rowNumberField
      Returns:
      Current applyRowNumberStyle value. Default value is true
    • setApproximateRowCountFormat

      public ListGrid setApproximateRowCountFormat(String approximateRowCountFormat)
      Format for the string returned from getFormattedRowCount() when row count status is "approximate".

      The variable rowCount is available for evaluation within this string and will be set to the current row count as a locale-formatted number.

      Parameters:
      approximateRowCountFormat - New approximateRowCountFormat value. Default value is "~${rowCount}"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getApproximateRowCountFormat

      public String getApproximateRowCountFormat()
      Format for the string returned from getFormattedRowCount() when row count status is "approximate".

      The variable rowCount is available for evaluation within this string and will be set to the current row count as a locale-formatted number.

      Returns:
      Current approximateRowCountFormat value. Default value is "~${rowCount}"
      See Also:
    • setAriaRole

      public ListGrid setAriaRole(String ariaRole)
      ARIA role for this ListGrid if screen reader mode is enabled.

      The WAI-Aria standards contain a number of roles and related attributes that could apply to data presented in a ListGrid or its subclasses. In order to make screenreader support as straightforward as possible we have built-in support for writing out appropriate aria roles and attributes on the listGrid and its component elements for a couple of standard modes, as well as providing override points allowing developers to explicitly specify the properties that get written out.

      The two "standard" ariaRoles supported for ListGrids are "grid" and "list".

      When ariaRole is set to "list" we write out the following standard properties by default:

      • rows have role set to "listitem"
      • getRowAriaState() will return aria properties for setsize, posinset, selected (for selected rows) and expanded (for expanded rows)
      • Additionally, if screenReaderWriteRowLabelledBy is true, rows will write out an aria-labelldby that will cause ScreenReaders to read the column header and cell / row separators in addition to the cell content for the row

      When ariaRole is set to "grid" we write out the following standard properties by default:

      • aria-rowcount and aria-colcount will be specified on the listGrid itself
      • The header will have role row and aria-rowindex set to 1
      • Column header buttons will have role columnheader, and aria-colindex set to the appropriate value for the column. Additionally aria-sort will be specified to reflect the current sort-state for the field, and if the header menu is enabled, aria-haspopup will be true
      • Rows within the grid body will have role row
      • getRowAriaState() will return aria properties for rowindex, selected (for selected rows) and expanded (for expanded rows)
      • Cells within rows will have role gridcell
      Developers may configure different ARIA HTML roles and attributes by modifying this attribute (listGrid.ariaRole) and implementing custom handling for the following APIs:
      ListGrid listGrid.ariaRole, ariaState, .
      header / header buttons headerAriaRole, headerButtonAriaRole, ListGridField.headerButtonAriaRole headerButtonAriaState, ListGridField.headerButtonAriaState
      rows rowRole, recordRowRoleProperty, rowAriaState, recordRowAriaStateProperty . To update row state at runtime, developers may redraw the grid or its body.
      cells cellRole, recordCellRoleProperty . To update cell state at runtime, developers may redraw the grid or its body.

      Note : This is an advanced setting

      Overrides:
      setAriaRole in class Canvas
      Parameters:
      ariaRole - New ariaRole value. Default value is "list"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAriaRole

      public String getAriaRole()
      ARIA role for this ListGrid if screen reader mode is enabled.

      The WAI-Aria standards contain a number of roles and related attributes that could apply to data presented in a ListGrid or its subclasses. In order to make screenreader support as straightforward as possible we have built-in support for writing out appropriate aria roles and attributes on the listGrid and its component elements for a couple of standard modes, as well as providing override points allowing developers to explicitly specify the properties that get written out.

      The two "standard" ariaRoles supported for ListGrids are "grid" and "list".

      When ariaRole is set to "list" we write out the following standard properties by default:

      • rows have role set to "listitem"
      • getRowAriaState() will return aria properties for setsize, posinset, selected (for selected rows) and expanded (for expanded rows)
      • Additionally, if screenReaderWriteRowLabelledBy is true, rows will write out an aria-labelldby that will cause ScreenReaders to read the column header and cell / row separators in addition to the cell content for the row

      When ariaRole is set to "grid" we write out the following standard properties by default:

      • aria-rowcount and aria-colcount will be specified on the listGrid itself
      • The header will have role row and aria-rowindex set to 1
      • Column header buttons will have role columnheader, and aria-colindex set to the appropriate value for the column. Additionally aria-sort will be specified to reflect the current sort-state for the field, and if the header menu is enabled, aria-haspopup will be true
      • Rows within the grid body will have role row
      • getRowAriaState() will return aria properties for rowindex, selected (for selected rows) and expanded (for expanded rows)
      • Cells within rows will have role gridcell
      Developers may configure different ARIA HTML roles and attributes by modifying this attribute (listGrid.ariaRole) and implementing custom handling for the following APIs:
      ListGrid listGrid.ariaRole, ariaState, .
      header / header buttons headerAriaRole, headerButtonAriaRole, ListGridField.headerButtonAriaRole headerButtonAriaState, ListGridField.headerButtonAriaState
      rows rowRole, recordRowRoleProperty, rowAriaState, recordRowAriaStateProperty . To update row state at runtime, developers may redraw the grid or its body.
      cells cellRole, recordCellRoleProperty . To update cell state at runtime, developers may redraw the grid or its body.
      Overrides:
      getAriaRole in class Canvas
      Returns:
      Current ariaRole value. Default value is "list"
      See Also:
    • setArrowKeyAction

      public ListGrid setArrowKeyAction(String arrowKeyAction)
      Action to perform when the listGrid has keyboard focus (but not editing focus) and a user presses the arrow keys to navigate around the grid.

      If canSelectCells is true, navigation occurs by cell - the user can move to a new cell in any direction.
      If canSelectCells is false, navigation typically occurs by row - the user can move up or down throw the rows in the grid.

      For actions that fire events (click or doubleClick), both cell and record level events are fired (for example for arrowKeyAction "activate", ListGrid.cellDoubleClick() and ListGrid.recordDoubleClick() are fired for the new position.
      Note that if canSelectCells is false, the events will be fired as if a click or double click had occurred on the first cell where ListGridField.ignoreKeyboardClicks is not true.

      Possible actions are:

      • "select" : select the next row or cell in the grid and call click handlers.
      • "selectOnly" : select the next row or cell in the grid without firing click handlers.
      • "focus" : move focus to the next row or cell in the grid without changing the selection or calling click handlers.
      • "activate" : select and activate the next row or cell in the list (calls recordDoubleClick handler)
      • "none" : no action
      • null : if selectionAppearance is "checkbox", behaves as if set to "focus"; otherwise, behaves as if set to "select"

      Note: If this grid is editable, behavior while editing is governed by the result of getArrowKeyEditAction().

      See also generateClickOnEnter, generateClickOnSpace, generateDoubleClickOnEnter and generateDoubleClickOnSpace

      Note : This is an advanced setting

      Parameters:
      arrowKeyAction - New arrowKeyAction value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getArrowKeyAction

      public String getArrowKeyAction()
      Action to perform when the listGrid has keyboard focus (but not editing focus) and a user presses the arrow keys to navigate around the grid.

      If canSelectCells is true, navigation occurs by cell - the user can move to a new cell in any direction.
      If canSelectCells is false, navigation typically occurs by row - the user can move up or down throw the rows in the grid.

      For actions that fire events (click or doubleClick), both cell and record level events are fired (for example for arrowKeyAction "activate", ListGrid.cellDoubleClick() and ListGrid.recordDoubleClick() are fired for the new position.
      Note that if canSelectCells is false, the events will be fired as if a click or double click had occurred on the first cell where ListGridField.ignoreKeyboardClicks is not true.

      Possible actions are:

      • "select" : select the next row or cell in the grid and call click handlers.
      • "selectOnly" : select the next row or cell in the grid without firing click handlers.
      • "focus" : move focus to the next row or cell in the grid without changing the selection or calling click handlers.
      • "activate" : select and activate the next row or cell in the list (calls recordDoubleClick handler)
      • "none" : no action
      • null : if selectionAppearance is "checkbox", behaves as if set to "focus"; otherwise, behaves as if set to "select"

      Note: If this grid is editable, behavior while editing is governed by the result of getArrowKeyEditAction().

      See also generateClickOnEnter, generateClickOnSpace, generateDoubleClickOnEnter and generateDoubleClickOnSpace

      Returns:
      Current arrowKeyAction value. Default value is null
    • setArrowKeyEditAction

      public ListGrid setArrowKeyEditAction(ArrowKeyEditAction arrowKeyEditAction)
      What to do when a user hits arrow key while editing a field?
      If not explicitly specified getArrowKeyEditAction() will return an appropriate action depending on the field type.
      Parameters:
      arrowKeyEditAction - New arrowKeyEditAction value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getArrowKeyEditAction

      public ArrowKeyEditAction getArrowKeyEditAction()
      What to do when a user hits arrow key while editing a field?
      If not explicitly specified getArrowKeyEditAction() will return an appropriate action depending on the field type.
      Returns:
      How should "Up" and "Down" arrow keypresses be handled when the user is editing an item in the grid.

      Returning "none" will cause the grid to take no action and allow default up/down arrow key behavior within the editor to proceed. Returning "editNext" will create an appropriate EditCompletionEvent ("arrow_up" or "arrow_down" and cause the grid to start editing the previous or next row).

      Default behavior varies by item type. For items where up and down arrows have significant functionality to the editor this method returns "none", allowing that standard behavior to proceed. This includes:
      - Multi line editors (such as TextAreaItems)
      - SelectItems
      - SpinnerItems
      For other items, the default return value will be "edit_next"

      To override these defaults, developers may specify an explicit arrowKeyEditAction at the grid, or field level. Default value is null

      See Also:
    • setAsyncErrorCellValue

      public ListGrid setAsyncErrorCellValue(String asyncErrorCellValue)
      The value to display for cells when an error occurred during asynchronous computation.

      This is the grid-wide setting. ListGridField.asyncErrorCellValue can override the grid setting for a specific field.

      Parameters:
      asyncErrorCellValue - New asyncErrorCellValue value. Default value is "!"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAsyncErrorCellValue

      public String getAsyncErrorCellValue()
      The value to display for cells when an error occurred during asynchronous computation.

      This is the grid-wide setting. ListGridField.asyncErrorCellValue can override the grid setting for a specific field.

      Returns:
      Current asyncErrorCellValue value. Default value is "!"
      See Also:
    • setAsynchGroupingPrompt

      public ListGrid setAsynchGroupingPrompt(String asynchGroupingPrompt) throws IllegalStateException
      The prompt to display while interactivity is blocked during asynchronous grouping.
      Parameters:
      asynchGroupingPrompt - New asynchGroupingPrompt value. Default value is "${loadingImage}&nbsp;Grouping data..."
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAsynchGroupingPrompt

      public String getAsynchGroupingPrompt()
      The prompt to display while interactivity is blocked during asynchronous grouping.
      Returns:
      Current asynchGroupingPrompt value. Default value is "${loadingImage}&nbsp;Grouping data..."
      See Also:
    • setAsyncMissingCellValue

      public ListGrid setAsyncMissingCellValue(String asyncMissingCellValue)
      The value to display for cells whose value was not computed by the previous asynchronous operation to compute it, or will not be computed by an asynchronous operation due to currently being disabled. For example, the previous asynchronous operation may have been canceled, or the grid may be displaying too many values to compute AI-generated values for a field.

      This is the grid-wide setting. ListGridField.asyncMissingCellValue can override the grid setting for a specific field.

      Parameters:
      asyncMissingCellValue - New asyncMissingCellValue value. Default value is "-"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAsyncMissingCellValue

      public String getAsyncMissingCellValue()
      The value to display for cells whose value was not computed by the previous asynchronous operation to compute it, or will not be computed by an asynchronous operation due to currently being disabled. For example, the previous asynchronous operation may have been canceled, or the grid may be displaying too many values to compute AI-generated values for a field.

      This is the grid-wide setting. ListGridField.asyncMissingCellValue can override the grid setting for a specific field.

      Returns:
      Current asyncMissingCellValue value. Default value is "-"
      See Also:
    • setAutoComplete

      public ListGrid setAutoComplete(AutoComplete autoComplete)
      Whether to do inline autoComplete in text fields during inline editing
      Overridden by ListGridField.autoComplete if specified. If unset picks up the default from the appropriate editor class (subclass of FormItem).
      Parameters:
      autoComplete - New autoComplete value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAutoComplete

      public AutoComplete getAutoComplete()
      Whether to do inline autoComplete in text fields during inline editing
      Overridden by ListGridField.autoComplete if specified. If unset picks up the default from the appropriate editor class (subclass of FormItem).
      Returns:
      Current autoComplete value. Default value is null
      See Also:
    • setAutoConfirmSaveEdits

      public ListGrid setAutoConfirmSaveEdits(Boolean autoConfirmSaveEdits)
      For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded by default. This flag determines whether we should save such edits automatically in this case. See also confirmDiscardEdits, which allows the user to choose whether to save or discard the unsaved edits.
      Parameters:
      autoConfirmSaveEdits - New autoConfirmSaveEdits value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAutoConfirmSaveEdits

      public Boolean getAutoConfirmSaveEdits()
      For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded by default. This flag determines whether we should save such edits automatically in this case. See also confirmDiscardEdits, which allows the user to choose whether to save or discard the unsaved edits.
      Returns:
      Current autoConfirmSaveEdits value. Default value is false
      See Also:
    • setAutoFetchDisplayMap

      public ListGrid setAutoFetchDisplayMap(Boolean autoFetchDisplayMap)
      If true, for fields where ListGridField.optionDataSource is specified, a valueMap will be automatically created by making a DataSource.fetchData() call against the specified dataSource and extracting a valueMap from the returned records based on the displayField and valueField.

      If set to false, valueMaps will not be automatically fetched. In this case, setting field.optionDataSource is effectively a shortcut for setting optionDataSource on the editor via ListGridField.editorProperties.

      Can also be disabled on a per-field basis with ListGridField.autoFetchDisplayMap.

      Parameters:
      autoFetchDisplayMap - New autoFetchDisplayMap value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAutoFetchDisplayMap

      public Boolean getAutoFetchDisplayMap()
      If true, for fields where ListGridField.optionDataSource is specified, a valueMap will be automatically created by making a DataSource.fetchData() call against the specified dataSource and extracting a valueMap from the returned records based on the displayField and valueField.

      If set to false, valueMaps will not be automatically fetched. In this case, setting field.optionDataSource is effectively a shortcut for setting optionDataSource on the editor via ListGridField.editorProperties.

      Can also be disabled on a per-field basis with ListGridField.autoFetchDisplayMap.

      Returns:
      Current autoFetchDisplayMap value. Default value is true
      See Also:
    • setAutoFetchRowCount

      public ListGrid setAutoFetchRowCount(boolean autoFetchRowCount)
      Depending on whether DataSource.progressiveLoading is active, the exact count of available rows may not be available as part of the standard data fetch response - setting autoFetchRowCount:true will cause a fetch for an accurate row count to be issued as soon as data arrives (from a progressive dataSource response) without an accurate row count. This value will then be available for display in the RowRangeDisplay label.

      To allow users to request an accurate row count by clicking the RowRangeDisplay instead of kicking off a row count fetch automatically, use canRequestRowCount.

      The autoFetchRowCount value will be passed through to the ResultSet data object which is responsible for issuing the row count fetch(es) at appropriate times.

      Parameters:
      autoFetchRowCount - New autoFetchRowCount value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFetchRowCount

      public boolean getAutoFetchRowCount()
      Depending on whether DataSource.progressiveLoading is active, the exact count of available rows may not be available as part of the standard data fetch response - setting autoFetchRowCount:true will cause a fetch for an accurate row count to be issued as soon as data arrives (from a progressive dataSource response) without an accurate row count. This value will then be available for display in the RowRangeDisplay label.

      To allow users to request an accurate row count by clicking the RowRangeDisplay instead of kicking off a row count fetch automatically, use canRequestRowCount.

      The autoFetchRowCount value will be passed through to the ResultSet data object which is responsible for issuing the row count fetch(es) at appropriate times.

      Returns:
      Current autoFetchRowCount value. Default value is false
    • setAutoFitAllText

      public ListGrid setAutoFitAllText(String autoFitAllText)
      If we're showing a headerContextMenu for this grid, and canAutoFitFields is true, this attribute will be shown as the menu item title for an item to perform a one-time autoFit of all visible fields via the autoFitField() method.
      Parameters:
      autoFitAllText - New autoFitAllText value. Default value is "Auto Fit All Columns"
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitAllText

      public String getAutoFitAllText()
      If we're showing a headerContextMenu for this grid, and canAutoFitFields is true, this attribute will be shown as the menu item title for an item to perform a one-time autoFit of all visible fields via the autoFitField() method.
      Returns:
      Current autoFitAllText value. Default value is "Auto Fit All Columns"
    • setAutoFitClipFields

      public ListGrid setAutoFitClipFields(String... autoFitClipFields) throws IllegalStateException
      If autoFitFieldWidths is enabled and the calculated field sizes are wide enough that horizontal scrolling would be introduced, this attribute may be set to an array of fieldNames, causing those fields to be clipped rather than forcing horizontal scrollbars to appear.

      Note: If any frozen columns are included in this list they will not be clipped.

      Parameters:
      autoFitClipFields - New autoFitClipFields value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAutoFitClipFields

      public String[] getAutoFitClipFields()
      If autoFitFieldWidths is enabled and the calculated field sizes are wide enough that horizontal scrolling would be introduced, this attribute may be set to an array of fieldNames, causing those fields to be clipped rather than forcing horizontal scrollbars to appear.

      Note: If any frozen columns are included in this list they will not be clipped.

      Returns:
      Current autoFitClipFields value. Default value is null
    • setAutoFitData

      public ListGrid setAutoFitData(Autofit autoFitData)
      Should this ListGrid automatically expand to accommodate the size of records and fields?

      Valid settings are

      • "vertical": expand vertically to accommodate records.
      • "horizontal": expand horizontally to accommodate fields.
      • "both": expand horizontally and vertically to accommodate content.
      How far the ListGrid will expand may be limited via the following properties: autoFitMaxHeight, autoFitMaxRecords, autoFitMaxWidth, autoFitMaxColumns.

      Note that this property causes the grid as a whole to expand to fit records or fields. To have the fields or records themselves expand to fit cell contents, see autoFitFieldWidths and fixedRecordHeights.

      If this method is called after the component has been drawn/initialized: Setter for autoFitData.

      Parameters:
      autoFitData - One of "vertical", "horizontal" or "both". To disable auto fit behavior, pass in null. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitData

      public Autofit getAutoFitData()
      Should this ListGrid automatically expand to accommodate the size of records and fields?

      Valid settings are

      • "vertical": expand vertically to accommodate records.
      • "horizontal": expand horizontally to accommodate fields.
      • "both": expand horizontally and vertically to accommodate content.
      How far the ListGrid will expand may be limited via the following properties: autoFitMaxHeight, autoFitMaxRecords, autoFitMaxWidth, autoFitMaxColumns.

      Note that this property causes the grid as a whole to expand to fit records or fields. To have the fields or records themselves expand to fit cell contents, see autoFitFieldWidths and fixedRecordHeights.

      Returns:
      Current autoFitData value. Default value is null
    • setAutoFitDateFields

      public ListGrid setAutoFitDateFields(AutoFitWidthApproach autoFitDateFields)
      Should listGrids automatically size date fields to fit their values or titles? If set to "value", fields of type date will be rendered at the size specified by defaultDateFieldWidth, (or defaultEditableDateFieldWidth for editable fields). This static value is appropriate for dates rendered with the standard short-date formatter. If set to "title" or "both", the drawn width of the title will be taken into account when sizing the column.

      This is achieved by enabling autoFitWidth:true on date fields when this property is set to anything other than "none", setting the ListGridField.autoFitWidthApproach to the value specified here and having logic in getDefaultFieldWidth() pick up the defaultDateFieldWidth or defaultEditableDateFieldWidth if appropriate.

      Parameters:
      autoFitDateFields - New autoFitDateFields value. Default value is "value"
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitDateFields

      public AutoFitWidthApproach getAutoFitDateFields()
      Should listGrids automatically size date fields to fit their values or titles? If set to "value", fields of type date will be rendered at the size specified by defaultDateFieldWidth, (or defaultEditableDateFieldWidth for editable fields). This static value is appropriate for dates rendered with the standard short-date formatter. If set to "title" or "both", the drawn width of the title will be taken into account when sizing the column.

      This is achieved by enabling autoFitWidth:true on date fields when this property is set to anything other than "none", setting the ListGridField.autoFitWidthApproach to the value specified here and having logic in getDefaultFieldWidth() pick up the defaultDateFieldWidth or defaultEditableDateFieldWidth if appropriate.

      Returns:
      Current autoFitDateFields value. Default value is "value"
    • setAutoFitExpandField

      public ListGrid setAutoFitExpandField(String autoFitExpandField) throws IllegalStateException
      The field to expand if autoFitFieldWidths and autoFitFieldsFillViewport are enabled and auto-fitting will not fill all available horizontal space.

      If unset, will default to the text field with the longest DataSourceField.length if length is set, otherwise, the first text field with no width specified.

      Note that expanding frozen columns is not supported.

      Parameters:
      autoFitExpandField - New autoFitExpandField value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAutoFitExpandField

      public String getAutoFitExpandField()
      The field to expand if autoFitFieldWidths and autoFitFieldsFillViewport are enabled and auto-fitting will not fill all available horizontal space.

      If unset, will default to the text field with the longest DataSourceField.length if length is set, otherwise, the first text field with no width specified.

      Note that expanding frozen columns is not supported.

      Returns:
      Current autoFitExpandField value. Default value is null
    • setAutoFitExtraRecords

      public ListGrid setAutoFitExtraRecords(Integer autoFitExtraRecords)
      If autoFitData is set to "vertical" or "both", setting this property will cause the ListGrid body to size large enough to accommodate the actual data and also leave this many extra rows' worth of blank space below the last record. If a maximum size is specified via autoFitMaxHeight or autoFitMaxRecords, it will still be respected. Once the data set is large enough to fill or exceed that space, this property no longer has an effect.

      If this method is called after the component has been drawn/initialized: Setter for autoFitExtraRecords.
      Parameters:
      autoFitExtraRecords - Number of extra rows beyond the data-size we'll expand to accommodate if auto fit is enabled vertically. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitExtraRecords

      public Integer getAutoFitExtraRecords()
      If autoFitData is set to "vertical" or "both", setting this property will cause the ListGrid body to size large enough to accommodate the actual data and also leave this many extra rows' worth of blank space below the last record. If a maximum size is specified via autoFitMaxHeight or autoFitMaxRecords, it will still be respected. Once the data set is large enough to fill or exceed that space, this property no longer has an effect.
      Returns:
      Current autoFitExtraRecords value. Default value is null
    • setAutoFitFieldsFillViewport

      public ListGrid setAutoFitFieldsFillViewport(Boolean autoFitFieldsFillViewport) throws IllegalStateException
      If autoFitFieldWidths is enabled, and extra space is available after autofitting all fields, should the grid automatically expand one field to fill the extra space.

      When enabled, the field to expand may be specified via autoFitExpandField.

      Note this logic will not expand a frozen column.

      Parameters:
      autoFitFieldsFillViewport - New autoFitFieldsFillViewport value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAutoFitFieldsFillViewport

      public Boolean getAutoFitFieldsFillViewport()
      If autoFitFieldWidths is enabled, and extra space is available after autofitting all fields, should the grid automatically expand one field to fill the extra space.

      When enabled, the field to expand may be specified via autoFitExpandField.

      Note this logic will not expand a frozen column.

      Returns:
      Current autoFitFieldsFillViewport value. Default value is true
    • setAutoFitFieldText

      public ListGrid setAutoFitFieldText(String autoFitFieldText)
      If we're showing a headerContextMenu for this grid, and user-driven auto fit of fields is enabled via ListGridField.canAutoFitWidth or canAutoFitFields, this attribute will be shown as the menu item title for an item to perform a one-time autoFit of the field to its title or content via a call to autoFitField().
      Parameters:
      autoFitFieldText - New autoFitFieldText value. Default value is "Auto Fit"
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitFieldText

      public String getAutoFitFieldText()
      If we're showing a headerContextMenu for this grid, and user-driven auto fit of fields is enabled via ListGridField.canAutoFitWidth or canAutoFitFields, this attribute will be shown as the menu item title for an item to perform a one-time autoFit of the field to its title or content via a call to autoFitField().
      Returns:
      Current autoFitFieldText value. Default value is "Auto Fit"
    • setAutoFitFieldWidths

      public ListGrid setAutoFitFieldWidths(Boolean autoFitFieldWidths) throws IllegalStateException
      Should ListGrid fields autofit their widths to titles or content? This property may be overridden on a per-field basis via ListGridField.autoFitWidth. Developers may wish to consider disabling autoFit for fields known to have exceptionally long content as this can lead to large horizontal scrollbars and unwieldy UI.

      The autoFitWidthApproach controls whether fitting is to values, titles or both. This property may also be overridden on a per field basis.

      If field.width is also set on the field, it will be taken as a minimum width. minFieldWidth will also be respected.

      By default, the entire available width of the grid will still be used, by allocating any "extra" space to specific columns - see autoFitFieldsFillViewport for details on controlling this behavior.

      When this feature is enabled, autofitting is active on an ongoing basis. Autofitting will be performed:

      • whenever the dataset is completely changed or rows are added or removed
      • whenever a field which is autofitting is changed
      • on a manual call to autoFitField() or autoFitFields()
      Auto-fitting behavior continues until the user resizes the field manually, at which point it stops. The user can also perform a one-time auto-fit of fields via the header context menu if canAutoFitFields is enabled.

      When autofitting to column values, getDefaultFieldWidth() will be called to determine the space required for a field's values. This method uses values from the rendered set of rows to calculate the required column width, which means the field width may still be smaller than values from non-rendered rows. See showAllRecords and drawAheadRatio) to control incremental rendering of rows.

      Note that for icon type fields, the autoFitIconFields property setting may turn on auto-fit-width behavior for specific fields by default, even if autoFitFieldWidths is false for the grid as a whole.

      Using this feature has a performance penalty roughly comparable to always rendering one additional field per field where autofitting is enabled. Specifically, enabling it for all fields would be comparable to both doubling the number of fields and disabling horizontal incremental rendering. In a grid where only half the fields are normally visible and hence only half are normally rendered, this would be roughly 4 times slower overall.

      This performance penalty is a result of getDefaultFieldWidth() having to render out the data set offscreen and measure the rendered content - it does not apply for cases where this method can return a simple fixed values (as with icon fields).

      Which fields are currently autofitting is saved as part of the view state of the ListGrid.

      Interaction with wrapping: If wrapping of cell values is enabled, autoFit behavior based on cell content will render fields wide enough to contain the unwrapped cell values. If wrapping of field titles is enabled, when fitting to a title, a field will render wide enough to accommodate the wrapped title without clipping (so wide enough for the natural wrap-point / longest word or unwrappable string).

      Note that, if you just want to autofit specific fields, rather than trying to achieve cascading from grid-level settings with specific field overrides, the quick, single setting to use is ListGridField.autoFit.

      If this method is called after the component has been drawn/initialized: Setter for autoFitFieldWidths. Modifies the default auto-fit-width behavior for fields in this grid. Note that this may be overridden at the field level via ListGridField.autoFitWidth.

      Parameters:
      autoFitFieldWidths - New value for autoFitFieldWidths. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAutoFitFieldWidths

      public Boolean getAutoFitFieldWidths()
      Should ListGrid fields autofit their widths to titles or content? This property may be overridden on a per-field basis via ListGridField.autoFitWidth. Developers may wish to consider disabling autoFit for fields known to have exceptionally long content as this can lead to large horizontal scrollbars and unwieldy UI.

      The autoFitWidthApproach controls whether fitting is to values, titles or both. This property may also be overridden on a per field basis.

      If field.width is also set on the field, it will be taken as a minimum width. minFieldWidth will also be respected.

      By default, the entire available width of the grid will still be used, by allocating any "extra" space to specific columns - see autoFitFieldsFillViewport for details on controlling this behavior.

      When this feature is enabled, autofitting is active on an ongoing basis. Autofitting will be performed:

      • whenever the dataset is completely changed or rows are added or removed
      • whenever a field which is autofitting is changed
      • on a manual call to autoFitField() or autoFitFields()
      Auto-fitting behavior continues until the user resizes the field manually, at which point it stops. The user can also perform a one-time auto-fit of fields via the header context menu if canAutoFitFields is enabled.

      When autofitting to column values, getDefaultFieldWidth() will be called to determine the space required for a field's values. This method uses values from the rendered set of rows to calculate the required column width, which means the field width may still be smaller than values from non-rendered rows. See showAllRecords and drawAheadRatio) to control incremental rendering of rows.

      Note that for icon type fields, the autoFitIconFields property setting may turn on auto-fit-width behavior for specific fields by default, even if autoFitFieldWidths is false for the grid as a whole.

      Using this feature has a performance penalty roughly comparable to always rendering one additional field per field where autofitting is enabled. Specifically, enabling it for all fields would be comparable to both doubling the number of fields and disabling horizontal incremental rendering. In a grid where only half the fields are normally visible and hence only half are normally rendered, this would be roughly 4 times slower overall.

      This performance penalty is a result of getDefaultFieldWidth() having to render out the data set offscreen and measure the rendered content - it does not apply for cases where this method can return a simple fixed values (as with icon fields).

      Which fields are currently autofitting is saved as part of the view state of the ListGrid.

      Interaction with wrapping: If wrapping of cell values is enabled, autoFit behavior based on cell content will render fields wide enough to contain the unwrapped cell values. If wrapping of field titles is enabled, when fitting to a title, a field will render wide enough to accommodate the wrapped title without clipping (so wide enough for the natural wrap-point / longest word or unwrappable string).

      Note that, if you just want to autofit specific fields, rather than trying to achieve cascading from grid-level settings with specific field overrides, the quick, single setting to use is ListGridField.autoFit.

      Returns:
      Current autoFitFieldWidths value. Default value is null
    • setAutoFitHeaderHeights

      public ListGrid setAutoFitHeaderHeights(Boolean autoFitHeaderHeights) throws IllegalStateException
      If this property is set to true, header buttons for either fields or header spans will automatically expand to accommodate their titles vertically. This means if you have a "tall" title - typically a long string where ListGridField.wrap is set to true such that you end up with several lines of text - the button will render large enough to accommodate it. If necessary this will cause the header for the grid as a whole to expand beyond the specified headerHeight.

      Note that you need not set HeaderSpan.height or headerSpanHeight if you set this property, but if you do, they will be used as minimum values.

      Parameters:
      autoFitHeaderHeights - New autoFitHeaderHeights value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAutoFitHeaderHeights

      public Boolean getAutoFitHeaderHeights()
      If this property is set to true, header buttons for either fields or header spans will automatically expand to accommodate their titles vertically. This means if you have a "tall" title - typically a long string where ListGridField.wrap is set to true such that you end up with several lines of text - the button will render large enough to accommodate it. If necessary this will cause the header for the grid as a whole to expand beyond the specified headerHeight.

      Note that you need not set HeaderSpan.height or headerSpanHeight if you set this property, but if you do, they will be used as minimum values.

      Returns:
      Current autoFitHeaderHeights value. Default value is null
    • setAutoFitIconFields

      public ListGrid setAutoFitIconFields(AutoFitIconFieldType autoFitIconFields)
      Smart GWT listGrids have special logic to automatically size fields that are displayed as an icon - that is fields with type:"icon", fields displaying only value icons, and boolean fields (which are rendered as a checkmark type icon by default.

      This attribute controls this behavior - governing whether icon fields should be sized to fit their content (icon), title, or whether to disable this behavior. Setting this value to "title" or "iconWidth" will cause ListGridField.autoFitWidth to be enabled by default for all icon fields with the ListGridField.autoFitWidthApproach set to "value" or "both" as appropriate. Note that the width required for the icons is calculated by getDefaultFieldWidth() which performs a simple calculation based on the specified icon width for these types of fields.

      This setting governs default behavior for icon fields - for specific fields within a grid, this default behavior can be overridden by setting an explicit ListGridField.width or explicitly enabling ListGridField.autoFitWidth and setting ListGridField.autoFitWidthApproach on the field in question.

      Parameters:
      autoFitIconFields - New autoFitIconFields value. Default value is "title"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAutoFitIconFields

      public AutoFitIconFieldType getAutoFitIconFields()
      Smart GWT listGrids have special logic to automatically size fields that are displayed as an icon - that is fields with type:"icon", fields displaying only value icons, and boolean fields (which are rendered as a checkmark type icon by default.

      This attribute controls this behavior - governing whether icon fields should be sized to fit their content (icon), title, or whether to disable this behavior. Setting this value to "title" or "iconWidth" will cause ListGridField.autoFitWidth to be enabled by default for all icon fields with the ListGridField.autoFitWidthApproach set to "value" or "both" as appropriate. Note that the width required for the icons is calculated by getDefaultFieldWidth() which performs a simple calculation based on the specified icon width for these types of fields.

      This setting governs default behavior for icon fields - for specific fields within a grid, this default behavior can be overridden by setting an explicit ListGridField.width or explicitly enabling ListGridField.autoFitWidth and setting ListGridField.autoFitWidthApproach on the field in question.

      Returns:
      Current autoFitIconFields value. Default value is "title"
      See Also:
    • setAutoFitMaxColumns

      public ListGrid setAutoFitMaxColumns(int autoFitMaxColumns)
      If autoFitData is set to "horizontal" or "both" this property provides the maximum number of columns for which the ListGrid will expand. If more columns are present, scrolling will be introduced to reach them as normal. If unset the ListGrid will expand to accommodate as many columns as are defined for the grid.

      If this method is called after the component has been drawn/initialized: Setter for autoFitMaxColumns.
      Parameters:
      autoFitMaxColumns - Maximum number of fields we'll expand to accommodate if auto fit is enabled horizontally. Default value is 50
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitMaxColumns

      public int getAutoFitMaxColumns()
      If autoFitData is set to "horizontal" or "both" this property provides the maximum number of columns for which the ListGrid will expand. If more columns are present, scrolling will be introduced to reach them as normal. If unset the ListGrid will expand to accommodate as many columns as are defined for the grid.
      Returns:
      Current autoFitMaxColumns value. Default value is 50
    • setAutoFitMaxHeight

      public ListGrid setAutoFitMaxHeight(Integer autoFitMaxHeight)
      If autoFitData is set to "vertical" or "both" this property provides an upper limit on how far the ListGrid will expand vertically to accommodate its content. If content exceeds this height, scrollbars will be introduced as usual. In addition to this property, autoFitMaxRecords allows you to limit vertical expansion based on the number of rows to be rendered.

      Note: Unlike autoFitMaxWidth, this property cannot be set to a string percentage value; it must be a numeric pixel value or null.

      If this method is called after the component has been drawn/initialized: Setter for autoFitMaxHeight.

      Parameters:
      autoFitMaxHeight - Maximum height in px we'll expand to accommodate if auto fit is enabled vertically. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitMaxHeight

      public Integer getAutoFitMaxHeight()
      If autoFitData is set to "vertical" or "both" this property provides an upper limit on how far the ListGrid will expand vertically to accommodate its content. If content exceeds this height, scrollbars will be introduced as usual. In addition to this property, autoFitMaxRecords allows you to limit vertical expansion based on the number of rows to be rendered.

      Note: Unlike autoFitMaxWidth, this property cannot be set to a string percentage value; it must be a numeric pixel value or null.

      Returns:
      Current autoFitMaxHeight value. Default value is null
    • setAutoFitMaxRecords

      public ListGrid setAutoFitMaxRecords(int autoFitMaxRecords)
      If autoFitData is set to "vertical" or "both" this property provides the maximum number of records for which the ListGrid will expand. If more records are present, scrolling will be introduced to reach them as normal. If unset, by default the ListGrid will expand to accommodate as many records as are present.

      If this method is called after the component has been drawn/initialized: Setter for autoFitMaxRecords.
      Parameters:
      autoFitMaxRecords - Maximum number of rows we'll expand to accommodate if auto fit is enabled vertically. Default value is 50
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitMaxRecords

      public int getAutoFitMaxRecords()
      If autoFitData is set to "vertical" or "both" this property provides the maximum number of records for which the ListGrid will expand. If more records are present, scrolling will be introduced to reach them as normal. If unset, by default the ListGrid will expand to accommodate as many records as are present.
      Returns:
      Current autoFitMaxRecords value. Default value is 50
    • setAutoFitMaxWidth

      public ListGrid setAutoFitMaxWidth(Integer autoFitMaxWidth)
      If autoFitData is set to "horizontal" or "both" this property provides an upper limit on how far the ListGrid will expand horizontally to accommodate its content. Value may be specified as a numeric pixel value or a percentage value.

      If content exceeds this width, scrollbars will be introduced as usual. In addition to this property, autoFitMaxColumns allows you to limit horizontal expansion based on the number of columns to be rendered.

      If this method is called after the component has been drawn/initialized: Setter for autoFitMaxWidth.

      Parameters:
      autoFitMaxWidth - Width we'll expand to accommodate if auto fit is enabled horizontally. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitMaxWidth

      public Integer getAutoFitMaxWidth()
      If autoFitData is set to "horizontal" or "both" this property provides an upper limit on how far the ListGrid will expand horizontally to accommodate its content. Value may be specified as a numeric pixel value or a percentage value.

      If content exceeds this width, scrollbars will be introduced as usual. In addition to this property, autoFitMaxColumns allows you to limit horizontal expansion based on the number of columns to be rendered.

      Returns:
      Returns the autoFitMaxWidth. Note that this method always returns an integer value - autoFitMaxWidth specified as a percentage will be resolved to a pixel value before being returned. Default value is null
    • setAutoFitMaxWidth

      public ListGrid setAutoFitMaxWidth(String autoFitMaxWidth)
      If autoFitData is set to "horizontal" or "both" this property provides an upper limit on how far the ListGrid will expand horizontally to accommodate its content. Value may be specified as a numeric pixel value or a percentage value.

      If content exceeds this width, scrollbars will be introduced as usual. In addition to this property, autoFitMaxColumns allows you to limit horizontal expansion based on the number of columns to be rendered.

      If this method is called after the component has been drawn/initialized: Setter for autoFitMaxWidth.

      Parameters:
      autoFitMaxWidth - Width we'll expand to accommodate if auto fit is enabled horizontally. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitMaxWidthAsString

      public String getAutoFitMaxWidthAsString()
      If autoFitData is set to "horizontal" or "both" this property provides an upper limit on how far the ListGrid will expand horizontally to accommodate its content. Value may be specified as a numeric pixel value or a percentage value.

      If content exceeds this width, scrollbars will be introduced as usual. In addition to this property, autoFitMaxColumns allows you to limit horizontal expansion based on the number of columns to be rendered.

      Returns:
      Returns the autoFitMaxWidth. Note that this method always returns an integer value - autoFitMaxWidth specified as a percentage will be resolved to a pixel value before being returned. Default value is null
    • setAutoFitTimeFields

      public ListGrid setAutoFitTimeFields(AutoFitWidthApproach autoFitTimeFields)
      Should listGrids automatically size time fields to fit their values or titles? If set to "value", fields of type time will be rendered at the size specified by defaultTimeFieldWidth. This static value is appropriate for dates rendered with the standard time formatter. If set to "title" or "both", the drawn width of the title will be taken into account when sizing the column.

      This is achieved by enabling autoFitWidth:true on date fields when this property is set to anything other than "none", setting the ListGridField.autoFitWidthApproach to the value specified here and having logic in getDefaultFieldWidth() pick up the defaultTimeFieldWidth if appropriate.

      Parameters:
      autoFitTimeFields - New autoFitTimeFields value. Default value is "value"
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitTimeFields

      public AutoFitWidthApproach getAutoFitTimeFields()
      Should listGrids automatically size time fields to fit their values or titles? If set to "value", fields of type time will be rendered at the size specified by defaultTimeFieldWidth. This static value is appropriate for dates rendered with the standard time formatter. If set to "title" or "both", the drawn width of the title will be taken into account when sizing the column.

      This is achieved by enabling autoFitWidth:true on date fields when this property is set to anything other than "none", setting the ListGridField.autoFitWidthApproach to the value specified here and having logic in getDefaultFieldWidth() pick up the defaultTimeFieldWidth if appropriate.

      Returns:
      Current autoFitTimeFields value. Default value is "value"
    • setAutoFitWidthApproach

      public ListGrid setAutoFitWidthApproach(AutoFitWidthApproach autoFitWidthApproach)
      When a user requests column autofitting via the header context menu or via a mouse gesture, what autofit approach is used.

      For information about auto-fitting specific fields, see ListGridField.autoFit.

      If this method is called after the component has been drawn/initialized: Setter for the autoFitWidthApproach.

      Parameters:
      autoFitWidthApproach - new AutoFitWidth approach. Default value is "value"
      Returns:
      ListGrid instance, for chaining setter calls
    • getAutoFitWidthApproach

      public AutoFitWidthApproach getAutoFitWidthApproach()
      When a user requests column autofitting via the header context menu or via a mouse gesture, what autofit approach is used.

      For information about auto-fitting specific fields, see ListGridField.autoFit.

      Returns:
      Current autoFitWidthApproach value. Default value is "value"
    • setAutoPersistViewState

      public ListGrid setAutoPersistViewState(ListGridViewStatePart... autoPersistViewState)
      Setting this property to a non-null value will enable automatic saving of view state to offline storage. This saved view state will then be restored automatically when the user visits the page again.

      Note: Smart GWT Pro users, may also be interested in the canSaveSearches feature. This uses the Saved Search subsystem to allow users to explicitly store and apply multiple named views or "saved searches". Each saved search includes the full view state for the grid by default.

      autoPersistViewState may be set to a list of view state parts that should be automatically persisted into offline storage when changed.

      This feature saves the derived state whenever the grid's view state changes due to user interaction (see ListGrid.viewStateChanged()), and restores the saved state from offline storage when the grid is drawn.

      The state is saved to offline storage using the grid's locator as the key. See Locator details below.

      Note that autoPersistViewState should only be set on specific listGrid instances, and never as a default value for the class by changing the ListGrid defaults. Enabling this feature as a default would be an invalid usage as it would apply to listgrids (and subclasses of ListGrid) created and re-used internally by framework features as well as those explicitly created by application code.

      The current saved value can be retrieved or cleared by calling getSavedViewState() or clearSavedViewState() respectively.

      Locator details

      The grid must have a stable locator so that previous state can be retrieved during initial draw and saved back into the same place. If the grid has an explicit ID the locator will always be stable. Setting an explicit ID on a known parent of the grid can also lead to a stable ID as described in the Best Practices section of Using Selenium Scripts.

      For purposes of this feature the top-level parent of the grid must have an explicit ID.

      Additional details on locators and their use can be found in AutoTest and LocatorStrategy.

      Parameters:
      autoPersistViewState - New autoPersistViewState value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAutoPersistViewState

      public ListGridViewStatePart[] getAutoPersistViewState()
      Setting this property to a non-null value will enable automatic saving of view state to offline storage. This saved view state will then be restored automatically when the user visits the page again.

      Note: Smart GWT Pro users, may also be interested in the canSaveSearches feature. This uses the Saved Search subsystem to allow users to explicitly store and apply multiple named views or "saved searches". Each saved search includes the full view state for the grid by default.

      autoPersistViewState may be set to a list of view state parts that should be automatically persisted into offline storage when changed.

      This feature saves the derived state whenever the grid's view state changes due to user interaction (see ListGrid.viewStateChanged()), and restores the saved state from offline storage when the grid is drawn.

      The state is saved to offline storage using the grid's locator as the key. See Locator details below.

      Note that autoPersistViewState should only be set on specific listGrid instances, and never as a default value for the class by changing the ListGrid defaults. Enabling this feature as a default would be an invalid usage as it would apply to listgrids (and subclasses of ListGrid) created and re-used internally by framework features as well as those explicitly created by application code.

      The current saved value can be retrieved or cleared by calling getSavedViewState() or clearSavedViewState() respectively.

      Locator details

      The grid must have a stable locator so that previous state can be retrieved during initial draw and saved back into the same place. If the grid has an explicit ID the locator will always be stable. Setting an explicit ID on a known parent of the grid can also lead to a stable ID as described in the Best Practices section of Using Selenium Scripts.

      For purposes of this feature the top-level parent of the grid must have an explicit ID.

      Additional details on locators and their use can be found in AutoTest and LocatorStrategy.

      Returns:
      Current autoPersistViewState value. Default value is null
      See Also:
    • setAutoSaveEdits

      public ListGrid setAutoSaveEdits(Boolean autoSaveEdits)
      If this ListGrid is editable, should edits be saved out when the user finishes editing a row (or a cell if saveByCell is true).

      The default of true indicates that edits will be automatically saved as the user navigates through the grid and/or hits 'Enter' to end editing. See the Grid Editing overview for details.

      Setting autoSaveEdits false creates a "mass update" / "mass delete" interaction where edits will be retained for all edited cells (across rows if appropriate) until saveEdits() is called to save a particular row, or saveAllEdits() is called to save all changes in a batch.

      Note: when listGrid grouping is enabled, or when working with hierarchical data in a TreeGrid, users have the option to hide records from view by collapsing the parent folder or group. This, in conjunction with autoSaveEdits being set to false can lead to a case where a user is unable to save edits due to validation errors on hidden rows. Therefore we recommend developers consider having validators in place such that errors are caught and displayed to the user on change or editor exit rather than being caught only when saving is attempted. If it's not possible for all validation to be performed immediately on row exit, we recommend that a different UI design be used that does not involve autoSaveEdits being set to false.

      Parameters:
      autoSaveEdits - New autoSaveEdits value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getAutoSaveEdits

      public Boolean getAutoSaveEdits()
      If this ListGrid is editable, should edits be saved out when the user finishes editing a row (or a cell if saveByCell is true).

      The default of true indicates that edits will be automatically saved as the user navigates through the grid and/or hits 'Enter' to end editing. See the Grid Editing overview for details.

      Setting autoSaveEdits false creates a "mass update" / "mass delete" interaction where edits will be retained for all edited cells (across rows if appropriate) until saveEdits() is called to save a particular row, or saveAllEdits() is called to save all changes in a batch.

      Note: when listGrid grouping is enabled, or when working with hierarchical data in a TreeGrid, users have the option to hide records from view by collapsing the parent folder or group. This, in conjunction with autoSaveEdits being set to false can lead to a case where a user is unable to save edits due to validation errors on hidden rows. Therefore we recommend developers consider having validators in place such that errors are caught and displayed to the user on change or editor exit rather than being caught only when saving is attempted. If it's not possible for all validation to be performed immediately on row exit, we recommend that a different UI design be used that does not involve autoSaveEdits being set to false.

      Returns:
      Current autoSaveEdits value. Default value is true
      See Also:
    • setAutoSizeHeaderSpans

      public ListGrid setAutoSizeHeaderSpans(Boolean autoSizeHeaderSpans) throws IllegalStateException
      If this listGrid has specified headerSpans, setting this attribute to true will cause spans to expand to accommodate long titles if necessary.
      Parameters:
      autoSizeHeaderSpans - New autoSizeHeaderSpans value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAutoSizeHeaderSpans

      public Boolean getAutoSizeHeaderSpans()
      If this listGrid has specified headerSpans, setting this attribute to true will cause spans to expand to accommodate long titles if necessary.
      Returns:
      Current autoSizeHeaderSpans value. Default value is false
    • getBackgroundComponent

      public Canvas getBackgroundComponent()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Has no effect unless showBackgroundComponents is true.

      Canvas created and embedded in the body behind a given record. When ListGridRecord.backgroundComponent is set, this autoChild canvas will be constructed (if listGridRecord.backgroundComponent is not already a Canvas) and its properties combined with those of listGridRecord.backgroundComponent and then displayed behind a specific record in the page's z-order, meaning it will only be visible if the cell styling is transparent.

      Returns:
      null
    • setBadFormulaResultValue

      public ListGrid setBadFormulaResultValue(String badFormulaResultValue)
      If the result of a formula evaluation is invalid (specifically, if isNaN(result)==true), badFormulaResultValue is displayed instead. The default value is ".".
      Parameters:
      badFormulaResultValue - New badFormulaResultValue value. Default value is "."
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBadFormulaResultValue

      public String getBadFormulaResultValue()
      If the result of a formula evaluation is invalid (specifically, if isNaN(result)==true), badFormulaResultValue is displayed instead. The default value is ".".
      Returns:
      Current badFormulaResultValue value. Default value is "."
      See Also:
    • setBaseStyle

      public ListGrid setBaseStyle(String baseStyle) throws IllegalStateException
      base cell style for this listGrid. If this property is unset, base style may be derived from normalBaseStyle or tallBaseStyle as described in getBaseStyle().

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Parameters:
      baseStyle - New baseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBaseStyle

      public String getBaseStyle()
      base cell style for this listGrid. If this property is unset, base style may be derived from normalBaseStyle or tallBaseStyle as described in getBaseStyle().

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Returns:
      Return the base styleName for this cell. Has the following implementation by default: If no custom style is found for the cell as described above, the default baseStyle will be returned. If baseStyle is specified this will be used. Otherwise for grids showing fixed height rows which match normalCellHeight normalBaseStyle will be used. For grids with variable, or modified cell heights, tallBaseStyle will be used.

      Note also that enabling fastCellUpdates will cause the tallBaseStyle to be used rather than normalBaseStyle.

      As noted under enforceVClipping, cell content which renders taller than the available space within a cell may cause rows to expand even if fixedRecordHeights is true. This can lead to misaligned rows when frozen columns are used. Developers should be aware that changing cell styling such that there is increased borders or padding will reduce the available space for content within the specified cell height, making this scenario more common. To fix this, specify a larger cellHeight, or set enforceVClipping to true.

      Note: This is an override point.. Default value is null

      See Also:
    • setBlockingRowCountFetch

      public ListGrid setBlockingRowCountFetch(Boolean blockingRowCountFetch)
      If specified, this attribute will be applied to this grid's data object for dataBound grids.
      Parameters:
      blockingRowCountFetch - New blockingRowCountFetch value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBlockingRowCountFetch

      public Boolean getBlockingRowCountFetch()
      If specified, this attribute will be applied to this grid's data object for dataBound grids.
      Returns:
      Current blockingRowCountFetch value. Default value is null
      See Also:
    • setBodyBackgroundColor

      public ListGrid setBodyBackgroundColor(String bodyBackgroundColor)
      Background color applied to the ListGrid body (that is, the area of the grid where data values are rendered).
      Note that this will typically not be visible to the user unless there are few enough rows that there is visible space in the body below the last row. To style data cells, override baseStyle instead.
      Parameters:
      bodyBackgroundColor - New bodyBackgroundColor value. Default value is "white"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBodyBackgroundColor

      public String getBodyBackgroundColor()
      Background color applied to the ListGrid body (that is, the area of the grid where data values are rendered).
      Note that this will typically not be visible to the user unless there are few enough rows that there is visible space in the body below the last row. To style data cells, override baseStyle instead.
      Returns:
      Current bodyBackgroundColor value. Default value is "white"
      See Also:
    • setBodyOverflow

      public ListGrid setBodyOverflow(Overflow bodyOverflow)
      Overflow setting for the "body", that is, the area of the grid where data values are rendered.

      This is a very advanced setting which is typically only changed by subclasses of ListGrid which never show a header. To achieve auto-fitting, instead use properties such as autoFitData, autoFitFieldWidths and fixedRecordHeights.

      If this method is called after the component has been drawn/initialized: Update the bodyOverflow for this listGrid.

      Note : This is an advanced setting

      Parameters:
      bodyOverflow - new overflow setting for the body. Default value is Canvas.AUTO
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBodyOverflow

      public Overflow getBodyOverflow()
      Overflow setting for the "body", that is, the area of the grid where data values are rendered.

      This is a very advanced setting which is typically only changed by subclasses of ListGrid which never show a header. To achieve auto-fitting, instead use properties such as autoFitData, autoFitFieldWidths and fixedRecordHeights.

      Returns:
      Current bodyOverflow value. Default value is Canvas.AUTO
      See Also:
    • setBodyStyleName

      public ListGrid setBodyStyleName(String bodyStyleName)
      CSS style used for the body of this grid. If applying a background-color to the body via a CSS style applied using this property, be sure to set bodyBackgroundColor to null.

      If this method is called after the component has been drawn/initialized: Update the bodyStyleName for this listGrid.
      Parameters:
      bodyStyleName - new body style name. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBodyStyleName

      public String getBodyStyleName()
      CSS style used for the body of this grid. If applying a background-color to the body via a CSS style applied using this property, be sure to set bodyBackgroundColor to null.
      Returns:
      Current bodyStyleName value. Default value is null
      See Also:
    • setBooleanBaseStyle

      public ListGrid setBooleanBaseStyle(String booleanBaseStyle) throws IllegalStateException
      An optional CSS style to apply to the checkbox image. If supplied, and the checkbox is enabled, the base style is suffixed with "True", "False", or "Partial" if the checkbox is selected, unselected, or partially selected; if the checkbox is disabled, the suffix is "TrueDisabled", "FalseDisabled", or "PartialDisabled".

      NOTE: This attribute is not supported by TreeGrid.

      Note : This is an advanced setting

      Parameters:
      booleanBaseStyle - New booleanBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBooleanBaseStyle

      public String getBooleanBaseStyle()
      An optional CSS style to apply to the checkbox image. If supplied, and the checkbox is enabled, the base style is suffixed with "True", "False", or "Partial" if the checkbox is selected, unselected, or partially selected; if the checkbox is disabled, the suffix is "TrueDisabled", "FalseDisabled", or "PartialDisabled".

      NOTE: This attribute is not supported by TreeGrid.

      Returns:
      Current booleanBaseStyle value. Default value is null
      See Also:
    • setBooleanFalseImage

      public ListGrid setBooleanFalseImage(String booleanFalseImage)
      Image to display for a false value in a boolean field. Default null value or the special value "blank" means no image will be displayed.

      To turn this off explicitly set ListGridField.suppressValueIcon to true

      If this, booleanTrueImage and booleanPartialImage are unset, this will be set to the default CheckboxItem.uncheckedImage.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide a "boolean false" appearance.

      Note : This is an advanced setting

      Parameters:
      booleanFalseImage - New booleanFalseImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBooleanFalseImage

      public String getBooleanFalseImage()
      Image to display for a false value in a boolean field. Default null value or the special value "blank" means no image will be displayed.

      To turn this off explicitly set ListGridField.suppressValueIcon to true

      If this, booleanTrueImage and booleanPartialImage are unset, this will be set to the default CheckboxItem.uncheckedImage.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide a "boolean false" appearance.

      Returns:
      Current booleanFalseImage value. Default value is null
      See Also:
    • setBooleanImageHeight

      public ListGrid setBooleanImageHeight(int booleanImageHeight)
      Height for the booleanTrueImage, booleanFalseImage and booleanPartialImage. Note: If booleanTrueImage is unset, the CheckboxItem.checkedImage will be used to indicate a true value in a boolean field. In this case this property is ignored in favor of CheckboxItem.valueIconHeight.

      Note : This is an advanced setting

      Parameters:
      booleanImageHeight - New booleanImageHeight value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBooleanImageHeight

      public int getBooleanImageHeight()
      Height for the booleanTrueImage, booleanFalseImage and booleanPartialImage. Note: If booleanTrueImage is unset, the CheckboxItem.checkedImage will be used to indicate a true value in a boolean field. In this case this property is ignored in favor of CheckboxItem.valueIconHeight.
      Returns:
      Current booleanImageHeight value. Default value is 16
      See Also:
    • setBooleanImageWidth

      public ListGrid setBooleanImageWidth(int booleanImageWidth)
      Width for the booleanTrueImage, booleanFalseImage and booleanPartialImage. Note: If booleanTrueImage is unset, the CheckboxItem.checkedImage will be used to indicate a true value in a boolean field. In this case this property is ignored in favor of CheckboxItem.valueIconWidth.

      Note : This is an advanced setting

      Parameters:
      booleanImageWidth - New booleanImageWidth value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBooleanImageWidth

      public int getBooleanImageWidth()
      Width for the booleanTrueImage, booleanFalseImage and booleanPartialImage. Note: If booleanTrueImage is unset, the CheckboxItem.checkedImage will be used to indicate a true value in a boolean field. In this case this property is ignored in favor of CheckboxItem.valueIconWidth.
      Returns:
      Current booleanImageWidth value. Default value is 16
      See Also:
    • setBooleanPartialImage

      public ListGrid setBooleanPartialImage(String booleanPartialImage)
      Image to display for a partially true value in a boolean field (typically selection). The special value "blank" means that no image will be shown.

      To turn this off explicitly set ListGridField.suppressValueIcon to true.

      If this, booleanTrueImage and booleanFalseImage are unset, this will be set to the default CheckboxItem.partialSelectedImage.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide a "boolean true" appearance.

      Note : This is an advanced setting

      Parameters:
      booleanPartialImage - New booleanPartialImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBooleanPartialImage

      public String getBooleanPartialImage()
      Image to display for a partially true value in a boolean field (typically selection). The special value "blank" means that no image will be shown.

      To turn this off explicitly set ListGridField.suppressValueIcon to true.

      If this, booleanTrueImage and booleanFalseImage are unset, this will be set to the default CheckboxItem.partialSelectedImage.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide a "boolean true" appearance.

      Returns:
      Current booleanPartialImage value. Default value is null
      See Also:
    • setBooleanTrueImage

      public ListGrid setBooleanTrueImage(String booleanTrueImage)
      Image to display for a true value in a boolean field. The special value "blank" means that no image will be shown.

      To turn this off explicitly set ListGridField.suppressValueIcon to true.

      If this, booleanFalseImage and booleanPartialImage are unset, this will be set to the default CheckboxItem.checkedImage.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide a "boolean true" appearance.

      Note : This is an advanced setting

      Parameters:
      booleanTrueImage - New booleanTrueImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getBooleanTrueImage

      public String getBooleanTrueImage()
      Image to display for a true value in a boolean field. The special value "blank" means that no image will be shown.

      To turn this off explicitly set ListGridField.suppressValueIcon to true.

      If this, booleanFalseImage and booleanPartialImage are unset, this will be set to the default CheckboxItem.checkedImage.

      Spriting can be used for this image, by setting this property to a SCSpriteConfig formatted string. Alternatively developers can omit this property and instead use CSS directly in the booleanBaseStyle property to provide a "boolean true" appearance.

      Returns:
      Current booleanTrueImage value. Default value is null
      See Also:
    • setBriefRowRangeDisplayValue

      public ListGrid setBriefRowRangeDisplayValue(String briefRowRangeDisplayValue)
      Dynamic String specifying the format for the row range summary value when RowRangeDisplayStyle is set to "brief".

      The following variables are available for evaluation within this string:

      Parameters:
      briefRowRangeDisplayValue - New briefRowRangeDisplayValue value. Default value is "${rowRange} of ${rowCount}"
      Returns:
      ListGrid instance, for chaining setter calls
    • getBriefRowRangeDisplayValue

      public String getBriefRowRangeDisplayValue()
      Dynamic String specifying the format for the row range summary value when RowRangeDisplayStyle is set to "brief".

      The following variables are available for evaluation within this string:

      Returns:
      Current briefRowRangeDisplayValue value. Default value is "${rowRange} of ${rowCount}"
    • setCanAcceptDroppedRecords

      public ListGrid setCanAcceptDroppedRecords(Boolean canAcceptDroppedRecords)
      Indicates whether records can be dropped into this listGrid.
      Parameters:
      canAcceptDroppedRecords - New canAcceptDroppedRecords value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanAcceptDroppedRecords

      public Boolean getCanAcceptDroppedRecords()
      Indicates whether records can be dropped into this listGrid.
      Returns:
      Current canAcceptDroppedRecords value. Default value is false
      See Also:
    • setCanAddAISortFields

      public ListGrid setCanAddAISortFields(Boolean canAddAISortFields)
      Adds an item to the header context menu allowing users to launch a dialog to define a new field to be sorted by an AI score of the entire record and possibility related records.

      AI sort fields can be persisted via getFieldState() and setFieldState().

      Parameters:
      canAddAISortFields - New canAddAISortFields value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getCanAddAISortFields

      public Boolean getCanAddAISortFields()
      Adds an item to the header context menu allowing users to launch a dialog to define a new field to be sorted by an AI score of the entire record and possibility related records.

      AI sort fields can be persisted via getFieldState() and setFieldState().

      Returns:
      Current canAddAISortFields value. Default value is false
    • setCanAutoFitFields

      public ListGrid setCanAutoFitFields(Boolean canAutoFitFields)
      Can the user perform one-time autofit for specific columns in this grid?

      If set to true, the default header menu will include options to auto fit all fields such that they fit their content or titles as specified via ListGridField.autoFitWidthApproach.
      Autofitting of individual fields via a header context menu item, or the headerAutoFitEvent will also be enabled when this property is set unless ListGridField.canAutoFitWidth is explicitly set to false

      Note that the ability to perform one-time autofitting of fields via this subsystem is separate from the programmatic autofit behavior enabled via autoFitFieldWidths.

      This subsystem is requires canResizeFields be enabled and will be disabled if that property is set to false

      Parameters:
      canAutoFitFields - New canAutoFitFields value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getCanAutoFitFields

      public Boolean getCanAutoFitFields()
      Can the user perform one-time autofit for specific columns in this grid?

      If set to true, the default header menu will include options to auto fit all fields such that they fit their content or titles as specified via ListGridField.autoFitWidthApproach.
      Autofitting of individual fields via a header context menu item, or the headerAutoFitEvent will also be enabled when this property is set unless ListGridField.canAutoFitWidth is explicitly set to false

      Note that the ability to perform one-time autofitting of fields via this subsystem is separate from the programmatic autofit behavior enabled via autoFitFieldWidths.

      This subsystem is requires canResizeFields be enabled and will be disabled if that property is set to false

      Returns:
      Current canAutoFitFields value. Default value is true
    • setCancelEditingConfirmationMessage

      public ListGrid setCancelEditingConfirmationMessage(String cancelEditingConfirmationMessage)
      If this is an editable listGrid, and this.confirmCancelEditing is true this property is used as the message to display in the confirmation dismissal prompt.
      Parameters:
      cancelEditingConfirmationMessage - New cancelEditingConfirmationMessage value. Default value is Cancelling this edit will discard unsaved changes for this record. Continue?
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCancelEditingConfirmationMessage

      public String getCancelEditingConfirmationMessage()
      If this is an editable listGrid, and this.confirmCancelEditing is true this property is used as the message to display in the confirmation dismissal prompt.
      Returns:
      Current cancelEditingConfirmationMessage value. Default value is Cancelling this edit will discard unsaved changes for this record. Continue?
      See Also:
    • setCanCollapseGroup

      public ListGrid setCanCollapseGroup(Boolean canCollapseGroup) throws IllegalStateException
      Can a group be collapsed/expanded? When true a collapse/expand icon is shown (groupIcon) and the user can collapse or expand the group by clicking either the row as a whole or the opener icon (see collapseGroupOnRowClick); When false the group icon is not shown and clicking on the row does not change group state. Additionally groupStartOpen is initialized to "all".
      Parameters:
      canCollapseGroup - New canCollapseGroup value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanCollapseGroup

      public Boolean getCanCollapseGroup()
      Can a group be collapsed/expanded? When true a collapse/expand icon is shown (groupIcon) and the user can collapse or expand the group by clicking either the row as a whole or the opener icon (see collapseGroupOnRowClick); When false the group icon is not shown and clicking on the row does not change group state. Additionally groupStartOpen is initialized to "all".
      Returns:
      Current canCollapseGroup value. Default value is true
      See Also:
    • setCanDragRecordsOut

      public ListGrid setCanDragRecordsOut(Boolean canDragRecordsOut)
      Indicates whether records can be dragged from this listGrid and dropped elsewhere.

      NOTE: If canDragRecordsOut is initially enabled or might be dynamically enabled after the grid is created, it may be desirable to disable touch scrolling so that touch-dragging a record starts a drag operation rather than a scroll, but see the discussion of drag handles. If Canvas.disableTouchScrollingForDrag is set to true, then touch scrolling will be disabled automatically. However, for accessibility reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag and drop of records out of the grid.

      Parameters:
      canDragRecordsOut - New canDragRecordsOut value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanDragRecordsOut

      public Boolean getCanDragRecordsOut()
      Indicates whether records can be dragged from this listGrid and dropped elsewhere.

      NOTE: If canDragRecordsOut is initially enabled or might be dynamically enabled after the grid is created, it may be desirable to disable touch scrolling so that touch-dragging a record starts a drag operation rather than a scroll, but see the discussion of drag handles. If Canvas.disableTouchScrollingForDrag is set to true, then touch scrolling will be disabled automatically. However, for accessibility reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag and drop of records out of the grid.

      Returns:
      Current canDragRecordsOut value. Default value is false
      See Also:
    • setCanDragSelect

      public ListGrid setCanDragSelect(Boolean canDragSelect)
      If this property is true, users can drag the mouse to select several rows or cells. This is mutually exclusive with rearranging rows or cells by dragging.

      NOTE: If canDragSelect is initially enabled or might be dynamically enabled after the grid is created, it may be desirable to disable touch scrolling so that touch-dragging records/cells selects them rather than starting a scroll. If Canvas.disableTouchScrollingForDrag is set to true, then touch scrolling will be disabled automatically. However, for accessibility reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag-selection.

      Parameters:
      canDragSelect - New canDragSelect value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanDragSelect

      public Boolean getCanDragSelect()
      If this property is true, users can drag the mouse to select several rows or cells. This is mutually exclusive with rearranging rows or cells by dragging.

      NOTE: If canDragSelect is initially enabled or might be dynamically enabled after the grid is created, it may be desirable to disable touch scrolling so that touch-dragging records/cells selects them rather than starting a scroll. If Canvas.disableTouchScrollingForDrag is set to true, then touch scrolling will be disabled automatically. However, for accessibility reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag-selection.

      Returns:
      Current canDragSelect value. Default value is false
      See Also:
    • setCanDragSelectText

      public ListGrid setCanDragSelectText(Boolean canDragSelectText)
      If this property is true, users can drag the mouse to select text within grid rows, ready to be cliped to clipboard.
      This is mutually exclusive with rearranging rows or cells by dragging, and with drag selection of rows.

      To enable selecting cell text on click, see selectCellTextOnClick.

      Parameters:
      canDragSelectText - New canDragSelectText value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanDragSelectText

      public Boolean getCanDragSelectText()
      If this property is true, users can drag the mouse to select text within grid rows, ready to be cliped to clipboard.
      This is mutually exclusive with rearranging rows or cells by dragging, and with drag selection of rows.

      To enable selecting cell text on click, see selectCellTextOnClick.

      Returns:
      Current canDragSelectText value. Default value is false
      See Also:
    • setCanDropInEmptyArea

      public ListGrid setCanDropInEmptyArea(Boolean canDropInEmptyArea)
      If set to false, dropping over an empty part of the grid body is disallowed and the no-drop indicator is displayed.
      Parameters:
      canDropInEmptyArea - New canDropInEmptyArea value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanDropInEmptyArea

      public Boolean getCanDropInEmptyArea()
      If set to false, dropping over an empty part of the grid body is disallowed and the no-drop indicator is displayed.
      Returns:
      Current canDropInEmptyArea value. Default value is true
      See Also:
    • setCanEdit

      public ListGrid setCanEdit(Boolean canEdit)
      Can the user edit cells in this listGrid? Can be set for the listGrid, and overridden for individual fields.
      If 'canEdit' is false at the listGrid level, fields can never be edited - in this case the canEdit property on individual fields will be ignored.
      If 'canEdit' is set to true at the listGrid level, setting the 'canEdit' property to false at the field level will prevent the field from being edited inline unless a custom override of canEditCell() allows it.
      If 'canEdit' is not set at the listGrid level, setting 'canEdit' to true at the field level enables the field to be edited inline.

      For more information on editing, see the editing overview.

      Parameters:
      canEdit - New canEdit value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanEdit

      public Boolean getCanEdit()
      Can the user edit cells in this listGrid? Can be set for the listGrid, and overridden for individual fields.
      If 'canEdit' is false at the listGrid level, fields can never be edited - in this case the canEdit property on individual fields will be ignored.
      If 'canEdit' is set to true at the listGrid level, setting the 'canEdit' property to false at the field level will prevent the field from being edited inline unless a custom override of canEditCell() allows it.
      If 'canEdit' is not set at the listGrid level, setting 'canEdit' to true at the field level enables the field to be edited inline.

      For more information on editing, see the editing overview.

      Returns:
      Current canEdit value. Default value is null
      See Also:
    • setCanEditFieldAttribute

      public ListGrid setCanEditFieldAttribute(String canEditFieldAttribute) throws IllegalStateException
      If this component is bound to a dataSource, this attribute may be specified to customize what fields from the dataSource may be edited by default. For example the SearchForm class has this attribute set to "canFilter" which allows search forms to edit dataSource fields marked as canEdit:false (but not those marked as canFilter:false).

      Note that if canEdit is explicitly specified on a field in the DataBoundComponent.fields array, that property will be respected in preference to the canEditAttribute value. (See FormItem.canEdit, ListGridField.canEdit). Also note that individual dataBoundComponents may have additional logic around whether a field can be edited - for example canEditCell() may be overridden.

      Note : This is an advanced setting

      Parameters:
      canEditFieldAttribute - New canEditFieldAttribute value. Default value is "canEdit"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanEditFieldAttribute

      public String getCanEditFieldAttribute()
      If this component is bound to a dataSource, this attribute may be specified to customize what fields from the dataSource may be edited by default. For example the SearchForm class has this attribute set to "canFilter" which allows search forms to edit dataSource fields marked as canEdit:false (but not those marked as canFilter:false).

      Note that if canEdit is explicitly specified on a field in the DataBoundComponent.fields array, that property will be respected in preference to the canEditAttribute value. (See FormItem.canEdit, ListGridField.canEdit). Also note that individual dataBoundComponents may have additional logic around whether a field can be edited - for example canEditCell() may be overridden.

      Returns:
      Current canEditFieldAttribute value. Default value is "canEdit"
    • setCanEditHilites

      public ListGrid setCanEditHilites(boolean canEditHilites)
      Adds an item to the header context menu allowing users to launch a dialog to define grid hilites using the HiliteEditor.

      User-added hilites can be persisted via DataBoundComponent.getHiliteState() and DataBoundComponent.setHiliteState().

      To avoid undefined behavior, this property must be set to false if the same record objects, or the same ResultSet instances, are shared among multiple DataBoundComponents.

      Parameters:
      canEditHilites - New canEditHilites value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanEditHilites

      public boolean getCanEditHilites()
      Adds an item to the header context menu allowing users to launch a dialog to define grid hilites using the HiliteEditor.

      User-added hilites can be persisted via DataBoundComponent.getHiliteState() and DataBoundComponent.setHiliteState().

      To avoid undefined behavior, this property must be set to false if the same record objects, or the same ResultSet instances, are shared among multiple DataBoundComponents.

      Returns:
      Current canEditHilites value. Default value is false
      See Also:
    • setCanEditTitles

      public ListGrid setCanEditTitles(boolean canEditTitles)
      If set to true, the advanced field picker provides an interface allowing users to modify fields' titles.

      Note that when enabled, the field state for this component will include field titles by default (see DataBoundComponent.shouldIncludeTitleInFieldState()).

      Parameters:
      canEditTitles - New canEditTitles value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getCanEditTitles

      public boolean getCanEditTitles()
      If set to true, the advanced field picker provides an interface allowing users to modify fields' titles.

      Note that when enabled, the field state for this component will include field titles by default (see DataBoundComponent.shouldIncludeTitleInFieldState()).

      Returns:
      Current canEditTitles value. Default value is false
    • setCanExpandMultipleRecords

      public ListGrid setCanExpandMultipleRecords(Boolean canExpandMultipleRecords)
      When canExpandRecords is true, this property indicates whether multiple records can be expanded simultaneously. If set to false, expanding a record will automatically collapse any record which is already expanded. The default value is true.
      Parameters:
      canExpandMultipleRecords - New canExpandMultipleRecords value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getCanExpandMultipleRecords

      public Boolean getCanExpandMultipleRecords()
      When canExpandRecords is true, this property indicates whether multiple records can be expanded simultaneously. If set to false, expanding a record will automatically collapse any record which is already expanded. The default value is true.
      Returns:
      Current canExpandMultipleRecords value. Default value is true
    • setCanExpandRecordProperty

      public ListGrid setCanExpandRecordProperty(String canExpandRecordProperty) throws IllegalStateException
      Property name on a record that will be checked to determine whether a record can be expanded.
      Parameters:
      canExpandRecordProperty - New canExpandRecordProperty value. Default value is "canExpand"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanExpandRecordProperty

      public String getCanExpandRecordProperty()
      Property name on a record that will be checked to determine whether a record can be expanded.
      Returns:
      Current canExpandRecordProperty value. Default value is "canExpand"
      See Also:
    • setCanExpandRecords

      public ListGrid setCanExpandRecords(Boolean canExpandRecords)
      When set to true, shows an additional field at the beginning of the field-list (respecting RTL) to allow users to expand and collapse individual records. See expandRecord() and expansionMode for details on record expansion.

      virtualScrolling is automatically enabled when canExpandRecords is set to true.

      Note that expanded records are not currently supported in conjunction with frozen fields.

      If this method is called after the component has been drawn/initialized: Setter for canExpandRecords

      Parameters:
      canExpandRecords - new value for listGrid.canExpandRecords. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getCanExpandRecords

      public Boolean getCanExpandRecords()
      When set to true, shows an additional field at the beginning of the field-list (respecting RTL) to allow users to expand and collapse individual records. See expandRecord() and expansionMode for details on record expansion.

      virtualScrolling is automatically enabled when canExpandRecords is set to true.

      Note that expanded records are not currently supported in conjunction with frozen fields.

      Returns:
      Current canExpandRecords value. Default value is false
    • setCanFocusInEmptyGrid

      public ListGrid setCanFocusInEmptyGrid(boolean canFocusInEmptyGrid) throws IllegalStateException
      If the listGrid is empty, should the user be able to put focus into the grid body by tabbing to it?

      Note that if editOnFocus is true for this grid and listEndEditAction is set to next, having this property set to true will allow users to automatically create a new edit row by simply tabbing into the grid.

      Note : This is an advanced setting

      Parameters:
      canFocusInEmptyGrid - New canFocusInEmptyGrid value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanFocusInEmptyGrid

      public boolean getCanFocusInEmptyGrid()
      If the listGrid is empty, should the user be able to put focus into the grid body by tabbing to it?

      Note that if editOnFocus is true for this grid and listEndEditAction is set to next, having this property set to true will allow users to automatically create a new edit row by simply tabbing into the grid.

      Returns:
      Current canFocusInEmptyGrid value. Default value is true
    • setCanFreezeFields

      public ListGrid setCanFreezeFields(Boolean canFreezeFields)
      Whether an interface should be shown to allow user is allowed to dynamically "freeze" or "unfreeze" columns with respect to horizontally scrolling. If unset, this property defaults to true unless:

      Note that the canFreezeFields setting enables or disables the user interface for freezing and unfreezing fields only. Fields can be programmatically frozen via setting field.frozen to true when the grid is created, or dynamically frozen and unfrozen via freezeField() and unfreezeField().

      Developers should also be aware that if the cell content for some field exceeds the specified cellHeight, and enforceVClipping is not set to true, this can cause misalignment between rows in frozen and unfrozen columns. See the Frozen fields overview for more on this.

      If this method is called after the component has been drawn/initialized: Setter method for canFreezeFields

      Parameters:
      canFreezeFields - New value for listGrid.canFreezeFields. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanFreezeFields

      public Boolean getCanFreezeFields()
      Whether an interface should be shown to allow user is allowed to dynamically "freeze" or "unfreeze" columns with respect to horizontally scrolling. If unset, this property defaults to true unless:

      Note that the canFreezeFields setting enables or disables the user interface for freezing and unfreezing fields only. Fields can be programmatically frozen via setting field.frozen to true when the grid is created, or dynamically frozen and unfrozen via freezeField() and unfreezeField().

      Developers should also be aware that if the cell content for some field exceeds the specified cellHeight, and enforceVClipping is not set to true, this can cause misalignment between rows in frozen and unfrozen columns. See the Frozen fields overview for more on this.

      Returns:
      Current canFreezeFields value. Default value is null
      See Also:
    • setCanGroupBy

      public ListGrid setCanGroupBy(Boolean canGroupBy)
      If false, grouping via context menu will be disabled.
      Parameters:
      canGroupBy - New canGroupBy value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanGroupBy

      public Boolean getCanGroupBy()
      If false, grouping via context menu will be disabled.
      Returns:
      Current canGroupBy value. Default value is true
      See Also:
    • setCanHiliteViaAI

      public ListGrid setCanHiliteViaAI(Boolean canHiliteViaAI)
      When set to true and AI component views are enabled, shows an item in this component's header context menu that allows the user to ask the AI to hilite the records according to a natural language description of which records to hilite.

      See IntegratingAI for the requirements to enable AI component views.

      Parameters:
      canHiliteViaAI - New canHiliteViaAI value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanHiliteViaAI

      public Boolean getCanHiliteViaAI()
      When set to true and AI component views are enabled, shows an item in this component's header context menu that allows the user to ask the AI to hilite the records according to a natural language description of which records to hilite.

      See IntegratingAI for the requirements to enable AI component views.

      Returns:
      Current canHiliteViaAI value. Default value is false
      See Also:
    • setCanHover

      public ListGrid setCanHover(Boolean canHover)
      If true, cellHover and rowHover events will fire and then a hover will be shown (if not canceled) when the user leaves the mouse over a row / cell unless the corresponding field has showHover set to false. If unset or null, the hover will be shown if the corresponding field has showHover:true. If false, then hovers are disabled.

      Note that standard hovers override clipped value hovers. Thus, to enable clipped value hovers, canHover must be unset or null and the corresponding field must have showHover unset or null as well.

      Overrides:
      setCanHover in class Canvas
      Parameters:
      canHover - New canHover value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanHover

      public Boolean getCanHover()
      If true, cellHover and rowHover events will fire and then a hover will be shown (if not canceled) when the user leaves the mouse over a row / cell unless the corresponding field has showHover set to false. If unset or null, the hover will be shown if the corresponding field has showHover:true. If false, then hovers are disabled.

      Note that standard hovers override clipped value hovers. Thus, to enable clipped value hovers, canHover must be unset or null and the corresponding field must have showHover unset or null as well.

      Overrides:
      getCanHover in class Canvas
      Returns:
      Current canHover value. Default value is null
      See Also:
    • setCanMultiGroup

      public ListGrid setCanMultiGroup(boolean canMultiGroup)
      When true, indicates that this ListGrid supports grouping on multiple fields.
      Parameters:
      canMultiGroup - New canMultiGroup value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getCanMultiGroup

      public boolean getCanMultiGroup()
      When true, indicates that this ListGrid supports grouping on multiple fields.
      Returns:
      Current canMultiGroup value. Default value is false
    • setCanMultiSort

      public ListGrid setCanMultiSort(Boolean canMultiSort)
      When true, indicates that this ListGrid supports sorting on multiple fields. Note that even when set to true, multi-field sorting may not be available if the grid is databound and the DataSource doesn't support multi-sort, or if sorting for a field is client-only but not all data is available.
      Parameters:
      canMultiSort - New canMultiSort value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanMultiSort

      public Boolean getCanMultiSort()
      When true, indicates that this ListGrid supports sorting on multiple fields. Note that even when set to true, multi-field sorting may not be available if the grid is databound and the DataSource doesn't support multi-sort, or if sorting for a field is client-only but not all data is available.
      Returns:
      Current canMultiSort value. Default value is true
      See Also:
    • setCanPickFields

      public ListGrid setCanPickFields(Boolean canPickFields)
      Indicates whether the field picker item and submenu should be present in the header context menu. This menu allows the user to hide visible fields and show hidden fields.

      By default only fields explicitly included in the fields array will be available in this menu, unless canPickOmittedFields is set to true for a databound grid.

      A specific field can be omitted from the column picker via ListGridField.canHide.

      Parameters:
      canPickFields - New canPickFields value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getCanPickFields

      public Boolean getCanPickFields()
      Indicates whether the field picker item and submenu should be present in the header context menu. This menu allows the user to hide visible fields and show hidden fields.

      By default only fields explicitly included in the fields array will be available in this menu, unless canPickOmittedFields is set to true for a databound grid.

      A specific field can be omitted from the column picker via ListGridField.canHide.

      Returns:
      Current canPickFields value. Default value is true
    • setCanPickOmittedFields

      public ListGrid setCanPickOmittedFields(Boolean canPickOmittedFields) throws IllegalStateException
      If true, the field picker menu will include entries for all dataSource fields, including those not included in the specified fields array.

      This property only applies to grids with a specified dataSource, where fields is explicitly set and useAllDataSourceFields is false. The canPickFields property must also be set to true to allow the user to view the field picker menu.

      Note: grids with canPickOmittedFields:true, like those with useAllDataSourceFields:true will render fields in the order in which they are defined in the dataSource rather than the order in which they're defined in the listGrid fields array.

      Parameters:
      canPickOmittedFields - New canPickOmittedFields value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanPickOmittedFields

      public Boolean getCanPickOmittedFields()
      If true, the field picker menu will include entries for all dataSource fields, including those not included in the specified fields array.

      This property only applies to grids with a specified dataSource, where fields is explicitly set and useAllDataSourceFields is false. The canPickFields property must also be set to true to allow the user to view the field picker menu.

      Note: grids with canPickOmittedFields:true, like those with useAllDataSourceFields:true will render fields in the order in which they are defined in the dataSource rather than the order in which they're defined in the listGrid fields array.

      Returns:
      Current canPickOmittedFields value. Default value is false
    • setCanRemoveRecords

      public ListGrid setCanRemoveRecords(Boolean canRemoveRecords)
      If set, provide UI for the user to remove records from the grid as an additional field showing the removeIcon, which, when clicked, will call removeRecordClick() which removes the row from the data set (or if deferRemoval is true changes the markRecordRemoved() status for the record). Individual records can be marked to prevent removal - see recordCanRemoveProperty.

      To add a confirmation dialog before a record is removed, set warnOnRemoval.

      If deferring removal, the record will appear marked with the removedCSSText until the removal is committed via a call to saveEdits(). Otherwise, the record will disappear from view. If animateRemoveRecord is true, the removed record will appear to shrink out of view when it is removed.

      By default the field will display the removeIcon next to each record, and will be rendered as the rightmost column. Two mechanisms exist to further modify this field:

      • To change the position of the remove-field, include an explicitly specified field with the attribute isRemoveField:true set. This will then be used as the remove field instead of adding a field to the beginning of the set of columns.
      • Additional direct configuration of the remove field may be achieved by modifying removeFieldProperties.
      If deferRemoval is true, when a record is marked as removed, the the icon will change to display the unremoveIcon for this row. Clicking on this icon will call unmarkRecordRemoved() to mark the record as no longer pending deletion.

      If this method is called after the component has been drawn/initialized: Updates the canRemoveRecords property for this listGrid at runtime.
      Parameters:
      canRemoveRecords - new canRemoveRecords value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanRemoveRecords

      public Boolean getCanRemoveRecords()
      If set, provide UI for the user to remove records from the grid as an additional field showing the removeIcon, which, when clicked, will call removeRecordClick() which removes the row from the data set (or if deferRemoval is true changes the markRecordRemoved() status for the record). Individual records can be marked to prevent removal - see recordCanRemoveProperty.

      To add a confirmation dialog before a record is removed, set warnOnRemoval.

      If deferring removal, the record will appear marked with the removedCSSText until the removal is committed via a call to saveEdits(). Otherwise, the record will disappear from view. If animateRemoveRecord is true, the removed record will appear to shrink out of view when it is removed.

      By default the field will display the removeIcon next to each record, and will be rendered as the rightmost column. Two mechanisms exist to further modify this field:

      • To change the position of the remove-field, include an explicitly specified field with the attribute isRemoveField:true set. This will then be used as the remove field instead of adding a field to the beginning of the set of columns.
      • Additional direct configuration of the remove field may be achieved by modifying removeFieldProperties.
      If deferRemoval is true, when a record is marked as removed, the the icon will change to display the unremoveIcon for this row. Clicking on this icon will call unmarkRecordRemoved() to mark the record as no longer pending deletion.
      Returns:
      Current canRemoveRecords value. Default value is false
      See Also:
    • setCanReorderFields

      public ListGrid setCanReorderFields(Boolean canReorderFields)
      Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields. If true, can be overridden at the field level via ListGridField.canReorder.
      Parameters:
      canReorderFields - New canReorderFields value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanReorderFields

      public Boolean getCanReorderFields()
      Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields. If true, can be overridden at the field level via ListGridField.canReorder.
      Returns:
      Current canReorderFields value. Default value is true
      See Also:
    • setCanReorderRecords

      public ListGrid setCanReorderRecords(Boolean canReorderRecords)
      Indicates whether records can be reordered by dragging within this ListGrid.

      NOTE: If canReorderRecords is initially enabled or might be dynamically enabled after the grid is created, it may be desirable to disable touch scrolling so that touch-dragging a record starts a reorder operation rather than a scroll, but see the discussion of drag handles. If Canvas.disableTouchScrollingForDrag is set to true, then touch scrolling will be disabled automatically. However, for accessibility reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag-reordering of records.

      If this method is called after the component has been drawn/initialized: Setter for the canReorderRecords attribute.

      Parameters:
      canReorderRecords - new value for this.canReorderRecords. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanReorderRecords

      public Boolean getCanReorderRecords()
      Indicates whether records can be reordered by dragging within this ListGrid.

      NOTE: If canReorderRecords is initially enabled or might be dynamically enabled after the grid is created, it may be desirable to disable touch scrolling so that touch-dragging a record starts a reorder operation rather than a scroll, but see the discussion of drag handles. If Canvas.disableTouchScrollingForDrag is set to true, then touch scrolling will be disabled automatically. However, for accessibility reasons, it is recommended to leave touch scrolling enabled and provide an alternative set of controls that can be used to perform drag-reordering of records.

      Returns:
      Current canReorderRecords value. Default value is false
      See Also:
    • setCanRequestRowCount

      public ListGrid setCanRequestRowCount(boolean canRequestRowCount)
      Depending on whether DataSource.progressiveLoading is active, the exact count of available rows may not be known, and canRequestRowCount controls whether the end user may explicitly request it by clicking the RowRangeDisplay label.

      When this property is set to true, the user may request an accurate row count if one is not currently known by clicking the rowRangeDisplay. To have a row count fetch operation occur automatically when progressive data is loaded instead of requiring a user interaction to initiate the fetch, see autoFetchRowCount.

      Note: This property also acts as a default for ResultSet.applyRowCountToLength. By default, if set to true, a user may therefore click the rowRangeDisplay label to request a row count query be executed on the server, and when the query is complete they may scroll the listGrid body freely, retrieving records from anywhere within the data set.

      If applyRowCountToLength is explicitly set it will be applied to the grid's data object instead of using applyRowCountToLength as a default. For finer grained control, a developer may set both properties to false and manage behavior by explicitly calling fetchRowCount() and listGrid.data.setFullLength() from application code.

      Parameters:
      canRequestRowCount - New canRequestRowCount value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanRequestRowCount

      public boolean getCanRequestRowCount()
      Depending on whether DataSource.progressiveLoading is active, the exact count of available rows may not be known, and canRequestRowCount controls whether the end user may explicitly request it by clicking the RowRangeDisplay label.

      When this property is set to true, the user may request an accurate row count if one is not currently known by clicking the rowRangeDisplay. To have a row count fetch operation occur automatically when progressive data is loaded instead of requiring a user interaction to initiate the fetch, see autoFetchRowCount.

      Note: This property also acts as a default for ResultSet.applyRowCountToLength. By default, if set to true, a user may therefore click the rowRangeDisplay label to request a row count query be executed on the server, and when the query is complete they may scroll the listGrid body freely, retrieving records from anywhere within the data set.

      If applyRowCountToLength is explicitly set it will be applied to the grid's data object instead of using applyRowCountToLength as a default. For finer grained control, a developer may set both properties to false and manage behavior by explicitly calling fetchRowCount() and listGrid.data.setFullLength() from application code.

      Returns:
      Current canRequestRowCount value. Default value is false
      See Also:
    • setCanResizeFields

      public ListGrid setCanResizeFields(Boolean canResizeFields)
      Indicates whether fields in this listGrid can be resized by dragging header fields.

      If this method is called after the component has been drawn/initialized: Setter method for updating canResizeFields at runtime.
      Parameters:
      canResizeFields - new value for this.canResizeFields. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanResizeFields

      public Boolean getCanResizeFields()
      Indicates whether fields in this listGrid can be resized by dragging header fields.
      Returns:
      Current canResizeFields value. Default value is true
      See Also:
    • setCanSaveSearches

      public ListGrid setCanSaveSearches(boolean canSaveSearches) throws IllegalStateException
      When enabled (the default), causes a "Saved views >" submenu to appear in the header context menu, last, allowing the user to create new saved searches, select previously saved searches, and edit or copy existing searches.

      Note that disabling this feature does not mean that saved searches are disallowed - you can stil implement a separate UI via a SavedSearchItem that targets this component. But, when disabled, the grid-integrated menu described above will not be shown.

      This feature uses the global settings found in SavedSearches. Some aspects can be overridden for this component. See savedSearchDS, savedSearchAdminRole.

      To avoid leaking local storage, this setting will be disregarded, disabling the feature, unless the grid specifies savedSearchId, or an explicit local or global ID is present.

      Note: this feature requires Smart GWT Pro or better.

      Parameters:
      canSaveSearches - New canSaveSearches value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanSaveSearches

      public boolean getCanSaveSearches()
      When enabled (the default), causes a "Saved views >" submenu to appear in the header context menu, last, allowing the user to create new saved searches, select previously saved searches, and edit or copy existing searches.

      Note that disabling this feature does not mean that saved searches are disallowed - you can stil implement a separate UI via a SavedSearchItem that targets this component. But, when disabled, the grid-integrated menu described above will not be shown.

      This feature uses the global settings found in SavedSearches. Some aspects can be overridden for this component. See savedSearchDS, savedSearchAdminRole.

      To avoid leaking local storage, this setting will be disregarded, disabling the feature, unless the grid specifies savedSearchId, or an explicit local or global ID is present.

      Note: this feature requires Smart GWT Pro or better.

      Returns:
      Current canSaveSearches value. Default value is true
    • setCanSelectAll

      public ListGrid setCanSelectAll(Boolean canSelectAll)
      Controls whether a checkbox for selecting all records appears in the header with selectionAppearance set to "checkbox"
      Parameters:
      canSelectAll - New canSelectAll value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanSelectAll

      public Boolean getCanSelectAll()
      Controls whether a checkbox for selecting all records appears in the header with selectionAppearance set to "checkbox"
      Returns:
      Current canSelectAll value. Default value is null
      See Also:
    • setCanSelectCells

      public ListGrid setCanSelectCells(Boolean canSelectCells) throws IllegalStateException
      Enables cell-level selection behavior as well as cell-level rollover.

      To query and manipulate cell-level selections, use getCellSelection() to retrieve the CellSelection.

      Note that the ListGrid has a data model of one Record per row, unlike the CubeGrid which supports one CellRecord per cell. For this reason record-oriented APIs that act on the selection will act on entire Records that have any selected cells (examples include drag and drop and transferSelectedData()).

      More generally, canSelectCells is primarily intended to enable developers to build Excel-like interactions on local datasets, by using setData() plus saveLocally:true rather than record-oriented DataSources and data binding. You can also use canSelectCells in conjunction with SelectionAppearance set to "checkbox" to complete this experience.

      The following keyboard selection behaviors are enabled with this property in addition to standard single-selection Arrow Key navigation:

      SHIFT + [Arrow Key]: begin or continue incremental selection

      SHIFT + CTRL + [Arrow Key]: incremental selection to the end of row or column

      CTRL + A: select all cells (enabled only with canSelectAll)

      Incremental selection allows selection of rows and columns of cells via keyboard or mouse provided the shift key is down. Behavior is designed to match Excel. Thus, if a previous selection has begun, cells will be selected from that origin.

      Users may also navigate through cells using the Tab and Shift+Tab keypresses if navigateOnTab is true. When a user tabs to the end of the row, the rowEndEditAction is used to determine whether to shift selection to the next row, return to the beginning of the same row, or simply move on through the page's tab order.

      Parameters:
      canSelectCells - New canSelectCells value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanSelectCells

      public Boolean getCanSelectCells()
      Enables cell-level selection behavior as well as cell-level rollover.

      To query and manipulate cell-level selections, use getCellSelection() to retrieve the CellSelection.

      Note that the ListGrid has a data model of one Record per row, unlike the CubeGrid which supports one CellRecord per cell. For this reason record-oriented APIs that act on the selection will act on entire Records that have any selected cells (examples include drag and drop and transferSelectedData()).

      More generally, canSelectCells is primarily intended to enable developers to build Excel-like interactions on local datasets, by using setData() plus saveLocally:true rather than record-oriented DataSources and data binding. You can also use canSelectCells in conjunction with SelectionAppearance set to "checkbox" to complete this experience.

      The following keyboard selection behaviors are enabled with this property in addition to standard single-selection Arrow Key navigation:

      SHIFT + [Arrow Key]: begin or continue incremental selection

      SHIFT + CTRL + [Arrow Key]: incremental selection to the end of row or column

      CTRL + A: select all cells (enabled only with canSelectAll)

      Incremental selection allows selection of rows and columns of cells via keyboard or mouse provided the shift key is down. Behavior is designed to match Excel. Thus, if a previous selection has begun, cells will be selected from that origin.

      Users may also navigate through cells using the Tab and Shift+Tab keypresses if navigateOnTab is true. When a user tabs to the end of the row, the rowEndEditAction is used to determine whether to shift selection to the next row, return to the beginning of the same row, or simply move on through the page's tab order.

      Returns:
      Current canSelectCells value. Default value is false
    • setCanSelectGroups

      public ListGrid setCanSelectGroups(boolean canSelectGroups)
      Controls whether a checkbox for selecting groups appears in the group node if SelectionAppearance is set to "checkbox"
      Parameters:
      canSelectGroups - New canSelectGroups value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanSelectGroups

      public boolean getCanSelectGroups()
      Controls whether a checkbox for selecting groups appears in the group node if SelectionAppearance is set to "checkbox"
      Returns:
      Current canSelectGroups value. Default value is false
      See Also:
    • setCanSelectSummaryRows

      public ListGrid setCanSelectSummaryRows(boolean canSelectSummaryRows) throws IllegalStateException
      Whether to allow selection of the summary row, for example by clicking on the record. The default is to disallow it.

      If this property is set, further customization of selection can be made by applying the appropriate selection-related properties to the autochild via summaryRowProperties. The request to fetch the summary row(s) can be customized via summaryRowFetchRequestProperties.

      Note : This is an advanced setting

      Parameters:
      canSelectSummaryRows - New canSelectSummaryRows value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanSelectSummaryRows

      public boolean getCanSelectSummaryRows()
      Whether to allow selection of the summary row, for example by clicking on the record. The default is to disallow it.

      If this property is set, further customization of selection can be made by applying the appropriate selection-related properties to the autochild via summaryRowProperties. The request to fetch the summary row(s) can be customized via summaryRowFetchRequestProperties.

      Returns:
      Current canSelectSummaryRows value. Default value is false
    • setCanShowFilterEditor

      public ListGrid setCanShowFilterEditor(boolean canShowFilterEditor)
      Should a menu item allowing the user to show or hide the filter editor be displayed in the headerContextmenu?

      Note that if this ListGrid is not bound to a dataSource it can not be filtered. In this case the context menu option to show the filterEditor will not be displayed even if canShowFilterEditor is true.

      Enabling filter via AI forces this setting to true.

      Parameters:
      canShowFilterEditor - New canShowFilterEditor value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCanShowFilterEditor

      public boolean getCanShowFilterEditor()
      Should a menu item allowing the user to show or hide the filter editor be displayed in the headerContextmenu?

      Note that if this ListGrid is not bound to a dataSource it can not be filtered. In this case the context menu option to show the filterEditor will not be displayed even if canShowFilterEditor is true.

      Enabling filter via AI forces this setting to true.

      Returns:
      Current canShowFilterEditor value. Default value is true
      See Also:
    • setCanSort

      public ListGrid setCanSort(Boolean canSort)
      Enables or disables interactive sorting behavior for this listGrid. Does not affect sorting by direct calls to the sort or setSort methods.
      Parameters:
      canSort - New canSort value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getCanSort

      public Boolean getCanSort()
      Enables or disables interactive sorting behavior for this listGrid. Does not affect sorting by direct calls to the sort or setSort methods.
      Returns:
      Current canSort value. Default value is true
    • setCanTabToHeader

      public ListGrid setCanTabToHeader(Boolean canTabToHeader) throws IllegalStateException
      Should the header be included in the tab-order for the page? If not explicitly specified, the header will be included in the tab order for the page if SC.setScreenReaderMode() is called.
      Parameters:
      canTabToHeader - New canTabToHeader value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanTabToHeader

      public Boolean getCanTabToHeader()
      Should the header be included in the tab-order for the page? If not explicitly specified, the header will be included in the tab order for the page if SC.setScreenReaderMode() is called.
      Returns:
      Current canTabToHeader value. Default value is null
      See Also:
    • setCanTabToSorter

      public ListGrid setCanTabToSorter(Boolean canTabToSorter) throws IllegalStateException
      Should the corner sort button be included in the tab-order for the page?
      Parameters:
      canTabToSorter - New canTabToSorter value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanTabToSorter

      public Boolean getCanTabToSorter()
      Should the corner sort button be included in the tab-order for the page?
      Returns:
      Current canTabToSorter value. Default value is false
      See Also:
    • getCellContextMenu

      public Layout getCellContextMenu() throws IllegalStateException
      The menu displayed when a cell is right clicked on.

      This component is an AutoChild named "cellContextMenu". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current cellContextMenu value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setCellHeight

      public ListGrid setCellHeight(int cellHeight)
      Default height for each row in pixels. See fixedRecordHeights and enforceVClipping for information on how rows are sized when cell content height exceeds this specified value.
      Parameters:
      cellHeight - New cellHeight value. Default value is 20
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCellHeight

      public int getCellHeight()
      Default height for each row in pixels. See fixedRecordHeights and enforceVClipping for information on how rows are sized when cell content height exceeds this specified value.
      Returns:
      Current cellHeight value. Default value is 20
      See Also:
    • setCellPadding

      public ListGrid setCellPadding(int cellPadding)
      The amount of empty space, in pixels, surrounding each value in its cell.
      Parameters:
      cellPadding - New cellPadding value. Default value is 2
      Returns:
      ListGrid instance, for chaining setter calls
    • getCellPadding

      public int getCellPadding()
      The amount of empty space, in pixels, surrounding each value in its cell.
      Returns:
      Current cellPadding value. Default value is 2
    • setCellRole

      public ListGrid setCellRole(String cellRole)
      Returns the default WAI ARIA role for cells within this listGrid. See getCellRole()

      Note : This is an advanced setting

      Parameters:
      cellRole - New cellRole value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getCellRole

      public String getCellRole()
      Returns the default WAI ARIA role for cells within this listGrid. See getCellRole()
      Returns:
      Returns the WAI ARIA role for cells within this listGrid.

      If the record has a value for the recordCellRoleProperty, this will be respected.
      Otherwise if cellRole is specified, it will be used.

      If neither property is set, the default implementation will return "gridcell" if this listGrid has role:"grid", otherwise null, meaning no role will be written out for cells. Default value is null

    • setChartConstructor

      public ListGrid setChartConstructor(String chartConstructor) throws IllegalStateException
      Name of the Smart GWT Class to be used when creating charts. Must support the Chart interface.
      Parameters:
      chartConstructor - New chartConstructor value. Default value is "FacetChart"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getChartConstructor

      public String getChartConstructor()
      Name of the Smart GWT Class to be used when creating charts. Must support the Chart interface.
      Returns:
      Current chartConstructor value. Default value is "FacetChart"
    • setChartType

      public ListGrid setChartType(ChartType chartType)
      Default type of chart to plot.
      Parameters:
      chartType - New chartType value. Default value is "Column"
      Returns:
      ListGrid instance, for chaining setter calls
    • getChartType

      public ChartType getChartType()
      Default type of chart to plot.
      Returns:
      Current chartType value. Default value is "Column"
    • setCheckboxFieldFalseImage

      public ListGrid setCheckboxFieldFalseImage(String checkboxFieldFalseImage)
      If selectionAppearance is set to "checkbox" this property determines the image to display in the checkbox field for an unselected row. If unset, the booleanFalseImage will be used. Note that the special value "blank" means that no image will be shown.

      Note : This is an advanced setting

      Parameters:
      checkboxFieldFalseImage - New checkboxFieldFalseImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCheckboxFieldFalseImage

      public String getCheckboxFieldFalseImage()
      If selectionAppearance is set to "checkbox" this property determines the image to display in the checkbox field for an unselected row. If unset, the booleanFalseImage will be used. Note that the special value "blank" means that no image will be shown.
      Returns:
      Current checkboxFieldFalseImage value. Default value is null
      See Also:
    • setCheckboxFieldImageHeight

      public ListGrid setCheckboxFieldImageHeight(Integer checkboxFieldImageHeight) throws IllegalStateException
      If selectionAppearance is set to "checkbox" this property may be set to govern the height of the checkbox image displayed to indicate whether a row is selected. If unset, the checkboxField image will be sized to match the booleanImageHeight for this grid.
      Parameters:
      checkboxFieldImageHeight - New checkboxFieldImageHeight value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCheckboxFieldImageHeight

      public Integer getCheckboxFieldImageHeight()
      If selectionAppearance is set to "checkbox" this property may be set to govern the height of the checkbox image displayed to indicate whether a row is selected. If unset, the checkboxField image will be sized to match the booleanImageHeight for this grid.
      Returns:
      Current checkboxFieldImageHeight value. Default value is null
    • setCheckboxFieldImageWidth

      public ListGrid setCheckboxFieldImageWidth(Integer checkboxFieldImageWidth) throws IllegalStateException
      If selectionAppearance is set to "checkbox" this property may be set to govern the width of the checkbox image displayed to indicate whether a row is selected. If unset, the checkboxField image will be sized to match the booleanImageWidth for this grid.
      Parameters:
      checkboxFieldImageWidth - New checkboxFieldImageWidth value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCheckboxFieldImageWidth

      public Integer getCheckboxFieldImageWidth()
      If selectionAppearance is set to "checkbox" this property may be set to govern the width of the checkbox image displayed to indicate whether a row is selected. If unset, the checkboxField image will be sized to match the booleanImageWidth for this grid.
      Returns:
      Current checkboxFieldImageWidth value. Default value is null
    • setCheckboxFieldPartialImage

      public ListGrid setCheckboxFieldPartialImage(String checkboxFieldPartialImage)
      If selectionAppearance is set to "checkbox" this property determines the image to display in the checkbox field for a partially selected row. If unset, the booleanPartialImage will be used. Note that the special value "blank" means that no image will be shown.

      Note : This is an advanced setting

      Parameters:
      checkboxFieldPartialImage - New checkboxFieldPartialImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCheckboxFieldPartialImage

      public String getCheckboxFieldPartialImage()
      If selectionAppearance is set to "checkbox" this property determines the image to display in the checkbox field for a partially selected row. If unset, the booleanPartialImage will be used. Note that the special value "blank" means that no image will be shown.
      Returns:
      Current checkboxFieldPartialImage value. Default value is null
      See Also:
    • setCheckboxFieldTrueImage

      public ListGrid setCheckboxFieldTrueImage(String checkboxFieldTrueImage)
      If selectionAppearance is set to "checkbox" this property determines the image to display in the checkbox field for a selected row. If unset, the booleanTrueImage will be used. Note that the special value "blank" means that no image will be shown.

      Note : This is an advanced setting

      Parameters:
      checkboxFieldTrueImage - New checkboxFieldTrueImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getCheckboxFieldTrueImage

      public String getCheckboxFieldTrueImage()
      If selectionAppearance is set to "checkbox" this property determines the image to display in the checkbox field for a selected row. If unset, the booleanTrueImage will be used. Note that the special value "blank" means that no image will be shown.
      Returns:
      Current checkboxFieldTrueImage value. Default value is null
      See Also:
    • setChildExpansionMode

      public ListGrid setChildExpansionMode(ExpansionMode childExpansionMode)
      For expansionModes that show another grid or tree, what the child's expansionMode should be.

      Default value null means no further expansion.

      Note : This is an advanced setting

      Parameters:
      childExpansionMode - New childExpansionMode value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getChildExpansionMode

      public ExpansionMode getChildExpansionMode()
      For expansionModes that show another grid or tree, what the child's expansionMode should be.

      Default value null means no further expansion.

      Returns:
      Current childExpansionMode value. Default value is null
    • setClearAllSortingText

      public ListGrid setClearAllSortingText(String clearAllSortingText)
      If we're showing a headerContextMenu for this grid, this attribute will be shown as the menu item title to clear any existing sort on all fields. This menu-item is displayed only in the context menu for the sorter button.
      Parameters:
      clearAllSortingText - New clearAllSortingText value. Default value is "Clear All Sorting"
      Returns:
      ListGrid instance, for chaining setter calls
    • getClearAllSortingText

      public String getClearAllSortingText()
      If we're showing a headerContextMenu for this grid, this attribute will be shown as the menu item title to clear any existing sort on all fields. This menu-item is displayed only in the context menu for the sorter button.
      Returns:
      Current clearAllSortingText value. Default value is "Clear All Sorting"
    • setClearCriteriaOnFilterEditorHide

      public ListGrid setClearCriteriaOnFilterEditorHide(boolean clearCriteriaOnFilterEditorHide) throws IllegalStateException
      When set to false, this attribute prevents user-criteria in the filterEditor from being cleared when the user hides it.
      Parameters:
      clearCriteriaOnFilterEditorHide - New clearCriteriaOnFilterEditorHide value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getClearCriteriaOnFilterEditorHide

      public boolean getClearCriteriaOnFilterEditorHide()
      When set to false, this attribute prevents user-criteria in the filterEditor from being cleared when the user hides it.
      Returns:
      Current clearCriteriaOnFilterEditorHide value. Default value is true
    • setClearFilterText

      public ListGrid setClearFilterText(String clearFilterText)
      If we're showing a headerContextMenu for this grid, and a filter-editor is visible, this attribute will be shown as the menu item title to clear any existing filter. This menu-item is displayed only in the context menu for the sorter button.
      Parameters:
      clearFilterText - New clearFilterText value. Default value is "Clear Filter"
      Returns:
      ListGrid instance, for chaining setter calls
    • getClearFilterText

      public String getClearFilterText()
      If we're showing a headerContextMenu for this grid, and a filter-editor is visible, this attribute will be shown as the menu item title to clear any existing filter. This menu-item is displayed only in the context menu for the sorter button.
      Returns:
      Current clearFilterText value. Default value is "Clear Filter"
    • setClearFilterViaAIText

      public ListGrid setClearFilterViaAIText(String clearFilterViaAIText)
      Title for the menu-item displayed in this component's header context-menu when AI-assisted filtering is allowed and an AI filter in already in effect.
      Parameters:
      clearFilterViaAIText - New clearFilterViaAIText value. Default value is "Clear AI Filter"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getClearFilterViaAIText

      public String getClearFilterViaAIText()
      Title for the menu-item displayed in this component's header context-menu when AI-assisted filtering is allowed and an AI filter in already in effect.
      Returns:
      Current clearFilterViaAIText value. Default value is "Clear AI Filter"
      See Also:
    • setClearSortFieldText

      public ListGrid setClearSortFieldText(String clearSortFieldText)
      If we're showing a headerContextMenu for this grid, this attribute will be shown as the menu item title to clear an existing sort on this field.
      Parameters:
      clearSortFieldText - New clearSortFieldText value. Default value is "Clear Sort"
      Returns:
      ListGrid instance, for chaining setter calls
    • getClearSortFieldText

      public String getClearSortFieldText()
      If we're showing a headerContextMenu for this grid, this attribute will be shown as the menu item title to clear an existing sort on this field.
      Returns:
      Current clearSortFieldText value. Default value is "Clear Sort"
    • setClipHeaderTitles

      public ListGrid setClipHeaderTitles(Boolean clipHeaderTitles) throws IllegalStateException
      Whether the ListGrid should manage the clipping of titles of header buttons, showing ellipses if the title is clipped, and potentially showing the full title on hover.

      In some cases this may be preferable to the button component's default clipping behavior because if a sort arrow or sort numeral is displayed for a header, then the button's default clipping behavior may clip the sort arrow/numeral whereas ListGrid-managed title clipping utilizes special HTML which keeps the sort arrow/numeral visible.

      This feature is automatically enabled if supported by the browser. The only supported use of this attribute is to disable the feature by setting clipHeaderTitles to false.

      Note that this feature is incompatible with ListGridField.wrap, and will automatically be disabled for wrapping fields.

      Note : This is an advanced setting

      Parameters:
      clipHeaderTitles - New clipHeaderTitles value. Default value is varies
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getClipHeaderTitles

      public Boolean getClipHeaderTitles()
      Whether the ListGrid should manage the clipping of titles of header buttons, showing ellipses if the title is clipped, and potentially showing the full title on hover.

      In some cases this may be preferable to the button component's default clipping behavior because if a sort arrow or sort numeral is displayed for a header, then the button's default clipping behavior may clip the sort arrow/numeral whereas ListGrid-managed title clipping utilizes special HTML which keeps the sort arrow/numeral visible.

      This feature is automatically enabled if supported by the browser. The only supported use of this attribute is to disable the feature by setting clipHeaderTitles to false.

      Note that this feature is incompatible with ListGridField.wrap, and will automatically be disabled for wrapping fields.

      Returns:
      Current clipHeaderTitles value. Default value is varies
      See Also:
    • setCollapseGroupOnRowClick

      public ListGrid setCollapseGroupOnRowClick(boolean collapseGroupOnRowClick) throws IllegalStateException
      If canCollapseGroup is true, will a click anywhere on the group row toggle the group's expanded state? If false, the user must click the groupIcon directly to toggle the group.
      Parameters:
      collapseGroupOnRowClick - New collapseGroupOnRowClick value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCollapseGroupOnRowClick

      public boolean getCollapseGroupOnRowClick()
      If canCollapseGroup is true, will a click anywhere on the group row toggle the group's expanded state? If false, the user must click the groupIcon directly to toggle the group.
      Returns:
      Current collapseGroupOnRowClick value. Default value is true
      See Also:
    • setConfigureGroupingText

      public ListGrid setConfigureGroupingText(String configureGroupingText)
      If we're showing a headerContextMenu for this grid, and multi-grouping is enabled, this attribute is used as the title for a menu item that opens a MultiGroupDialog to configure the grouping for this grid.
      Parameters:
      configureGroupingText - New configureGroupingText value. Default value is "Configure Grouping..."
      Returns:
      ListGrid instance, for chaining setter calls
    • getConfigureGroupingText

      public String getConfigureGroupingText()
      If we're showing a headerContextMenu for this grid, and multi-grouping is enabled, this attribute is used as the title for a menu item that opens a MultiGroupDialog to configure the grouping for this grid.
      Returns:
      Current configureGroupingText value. Default value is "Configure Grouping..."
    • setConfigureSortText

      public ListGrid setConfigureSortText(String configureSortText)
      If we're showing a headerContextMenu for this grid, and multi-sorting is enabled, this attribute is used as the title for a menu item that opens a MultiSortDialog to configure the sort-specification for this grid. This menu-item is displayed only in the context menu for the sorter button.
      Parameters:
      configureSortText - New configureSortText value. Default value is "Configure Sort..."
      Returns:
      ListGrid instance, for chaining setter calls
    • getConfigureSortText

      public String getConfigureSortText()
      If we're showing a headerContextMenu for this grid, and multi-sorting is enabled, this attribute is used as the title for a menu item that opens a MultiSortDialog to configure the sort-specification for this grid. This menu-item is displayed only in the context menu for the sorter button.
      Returns:
      Current configureSortText value. Default value is "Configure Sort..."
    • setConfirmCancelEditing

      public ListGrid setConfirmCancelEditing(Boolean confirmCancelEditing)
      If this is an editable listGrid, when the user attempts to cancel an edit, should we display a confirmation prompt before discarding the edited values for the record?
      Parameters:
      confirmCancelEditing - New confirmCancelEditing value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getConfirmCancelEditing

      public Boolean getConfirmCancelEditing()
      If this is an editable listGrid, when the user attempts to cancel an edit, should we display a confirmation prompt before discarding the edited values for the record?
      Returns:
      Current confirmCancelEditing value. Default value is false
      See Also:
    • setConfirmDiscardEdits

      public ListGrid setConfirmDiscardEdits(Boolean confirmDiscardEdits)
      For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded. This flag determines whether we should display a confirmation dialog with options to save or discard the edits, or cancel the action in this case.
      Parameters:
      confirmDiscardEdits - New confirmDiscardEdits value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getConfirmDiscardEdits

      public Boolean getConfirmDiscardEdits()
      For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded. This flag determines whether we should display a confirmation dialog with options to save or discard the edits, or cancel the action in this case.
      Returns:
      Current confirmDiscardEdits value. Default value is true
      See Also:
    • setConfirmDiscardEditsMessage

      public ListGrid setConfirmDiscardEditsMessage(String confirmDiscardEditsMessage)
      If this.confirmDiscardEdits is true, this property can be used to customize the error message string displayed to the user in a dialog with options to cancel the action, or save or discard pending edits in response to sort/filter actions that would otherwise drop unsaved edit values.
      Parameters:
      confirmDiscardEditsMessage - New confirmDiscardEditsMessage value. Default value is "This action will discard unsaved changes for this list."
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getConfirmDiscardEditsMessage

      public String getConfirmDiscardEditsMessage()
      If this.confirmDiscardEdits is true, this property can be used to customize the error message string displayed to the user in a dialog with options to cancel the action, or save or discard pending edits in response to sort/filter actions that would otherwise drop unsaved edit values.
      Returns:
      Current confirmDiscardEditsMessage value. Default value is "This action will discard unsaved changes for this list."
      See Also:
    • setCriteriaIndicatorColor

      public ListGrid setCriteriaIndicatorColor(String criteriaIndicatorColor) throws IllegalStateException
      Parameters:
      criteriaIndicatorColor - New criteriaIndicatorColor value. Default value is "#33AAFF"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCriteriaIndicatorColor

      public String getCriteriaIndicatorColor()
      Returns:
      Current criteriaIndicatorColor value. Default value is "#33AAFF"
    • setCriteriaIndicatorHeaderColor

      public ListGrid setCriteriaIndicatorHeaderColor(String criteriaIndicatorHeaderColor) throws IllegalStateException
      The color of the filterWindow criteria indicator when shown on the sorter button or the last header button in the grid header. The default is to use criteriaIndicatorColor.
      Parameters:
      criteriaIndicatorHeaderColor - New criteriaIndicatorHeaderColor value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCriteriaIndicatorHeaderColor

      public String getCriteriaIndicatorHeaderColor()
      The color of the filterWindow criteria indicator when shown on the sorter button or the last header button in the grid header. The default is to use criteriaIndicatorColor.
      Returns:
      Current criteriaIndicatorHeaderColor value. Default value is null
    • setData

      public ListGrid setData(ListGridRecord... data)
      A list of ListGridRecord objects, specifying the data to be used to populate the ListGrid. In ListGrids, the data array specifies rows.

      When using a DataSource, rather than directly providing data, you will typically call fetchData() instead, which will automatically establish data as a ResultSet (see the fetchData() docs for details).

      If you call fetchData, any previously supplied data is discarded. Also, it is not necessary to call setData() after calling fetchData().

      When calling setData(), if data is provided as a RecordList or ResultSet, direct changes to the list using Framework APIs such as RecordList.add() or RecordList.remove() will be automatically detected and the ListGrid will redraw in response. However, direct changes to individual Records will not be automatically detected and require calls to refreshCell() or refreshRow() to cause the ListGrid to visually update. Calling methods such as updateData(), removeData() or addData() always causes automatic visual refresh.

      If this method is called after the component has been drawn/initialized: Provides a new data set to the ListGrid after the grid has been created or drawn. The ListGrid will redraw to show the new data automatically.

      Note that passing null will not clear data, but will regroup it and reapply the current sort, highlighting, and summaries to the grid. Size will be recalculated for fields marked as autofitWidth:true and a selection manager will be created if none exists. To clear the grid instead, pass [].

      Parameters:
      data - data to show in the list. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • setDataArity

      public ListGrid setDataArity(String dataArity)
      A ListGrid is a dataArity:multiple component.

      Note : This is an advanced setting

      Parameters:
      dataArity - New dataArity value. Default value is "multiple"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getDataArity

      public String getDataArity()
      A ListGrid is a dataArity:multiple component.
      Returns:
      Current dataArity value. Default value is "multiple"
      See Also:
    • setDataFetchDelay

      public ListGrid setDataFetchDelay(Integer dataFetchDelay)
      Delay in milliseconds before fetching data.

      Note: the floor value for this attribute is 1. If you set this value to zero, it will be defaulted to 1 for you instead.

      Note : This is an advanced setting

      Parameters:
      dataFetchDelay - New dataFetchDelay value. Default value is 1
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getDataFetchDelay

      public Integer getDataFetchDelay()
      Delay in milliseconds before fetching data.

      Note: the floor value for this attribute is 1. If you set this value to zero, it will be defaulted to 1 for you instead.

      Returns:
      Current dataFetchDelay value. Default value is 1
      See Also:
    • setDataFetchMode

      public ListGrid setDataFetchMode(FetchMode dataFetchMode) throws IllegalStateException
      How to fetch and manage records retrieve from the server. See FetchMode.

      This setting only applies to the ResultSet automatically created by calling fetchData(). If a pre-existing ResultSet is passed to setData() instead, it's existing setting for ResultSet.fetchMode applies.

      Specified by:
      setDataFetchMode in interface DataBoundComponent
      Parameters:
      dataFetchMode - New dataFetchMode value. Default value is "paged"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDataFetchMode

      public FetchMode getDataFetchMode()
      How to fetch and manage records retrieve from the server. See FetchMode.

      This setting only applies to the ResultSet automatically created by calling fetchData(). If a pre-existing ResultSet is passed to setData() instead, it's existing setting for ResultSet.fetchMode applies.

      Specified by:
      getDataFetchMode in interface DataBoundComponent
      Returns:
      Current dataFetchMode value. Default value is "paged"
      See Also:
    • setDataSource

      public ListGrid setDataSource(DataSource dataSource)
      The DataSource that this component should bind to for default fields and for performing DataSource requests.

      Can be specified as either a DataSource instance or the String ID of a DataSource.

      If this method is called after the component has been drawn/initialized: Bind to a new DataSource.

      Like passing the "dataSource" property on creation, binding to a DataSource means that the component will use the DataSource to provide default data for its fields.

      When binding to a new DataSource, if the component has any existing "fields" or has a dataset, these will be discarded by default, since it is assumed the new DataSource may represent a completely unrelated set of objects. If the old "fields" are still relevant, pass them to setDataSource().

      Specified by:
      setDataSource in interface DataBoundComponent
      Parameters:
      dataSource - DataSource to bind to. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • setDataSource

      public ListGrid setDataSource(String dataSource)
      The DataSource that this component should bind to for default fields and for performing DataSource requests.

      Can be specified as either a DataSource instance or the String ID of a DataSource.

      If this method is called after the component has been drawn/initialized: Bind to a new DataSource.

      Like passing the "dataSource" property on creation, binding to a DataSource means that the component will use the DataSource to provide default data for its fields.

      When binding to a new DataSource, if the component has any existing "fields" or has a dataset, these will be discarded by default, since it is assumed the new DataSource may represent a completely unrelated set of objects. If the old "fields" are still relevant, pass them to setDataSource().

      Specified by:
      setDataSource in interface DataBoundComponent
      Parameters:
      dataSource - DataSource to bind to. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • setDateFormatter

      public ListGrid setDateFormatter(DateDisplayFormat dateFormatter)
      How should Date type values be displayed in this ListGrid by default?

      This property specifies the default DateDisplayFormat to apply to Date values displayed in this grid for all fields except those of type "time" (See also timeFormatter).
      If datetimeFormatter is specified, that will be applied by default to fields of type "datetime".

      Note that if ListGridField.dateFormatter or ListGridField.timeFormatter are specified those properties will take precedence over the component level settings.

      If unset, date values will be formatted according to the system wide short display format or short datetime display format for datetime type fields.

      If this field is editable the dateFormatter will also be passed to the editor created to edit this field as dateFormatter. In this case you may also need to set dateInputFormat.

      Parameters:
      dateFormatter - New dateFormatter value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getDateFormatter

      public DateDisplayFormat getDateFormatter()
      How should Date type values be displayed in this ListGrid by default?

      This property specifies the default DateDisplayFormat to apply to Date values displayed in this grid for all fields except those of type "time" (See also timeFormatter).
      If datetimeFormatter is specified, that will be applied by default to fields of type "datetime".

      Note that if ListGridField.dateFormatter or ListGridField.timeFormatter are specified those properties will take precedence over the component level settings.

      If unset, date values will be formatted according to the system wide short display format or short datetime display format for datetime type fields.

      If this field is editable the dateFormatter will also be passed to the editor created to edit this field as dateFormatter. In this case you may also need to set dateInputFormat.

      Returns:
      Current dateFormatter value. Default value is null
    • setDateInputFormat

      public ListGrid setDateInputFormat(String dateInputFormat)
      If this is an editable listGrid, this property will specify the inputFormat applied to editors for fields of type "date". May be overridden per field via ListGridField.inputFormat.

      Note : This is an advanced setting

      Parameters:
      dateInputFormat - New dateInputFormat value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • setDatetimeFormatter

      public ListGrid setDatetimeFormatter(DateDisplayFormat datetimeFormatter)
      Display format to use for fields specified as type 'datetime'. Default is to use the system-wide default date time format, configured via DateUtil.setShortDatetimeDisplayFormat(). Specify any valid DateDisplayFormat to change the display format for datetimes used by this grid.

      May also be specified at the field level via ListGridField.dateFormatter

      If this field is editable the dateFormatter will also be passed to the editor created to edit this field as dateFormatter. In this case you may also need to set dateInputFormat.

      Parameters:
      datetimeFormatter - New datetimeFormatter value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getDatetimeFormatter

      public DateDisplayFormat getDatetimeFormatter()
      Display format to use for fields specified as type 'datetime'. Default is to use the system-wide default date time format, configured via DateUtil.setShortDatetimeDisplayFormat(). Specify any valid DateDisplayFormat to change the display format for datetimes used by this grid.

      May also be specified at the field level via ListGridField.dateFormatter

      If this field is editable the dateFormatter will also be passed to the editor created to edit this field as dateFormatter. In this case you may also need to set dateInputFormat.

      Returns:
      Current datetimeFormatter value. Default value is null
      See Also:
    • setDefaultDateFieldWidth

      public ListGrid setDefaultDateFieldWidth(Integer defaultDateFieldWidth)
      Default width for date type fields. See autoFitDateFields for details on how this property is used.
      Parameters:
      defaultDateFieldWidth - New defaultDateFieldWidth value. Default value is varies
      Returns:
      ListGrid instance, for chaining setter calls
    • getDefaultDateFieldWidth

      public Integer getDefaultDateFieldWidth()
      Default width for date type fields. See autoFitDateFields for details on how this property is used.
      Returns:
      Current defaultDateFieldWidth value. Default value is varies
    • setDefaultDateTimeFieldWidth

      public ListGrid setDefaultDateTimeFieldWidth(Integer defaultDateTimeFieldWidth)
      Default width for datetime type fields. See autoFitDateFields for details on how this property is used.
      Parameters:
      defaultDateTimeFieldWidth - New defaultDateTimeFieldWidth value. Default value is varies
      Returns:
      ListGrid instance, for chaining setter calls
    • getDefaultDateTimeFieldWidth

      public Integer getDefaultDateTimeFieldWidth()
      Default width for datetime type fields. See autoFitDateFields for details on how this property is used.
      Returns:
      Current defaultDateTimeFieldWidth value. Default value is varies
    • setDefaultEditableDateFieldWidth

      public ListGrid setDefaultEditableDateFieldWidth(Integer defaultEditableDateFieldWidth)
      Default width for editable date type fields. See autoFitDateFields for details on how this property is used.
      Parameters:
      defaultEditableDateFieldWidth - New defaultEditableDateFieldWidth value. Default value is varies
      Returns:
      ListGrid instance, for chaining setter calls
    • getDefaultEditableDateFieldWidth

      public Integer getDefaultEditableDateFieldWidth()
      Default width for editable date type fields. See autoFitDateFields for details on how this property is used.
      Returns:
      Current defaultEditableDateFieldWidth value. Default value is varies
    • setDefaultEditableDateTimeFieldWidth

      public ListGrid setDefaultEditableDateTimeFieldWidth(Integer defaultEditableDateTimeFieldWidth)
      Default width for editable datetime type fields. See autoFitDateFields for details on how this property is used.
      Parameters:
      defaultEditableDateTimeFieldWidth - New defaultEditableDateTimeFieldWidth value. Default value is varies
      Returns:
      ListGrid instance, for chaining setter calls
    • getDefaultEditableDateTimeFieldWidth

      public Integer getDefaultEditableDateTimeFieldWidth()
      Default width for editable datetime type fields. See autoFitDateFields for details on how this property is used.
      Returns:
      Current defaultEditableDateTimeFieldWidth value. Default value is varies
    • setDefaultFields

      public ListGrid setDefaultFields(ListGridField... defaultFields) throws IllegalStateException
      An array of listGrid field configuration objects. When a listGrid is initialized, if this property is set and there is no value for the fields attribute, this.fields will be defaulted to a generated array of field objects duplicated from this array.

      This property is useful for cases where a standard set of fields will be displayed in multiple listGrids - for example a subclass of ListGrid intended to display a particular type of data:
      In this example we would not assign a single fields array directly to the class via addProperties() as every generated instance of this class would then point to the same fields array object. This would cause unexpected behavior such as changes to the field order in one grid affecting other grids on the page.
      Instead we could use addProperties() on our new subclass to set defaultFields to a standard array of fields to display. Each generated instance of the subclass would then show up with default fields duplicated from this array.

      Note : This is an advanced setting

      Parameters:
      defaultFields - New defaultFields value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDefaultFields

      public ListGridField[] getDefaultFields()
      An array of listGrid field configuration objects. When a listGrid is initialized, if this property is set and there is no value for the fields attribute, this.fields will be defaulted to a generated array of field objects duplicated from this array.

      This property is useful for cases where a standard set of fields will be displayed in multiple listGrids - for example a subclass of ListGrid intended to display a particular type of data:
      In this example we would not assign a single fields array directly to the class via addProperties() as every generated instance of this class would then point to the same fields array object. This would cause unexpected behavior such as changes to the field order in one grid affecting other grids on the page.
      Instead we could use addProperties() on our new subclass to set defaultFields to a standard array of fields to display. Each generated instance of the subclass would then show up with default fields duplicated from this array.

      Returns:
      Current defaultFields value. Default value is null
    • setDefaultFilterOperator

      public ListGrid setDefaultFilterOperator(OperatorId defaultFilterOperator) throws IllegalStateException
      Default filter operator to use for text-based fields in this grid's filter editor, when producing AdvancedCriteria. When allowFilterExpressions or allowFilterOperators are enabled for the grid, the default is "iContainsPattern". Otherwise, the default is "iContains".

      Does not apply to special fields where exact match is obviously the right default setting, such as fields of type:"enum", or fields with a valueMap or optionDataSource.

      Parameters:
      defaultFilterOperator - New defaultFilterOperator value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDefaultFilterOperator

      public OperatorId getDefaultFilterOperator()
      Default filter operator to use for text-based fields in this grid's filter editor, when producing AdvancedCriteria. When allowFilterExpressions or allowFilterOperators are enabled for the grid, the default is "iContainsPattern". Otherwise, the default is "iContains".

      Does not apply to special fields where exact match is obviously the right default setting, such as fields of type:"enum", or fields with a valueMap or optionDataSource.

      Returns:
      Current defaultFilterOperator value. Default value is null
    • setDefaultFilterOperatorSuffix

      public ListGrid setDefaultFilterOperatorSuffix(String defaultFilterOperatorSuffix) throws IllegalStateException
      Text to show after the name of the default filterOperator in the headerContextMenu when allowFilterOperators is enabled.
      Parameters:
      defaultFilterOperatorSuffix - New defaultFilterOperatorSuffix value. Default value is "(default)"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDefaultFilterOperatorSuffix

      public String getDefaultFilterOperatorSuffix()
      Text to show after the name of the default filterOperator in the headerContextMenu when allowFilterOperators is enabled.
      Returns:
      Current defaultFilterOperatorSuffix value. Default value is "(default)"
    • setDefaultTimeFieldWidth

      public ListGrid setDefaultTimeFieldWidth(Integer defaultTimeFieldWidth)
      Default width for time type fields. See autoFitDateFields for details on how this property is used.
      Parameters:
      defaultTimeFieldWidth - New defaultTimeFieldWidth value. Default value is varies
      Returns:
      ListGrid instance, for chaining setter calls
    • getDefaultTimeFieldWidth

      public Integer getDefaultTimeFieldWidth()
      Default width for time type fields. See autoFitDateFields for details on how this property is used.
      Returns:
      Current defaultTimeFieldWidth value. Default value is varies
    • setDeferRemoval

      public ListGrid setDeferRemoval(Boolean deferRemoval) throws IllegalStateException
      When enabled, the field shown by canRemoveRecords causes records to be marked for future removal via markRecordRemoved() instead of immediately being removed.

      When a record has been marked for removal, an icon in the canRemoveRecords field allowing it to be unmarked will be displayed.

      If not explicitly specified by this property, removal of records will be deferred if autoSaveEdits is false for the grid.

      Parameters:
      deferRemoval - New deferRemoval value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDeferRemoval

      public Boolean getDeferRemoval()
      When enabled, the field shown by canRemoveRecords causes records to be marked for future removal via markRecordRemoved() instead of immediately being removed.

      When a record has been marked for removal, an icon in the canRemoveRecords field allowing it to be unmarked will be displayed.

      If not explicitly specified by this property, removal of records will be deferred if autoSaveEdits is false for the grid.

      Returns:
      Current deferRemoval value. Default value is null
      See Also:
    • setDeselectOnPartialCheckboxClick

      public ListGrid setDeselectOnPartialCheckboxClick(Boolean deselectOnPartialCheckboxClick)
      Should partially selected checkbox be deselected or selected on click? This setting affects header selection checkbox, group\n checkboxes and folder checkbox selection in a Tree data set.

      By default clicking a partially selected checkbox selects it.

      Parameters:
      deselectOnPartialCheckboxClick - New deselectOnPartialCheckboxClick value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getDeselectOnPartialCheckboxClick

      public Boolean getDeselectOnPartialCheckboxClick()
      Should partially selected checkbox be deselected or selected on click? This setting affects header selection checkbox, group\n checkboxes and folder checkbox selection in a Tree data set.

      By default clicking a partially selected checkbox selects it.

      Returns:
      Current deselectOnPartialCheckboxClick value. Default value is false
      See Also:
    • setDetailDS

      public ListGrid setDetailDS(String detailDS)
      If canExpandRecords is true and listGrid.expansionMode is "related", this property specifies the dataSource for the related records grid to be shown embedded in expanded records.

      This property may also be specified on a per-record basis - see recordDetailDSProperty

      Parameters:
      detailDS - New detailDS value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getDetailDS

      public String getDetailDS()
      If canExpandRecords is true and listGrid.expansionMode is "related", this property specifies the dataSource for the related records grid to be shown embedded in expanded records.

      This property may also be specified on a per-record basis - see recordDetailDSProperty

      Returns:
      Current detailDS value. Default value is null
    • setDetailField

      public ListGrid setDetailField(String detailField)
      The field whose contents to show in the expanded portion of a record when canExpandRecords is true and listGrid.expansionMode is detailField.
      Parameters:
      detailField - New detailField value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getDetailField

      public String getDetailField()
      The field whose contents to show in the expanded portion of a record when canExpandRecords is true and listGrid.expansionMode is detailField.
      Returns:
      Current detailField value. Default value is null
    • setDisabledGroupByPrompt

      public ListGrid setDisabledGroupByPrompt(String disabledGroupByPrompt)
      Prompt to indicate that grouping is disabled as the data set size exceeds groupByMaxRecords.

      This prompt will be shown as a hover for the disabled group by menu item.

      See also groupByMaxRecordsExceededMessage.

      Parameters:
      disabledGroupByPrompt - New disabledGroupByPrompt value. Default value is "Grouping is not supported for datasets of this size"
      Returns:
      ListGrid instance, for chaining setter calls
    • getDisabledGroupByPrompt

      public String getDisabledGroupByPrompt()
      Prompt to indicate that grouping is disabled as the data set size exceeds groupByMaxRecords.

      This prompt will be shown as a hover for the disabled group by menu item.

      See also groupByMaxRecordsExceededMessage.

      Returns:
      Current disabledGroupByPrompt value. Default value is "Grouping is not supported for datasets of this size"
    • setDiscardEditsOnHideField

      public ListGrid setDiscardEditsOnHideField(boolean discardEditsOnHideField)
      If a user is editing a canEdit:true listGrid, and they hide a field while the editor is showing, should we discard any edits in the edit row for the field being hidden?

      Default behavior is to discard the edits - set this flag to false to preserve edits

      Parameters:
      discardEditsOnHideField - New discardEditsOnHideField value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getDiscardEditsOnHideField

      public boolean getDiscardEditsOnHideField()
      If a user is editing a canEdit:true listGrid, and they hide a field while the editor is showing, should we discard any edits in the edit row for the field being hidden?

      Default behavior is to discard the edits - set this flag to false to preserve edits

      Returns:
      Current discardEditsOnHideField value. Default value is true
    • setDiscardEditsSaveButtonTitle

      public ListGrid setDiscardEditsSaveButtonTitle(String discardEditsSaveButtonTitle)
      If confirmDiscardEdits is true this is the title for the save button appearing in the lost edits confirmation dialog. Override this for localization if necessary.
      Parameters:
      discardEditsSaveButtonTitle - New discardEditsSaveButtonTitle value. Default value is "Save"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getDiscardEditsSaveButtonTitle

      public String getDiscardEditsSaveButtonTitle()
      If confirmDiscardEdits is true this is the title for the save button appearing in the lost edits confirmation dialog. Override this for localization if necessary.
      Returns:
      Current discardEditsSaveButtonTitle value. Default value is "Save"
      See Also:
    • getDragHandleField

      public ListGridField getDragHandleField() throws IllegalStateException
      An automatically generated field that can be dragged to drag the current selection (where otherwise the grid itself might be scrolled). Visibility is controlled by showInitialDragHandles, showDragHandles(), and hideDragHandles().

      This component is an AutoChild named "dragHandleField". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current dragHandleField value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setDragHandleFieldTitle

      public ListGrid setDragHandleFieldTitle(String dragHandleFieldTitle)
      The title to use for the drag handle field.

      By default this title is not displayed in the drag column header button as the autochild defaults for the field set ListGridField.showTitle to false.

      Note : This is an advanced setting

      Parameters:
      dragHandleFieldTitle - New dragHandleFieldTitle value. Default value is "&nbsp;"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getDragHandleFieldTitle

      public String getDragHandleFieldTitle()
      The title to use for the drag handle field.

      By default this title is not displayed in the drag column header button as the autochild defaults for the field set ListGridField.showTitle to false.

      Returns:
      Current dragHandleFieldTitle value. Default value is "&nbsp;"
      See Also:
    • setDragHandleIcon

      public ListGrid setDragHandleIcon(String dragHandleIcon) throws IllegalStateException
      Default icon to show in the drag handle field..
      Parameters:
      dragHandleIcon - New dragHandleIcon value. Default value is "[SKIN]/actions/drag.png"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDragHandleIcon

      public String getDragHandleIcon()
      Default icon to show in the drag handle field..
      Returns:
      Current dragHandleIcon value. Default value is "[SKIN]/actions/drag.png"
      See Also:
    • setDragHandleIconSize

      public ListGrid setDragHandleIconSize(int dragHandleIconSize)
      Default width and height of drag handle icons for this ListGrid.
      Parameters:
      dragHandleIconSize - New dragHandleIconSize value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getDragHandleIconSize

      public int getDragHandleIconSize()
      Default width and height of drag handle icons for this ListGrid.
      Returns:
      Current dragHandleIconSize value. Default value is 16
      See Also:
    • setDragScrollRedrawDelay

      public ListGrid setDragScrollRedrawDelay(int dragScrollRedrawDelay)
      Like scrollRedrawDelay, but applies when the component is being drag-scrolled (via a scrollbar). This value is typically set higher than scrollRedrawDelay to avoid too many concurrent fetches to the server for ResultSet-backed components since it's quite easy to induce such a case with a scrollbar and a grid bound to a large databaset.
      Parameters:
      dragScrollRedrawDelay - New dragScrollRedrawDelay value. Default value is 75
      Returns:
      ListGrid instance, for chaining setter calls
    • getDragScrollRedrawDelay

      public int getDragScrollRedrawDelay()
      Like scrollRedrawDelay, but applies when the component is being drag-scrolled (via a scrollbar). This value is typically set higher than scrollRedrawDelay to avoid too many concurrent fetches to the server for ResultSet-backed components since it's quite easy to induce such a case with a scrollbar and a grid bound to a large databaset.
      Returns:
      Current dragScrollRedrawDelay value. Default value is 75
    • setDragTrackerMode

      public ListGrid setDragTrackerMode(DragTrackerMode dragTrackerMode) throws IllegalStateException
      When records are being dragged from within a ListGrid, what sort of drag-tracker should be displayed?
      Note that if multiple records are being dragged the displayed tracker will be based on the first selected record.

      Note : This is an advanced setting

      Parameters:
      dragTrackerMode - New dragTrackerMode value. Default value is "icon"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDragTrackerMode

      public DragTrackerMode getDragTrackerMode()
      When records are being dragged from within a ListGrid, what sort of drag-tracker should be displayed?
      Note that if multiple records are being dragged the displayed tracker will be based on the first selected record.
      Returns:
      Current dragTrackerMode value. Default value is "icon"
    • setDrawAheadRatio

      public ListGrid setDrawAheadRatio(float drawAheadRatio)
      How far should we render records ahead of the currently visible area? This is expressed as a ratio from viewport size to rendered area size.

      Tweaking drawAheadRatio allows you to make tradeoffs between continuous scrolling speed vs initial render time and render time when scrolling by large amounts.

      NOTE: Only applies when showAllRecords is false.

      Parameters:
      drawAheadRatio - New drawAheadRatio value. Default value is 2.0
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getDrawAheadRatio

      public float getDrawAheadRatio()
      How far should we render records ahead of the currently visible area? This is expressed as a ratio from viewport size to rendered area size.

      Tweaking drawAheadRatio allows you to make tradeoffs between continuous scrolling speed vs initial render time and render time when scrolling by large amounts.

      NOTE: Only applies when showAllRecords is false.

      Returns:
      Current drawAheadRatio value. Default value is 2.0
      See Also:
    • setDrawAllMaxCells

      public ListGrid setDrawAllMaxCells(int drawAllMaxCells)
      If drawing all rows would cause less than drawAllMaxCells cells to be rendered, the full dataset will instead be drawn even if showAllRecords is false and the viewport size and drawAheadRatio setting would normally have caused incremental rendering to be used.

      The drawAllMaxCells setting prevents incremental rendering from being used in situations where it's really unnecessary, such as a 40 row, 5 column dataset (only 200 cells) which happens to be in a grid with a viewport showing only 20 or so rows. Incremental rendering causes a brief "flash" during scrolling as the visible portion of the dataset is redrawn, and a better scrolling experience can be obtained in this situation by drawing the entire dataset up front, which in this example would have negligible effect on initial draw time.

      drawAllMaxCells:0 disables this features. You may want to disable this feature if performance is an issue and:

      • you are very frequently redraw a grid
      • you do a lot of computation when rendering each cell (eg formulas)
      • you are showing many grids on one screen and the user won't scroll most of them

      Note : This is an advanced setting

      Parameters:
      drawAllMaxCells - New drawAllMaxCells value. Default value is 250
      Returns:
      ListGrid instance, for chaining setter calls
    • getDrawAllMaxCells

      public int getDrawAllMaxCells()
      If drawing all rows would cause less than drawAllMaxCells cells to be rendered, the full dataset will instead be drawn even if showAllRecords is false and the viewport size and drawAheadRatio setting would normally have caused incremental rendering to be used.

      The drawAllMaxCells setting prevents incremental rendering from being used in situations where it's really unnecessary, such as a 40 row, 5 column dataset (only 200 cells) which happens to be in a grid with a viewport showing only 20 or so rows. Incremental rendering causes a brief "flash" during scrolling as the visible portion of the dataset is redrawn, and a better scrolling experience can be obtained in this situation by drawing the entire dataset up front, which in this example would have negligible effect on initial draw time.

      drawAllMaxCells:0 disables this features. You may want to disable this feature if performance is an issue and:

      • you are very frequently redraw a grid
      • you do a lot of computation when rendering each cell (eg formulas)
      • you are showing many grids on one screen and the user won't scroll most of them
      Returns:
      Current drawAllMaxCells value. Default value is 250
    • setEditByCell

      public ListGrid setEditByCell(Boolean editByCell)
      Determines whether when the user edits a cell in this listGrid the entire row becomes editable, or just the cell that received the edit event.

      No effect if this.canEdit is false or null.

      Parameters:
      editByCell - New editByCell value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEditByCell

      public Boolean getEditByCell()
      Determines whether when the user edits a cell in this listGrid the entire row becomes editable, or just the cell that received the edit event.

      No effect if this.canEdit is false or null.

      Returns:
      Current editByCell value. Default value is null
      See Also:
    • setEditEvent

      public ListGrid setEditEvent(ListGridEditEvent editEvent)
      Event that will trigger inline editing, see ListGridEditEvent for options.

      Note this setting has no effect unless canEdit has been set to enable editing.

      See also editOnFocus and startEditing().

      Parameters:
      editEvent - New editEvent value. Default value is "doubleClick"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEditEvent

      public ListGridEditEvent getEditEvent()
      Event that will trigger inline editing, see ListGridEditEvent for options.

      Note this setting has no effect unless canEdit has been set to enable editing.

      See also editOnFocus and startEditing().

      Returns:
      Current editEvent value. Default value is "doubleClick"
      See Also:
    • setEditFailedBaseStyle

      public ListGrid setEditFailedBaseStyle(String editFailedBaseStyle)
      A base name for the CSS class applied to cells when editing has failed.
      If this listGrid is editable, this style will be applied to any edited cells for which validation failed.
      As with the default 'baseStyle' property, this style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.
      If null, cells for which editing has failed will be rendered using the normal base style classNames, but with custom CSSText applied as derived from this.editFailedCSSText

      Note : This is an advanced setting

      Parameters:
      editFailedBaseStyle - New editFailedBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEditFailedBaseStyle

      public String getEditFailedBaseStyle()
      A base name for the CSS class applied to cells when editing has failed.
      If this listGrid is editable, this style will be applied to any edited cells for which validation failed.
      As with the default 'baseStyle' property, this style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.
      If null, cells for which editing has failed will be rendered using the normal base style classNames, but with custom CSSText applied as derived from this.editFailedCSSText
      Returns:
      Current editFailedBaseStyle value. Default value is null
      See Also:
    • setEditFailedCSSText

      public ListGrid setEditFailedCSSText(String editFailedCSSText)
      Custom CSS text to be applied to cells when editing has failed.
      If this listGrid is editable, this css text will be applied to any edited cells for which validation failed, on top of the base style for the cell.
      For further customization of styling for cells that failed editing validation, use this.editFailedBaseStyle instead.

      Note : This is an advanced setting

      Parameters:
      editFailedCSSText - New editFailedCSSText value. Default value is "color:red;border:1px solid red;"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEditFailedCSSText

      public String getEditFailedCSSText()
      Custom CSS text to be applied to cells when editing has failed.
      If this listGrid is editable, this css text will be applied to any edited cells for which validation failed, on top of the base style for the cell.
      For further customization of styling for cells that failed editing validation, use this.editFailedBaseStyle instead.
      Returns:
      Current editFailedCSSText value. Default value is "color:red;border:1px solid red;"
      See Also:
    • setEditOnF2Keypress

      public ListGrid setEditOnF2Keypress(Boolean editOnF2Keypress)
      Should we start editing when the widget has focus and the user presses the "f2" key (if this ListGrid supports editing)?

      Note that if editEvent is set to "click" or "doubleClick", the Space or Enter key may also be used to start editing, depending on the value for generateClickOnSpace, generateDoubleClickOnSpace, generateClickOnEnter and generateDoubleClickOnEnter.

      If canEdit is false, or editEvent is set to "none" this property has no effect.

      Note : This is an advanced setting

      Parameters:
      editOnF2Keypress - New editOnF2Keypress value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEditOnF2Keypress

      public Boolean getEditOnF2Keypress()
      Should we start editing when the widget has focus and the user presses the "f2" key (if this ListGrid supports editing)?

      Note that if editEvent is set to "click" or "doubleClick", the Space or Enter key may also be used to start editing, depending on the value for generateClickOnSpace, generateDoubleClickOnSpace, generateClickOnEnter and generateDoubleClickOnEnter.

      If canEdit is false, or editEvent is set to "none" this property has no effect.

      Returns:
      Current editOnF2Keypress value. Default value is true
      See Also:
    • setEditOnFocus

      public ListGrid setEditOnFocus(Boolean editOnFocus)
      Should we start editing when this widget receives focus (if this ListGrid supports editing)?

      Note that this property being set to true will cause editing to occur on a single click, even if editEvent is "doubleClick", because single clicking the grid will place keyboard focus there automatically.

      If this property is set together with listEndEditAction being set to "next", users can create a new edit row in an empty grid by simply tabbing into the grid.

      Note : This is an advanced setting

      Parameters:
      editOnFocus - New editOnFocus value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEditOnFocus

      public Boolean getEditOnFocus()
      Should we start editing when this widget receives focus (if this ListGrid supports editing)?

      Note that this property being set to true will cause editing to occur on a single click, even if editEvent is "doubleClick", because single clicking the grid will place keyboard focus there automatically.

      If this property is set together with listEndEditAction being set to "next", users can create a new edit row in an empty grid by simply tabbing into the grid.

      Returns:
      Current editOnFocus value. Default value is null
      See Also:
    • setEditPendingBaseStyle

      public ListGrid setEditPendingBaseStyle(String editPendingBaseStyle) throws IllegalStateException
      A base name for the CSS class applied to cells containing pending (unsaved) edits
      As with the default 'baseStyle' property, this style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      If this property is null (the default setting), cells with pending edits will pick up custom css text to be applied on top of the normal base style from this.editPendingCSSText.

      Note : This is an advanced setting

      Parameters:
      editPendingBaseStyle - New editPendingBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEditPendingBaseStyle

      public String getEditPendingBaseStyle()
      A base name for the CSS class applied to cells containing pending (unsaved) edits
      As with the default 'baseStyle' property, this style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      If this property is null (the default setting), cells with pending edits will pick up custom css text to be applied on top of the normal base style from this.editPendingCSSText.

      Returns:
      Current editPendingBaseStyle value. Default value is null
      See Also:
    • setEditPendingCSSText

      public ListGrid setEditPendingCSSText(String editPendingCSSText)
      Custom CSS text to be applied to cells with pending edits that have not yet been submitted.
      For further customization of styling for cells with pending edits use this.editPendingBaseStyle instead.

      Note : This is an advanced setting

      Parameters:
      editPendingCSSText - New editPendingCSSText value. Default value is "color:#0066CC;"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEditPendingCSSText

      public String getEditPendingCSSText()
      Custom CSS text to be applied to cells with pending edits that have not yet been submitted.
      For further customization of styling for cells with pending edits use this.editPendingBaseStyle instead.
      Returns:
      Current editPendingCSSText value. Default value is "color:#0066CC;"
      See Also:
    • setEditPendingMarkerStyle

      public ListGrid setEditPendingMarkerStyle(String editPendingMarkerStyle)
      The name of a CSS class used to overlay regular cell styles with additional styling when a cell has unsaved edits - these styles are in addition to the styling applied by editPendingCSSText or editPendingBaseStyle.

      You can use a custom class that overlays styling of your choosing, or use the default pendingMarker class which is present in modern skins and provides a small corner-marker in the top-left of unsaved cells.

      Once set, this styleName is automatically appended to the style-list for cells with unsaved edits.

      Note : This is an advanced setting

      Parameters:
      editPendingMarkerStyle - New editPendingMarkerStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEditPendingMarkerStyle

      public String getEditPendingMarkerStyle()
      The name of a CSS class used to overlay regular cell styles with additional styling when a cell has unsaved edits - these styles are in addition to the styling applied by editPendingCSSText or editPendingBaseStyle.

      You can use a custom class that overlays styling of your choosing, or use the default pendingMarker class which is present in modern skins and provides a small corner-marker in the top-left of unsaved cells.

      Once set, this styleName is automatically appended to the style-list for cells with unsaved edits.

      Returns:
      Current editPendingMarkerStyle value. Default value is null
      See Also:
    • setEditProxyConstructor

      public ListGrid setEditProxyConstructor(String editProxyConstructor) throws IllegalStateException
      Default class used to construct the EditProxy for this component when the component is first placed into edit mode.
      Overrides:
      setEditProxyConstructor in class Layout
      Parameters:
      editProxyConstructor - New editProxyConstructor value. Default value is "GridEditProxy"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEditProxyConstructor

      public String getEditProxyConstructor()
      Default class used to construct the EditProxy for this component when the component is first placed into edit mode.
      Overrides:
      getEditProxyConstructor in class Layout
      Returns:
      Current editProxyConstructor value. Default value is "GridEditProxy"
      See Also:
    • setEditSelectionType

      public ListGrid setEditSelectionType(SelectionStyle editSelectionType)
      If selectOnEdit is true, what should be the edit-selection behavior be?

      Default setting of "single" will cause the edit row to be automatically selected and any other selection in the grid to be dropped.
      If set to "multiple", selection will be additive (as a record goes into edit mode, it is selected in addition to any pre-existant selection).

      If set to null behavior is as follows:

      • For grids with selectionType set to "simple" edit rows will be selected additively - this is the same behavior as if the editSelectionType was "multiple"
      • Otherwise edit rows will be selected singly - this is the same behavior as if the editSelectionType was "single"
      Parameters:
      editSelectionType - New editSelectionType value. Default value is "single"
      Returns:
      ListGrid instance, for chaining setter calls
    • getEditSelectionType

      public SelectionStyle getEditSelectionType()
      If selectOnEdit is true, what should be the edit-selection behavior be?

      Default setting of "single" will cause the edit row to be automatically selected and any other selection in the grid to be dropped.
      If set to "multiple", selection will be additive (as a record goes into edit mode, it is selected in addition to any pre-existant selection).

      If set to null behavior is as follows:

      • For grids with selectionType set to "simple" edit rows will be selected additively - this is the same behavior as if the editSelectionType was "multiple"
      • Otherwise edit rows will be selected singly - this is the same behavior as if the editSelectionType was "single"
      Returns:
      Current editSelectionType value. Default value is "single"
    • setEmbeddedComponentIndent

      public ListGrid setEmbeddedComponentIndent(Integer embeddedComponentIndent)
      This is the pixel-amount by which child components are offset within the grid-body, by default from the left, or from the right when RTL is in effect. For expanding rows, this attribute is overridden by expansionIndent.

      This setting overrides the general margin for embedded-components, on the appropriate side.

      Parameters:
      embeddedComponentIndent - New embeddedComponentIndent value. Default value is 25
      Returns:
      ListGrid instance, for chaining setter calls
    • getEmbeddedComponentIndent

      public Integer getEmbeddedComponentIndent()
      This is the pixel-amount by which child components are offset within the grid-body, by default from the left, or from the right when RTL is in effect. For expanding rows, this attribute is overridden by expansionIndent.

      This setting overrides the general margin for embedded-components, on the appropriate side.

      Returns:
      Current embeddedComponentIndent value. Default value is 25
    • setEmbeddedComponentMargin

      public ListGrid setEmbeddedComponentMargin(Integer embeddedComponentMargin)
      This is the space to apply as margin around child-components embedded in this grid. This value is overridden on one side for expansion components by expansionIndent and in other scenarios by embeddedComponentIndent.
      Parameters:
      embeddedComponentMargin - New embeddedComponentMargin value. Default value is 0
      Returns:
      ListGrid instance, for chaining setter calls
    • getEmbeddedComponentMargin

      public Integer getEmbeddedComponentMargin()
      This is the space to apply as margin around child-components embedded in this grid. This value is overridden on one side for expansion components by expansionIndent and in other scenarios by embeddedComponentIndent.
      Returns:
      Current embeddedComponentMargin value. Default value is 0
    • setEmptyAIHoverContents

      public ListGrid setEmptyAIHoverContents(String emptyAIHoverContents)
      Hover contents to use when the AI-generated hover text is empty.
      Parameters:
      emptyAIHoverContents - New emptyAIHoverContents value. Default value is "(Empty)"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEmptyAIHoverContents

      public String getEmptyAIHoverContents()
      Hover contents to use when the AI-generated hover text is empty.
      Returns:
      Current emptyAIHoverContents value. Default value is "(Empty)"
      See Also:
    • setEmptyCellValue

      public ListGrid setEmptyCellValue(String emptyCellValue)
      The value to display for cells whose value is null or the empty string after applying formatting and valueMap (if any).

      This is the grid-wide attribute. You may also set the ListGridField.emptyCellValue on a per-field basis.

      Parameters:
      emptyCellValue - New emptyCellValue value. Default value is "&nbsp;"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEmptyCellValue

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

      This is the grid-wide attribute. You may also set the ListGridField.emptyCellValue on a per-field basis.

      Returns:
      Current emptyCellValue value. Default value is "&nbsp;"
      See Also:
    • setEmptyMessage

      public ListGrid setEmptyMessage(String emptyMessage)
      The string to display in the body of a listGrid with an empty data array, if showEmptyMessage is true.
      Parameters:
      emptyMessage - New emptyMessage value. Default value is "No items to show."
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEmptyMessage

      public String getEmptyMessage()
      The string to display in the body of a listGrid with an empty data array, if showEmptyMessage is true.
      Returns:
      Current emptyMessage value. Default value is "No items to show."
      See Also:
    • setEmptyMessageStyle

      public ListGrid setEmptyMessageStyle(String emptyMessageStyle)
      The CSS style name applied to the emptyMessage if displayed.
      Parameters:
      emptyMessageStyle - New emptyMessageStyle value. Default value is "emptyMessage"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEmptyMessageStyle

      public String getEmptyMessageStyle()
      The CSS style name applied to the emptyMessage if displayed.
      Returns:
      Current emptyMessageStyle value. Default value is "emptyMessage"
      See Also:
    • setEmptyRowRangeDisplayValue

      public ListGrid setEmptyRowRangeDisplayValue(String emptyRowRangeDisplayValue)
      Row range summary display value when the grid is empty.
      Parameters:
      emptyRowRangeDisplayValue - New emptyRowRangeDisplayValue value. Default value is "&nbsp;"
      Returns:
      ListGrid instance, for chaining setter calls
    • getEmptyRowRangeDisplayValue

      public String getEmptyRowRangeDisplayValue()
      Row range summary display value when the grid is empty.
      Returns:
      Current emptyRowRangeDisplayValue value. Default value is "&nbsp;"
    • setEnforceVClipping

      public ListGrid setEnforceVClipping(Boolean enforceVClipping)
      For performance reasons, even when fixedRecordHeights is set, vertical clipping is not enforced by default for some kinds of content (such as images) on all browsers. Set enforceVClipping:true to enforce clipping for all types of content on all browsers.

      This additional setting is likely to be phased out as browsers improve.

      Parameters:
      enforceVClipping - New enforceVClipping value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getEnforceVClipping

      public Boolean getEnforceVClipping()
      For performance reasons, even when fixedRecordHeights is set, vertical clipping is not enforced by default for some kinds of content (such as images) on all browsers. Set enforceVClipping:true to enforce clipping for all types of content on all browsers.

      This additional setting is likely to be phased out as browsers improve.

      Returns:
      Current enforceVClipping value. Default value is false
    • setEnterKeyEditAction

      public ListGrid setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
      What to do when a user hits enter while editing a cell:
      • "nextCell": start editing the next editable cell in this record (or the first editable cell in the next record if focus is in the last editable cell in the row)
      • "nextRow": start editing the same field in the next row (skipping any rows where that would be a non-editable cell.
      • "nextRowStart": start editing the first editable cell in the next row.
      • "done": hide the editor (editing is complete)
      Note that if this.autoSaveEdits is true, this may cause a save of the current edit values
      Parameters:
      enterKeyEditAction - New enterKeyEditAction value. Default value is "done"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEnterKeyEditAction

      public EnterKeyEditAction getEnterKeyEditAction()
      What to do when a user hits enter while editing a cell:
      • "nextCell": start editing the next editable cell in this record (or the first editable cell in the next record if focus is in the last editable cell in the row)
      • "nextRow": start editing the same field in the next row (skipping any rows where that would be a non-editable cell.
      • "nextRowStart": start editing the first editable cell in the next row.
      • "done": hide the editor (editing is complete)
      Note that if this.autoSaveEdits is true, this may cause a save of the current edit values
      Returns:
      Current enterKeyEditAction value. Default value is "done"
      See Also:
    • setEnumCriteriaAsInitialValues

      public ListGrid setEnumCriteriaAsInitialValues(Boolean enumCriteriaAsInitialValues) throws IllegalStateException
      In a ListGrid that has a DataSource and has filter criteria that include values for fields declared as type "enum" in the DataSource, by default a newly edited row will use those filter criteria as initial values.

      For example, if a ListGrid is showing all Accounts that have status:"Active" and a new row is created, the new row will default to status:"Active" unless this flag is set to false.

      Parameters:
      enumCriteriaAsInitialValues - New enumCriteriaAsInitialValues value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEnumCriteriaAsInitialValues

      public Boolean getEnumCriteriaAsInitialValues()
      In a ListGrid that has a DataSource and has filter criteria that include values for fields declared as type "enum" in the DataSource, by default a newly edited row will use those filter criteria as initial values.

      For example, if a ListGrid is showing all Accounts that have status:"Active" and a new row is created, the new row will default to status:"Active" unless this flag is set to false.

      Returns:
      Current enumCriteriaAsInitialValues value. Default value is true
      See Also:
    • setErrorIconHeight

      public ListGrid setErrorIconHeight(Integer errorIconHeight)
      Height of the error icon, if we're showing icons when validation errors occur.
      Parameters:
      errorIconHeight - New errorIconHeight value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
    • getErrorIconHeight

      public Integer getErrorIconHeight()
      Height of the error icon, if we're showing icons when validation errors occur.
      Returns:
      Current errorIconHeight value. Default value is 16
    • setErrorIconSrc

      public ListGrid setErrorIconSrc(String errorIconSrc)
      Src of the image to show as an error icon, if we're showing icons when validation errors occur.
      Parameters:
      errorIconSrc - New errorIconSrc value. Default value is "[SKIN]/ListGrid/validation_error_icon.png"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getErrorIconSrc

      public String getErrorIconSrc()
      Src of the image to show as an error icon, if we're showing icons when validation errors occur.
      Returns:
      Current errorIconSrc value. Default value is "[SKIN]/ListGrid/validation_error_icon.png"
      See Also:
    • setErrorIconWidth

      public ListGrid setErrorIconWidth(Integer errorIconWidth)
      Height of the error icon, if we're showing icons when validation errors occur.
      Parameters:
      errorIconWidth - New errorIconWidth value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
    • getErrorIconWidth

      public Integer getErrorIconWidth()
      Height of the error icon, if we're showing icons when validation errors occur.
      Returns:
      Current errorIconWidth value. Default value is 16
    • setEscapeKeyEditAction

      public ListGrid setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
      What to do when a user hits escape while editing a cell:
      • "cancel": close the editor and discard the current set of edit values
      • "done": just close the editor (the edit is complete, but the edited values are retained).
      Note that if autoSaveEdits is true, this may cause a save of the current edit values
      Parameters:
      escapeKeyEditAction - New escapeKeyEditAction value. Default value is "cancel"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getEscapeKeyEditAction

      public EscapeKeyEditAction getEscapeKeyEditAction()
      What to do when a user hits escape while editing a cell:
      • "cancel": close the editor and discard the current set of edit values
      • "done": just close the editor (the edit is complete, but the edited values are retained).
      Note that if autoSaveEdits is true, this may cause a save of the current edit values
      Returns:
      Current escapeKeyEditAction value. Default value is "cancel"
      See Also:
    • setExactRowCountFormat

      public ListGrid setExactRowCountFormat(String exactRowCountFormat)
      Format for the string returned from getFormattedRowCount() when row count status is "exact".

      The variable rowCount is available for evaluation within this string and will be set to the current row count as a locale-formatted number.

      Parameters:
      exactRowCountFormat - New exactRowCountFormat value. Default value is "${rowCount}"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getExactRowCountFormat

      public String getExactRowCountFormat()
      Format for the string returned from getFormattedRowCount() when row count status is "exact".

      The variable rowCount is available for evaluation within this string and will be set to the current row count as a locale-formatted number.

      Returns:
      Current exactRowCountFormat value. Default value is "${rowCount}"
      See Also:
    • setExpansionCanEdit

      public ListGrid setExpansionCanEdit(Boolean expansionCanEdit)
      For expansionModes that show another grid or tree, is that component editable?

      The default value for this property is false.

      Note : This is an advanced setting

      Parameters:
      expansionCanEdit - New expansionCanEdit value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getExpansionCanEdit

      public Boolean getExpansionCanEdit()
      For expansionModes that show another grid or tree, is that component editable?

      The default value for this property is false.

      Returns:
      Current expansionCanEdit value. Default value is null
    • setExpansionComponentPoolingMode

      public ListGrid setExpansionComponentPoolingMode(ExpansionComponentPoolingMode expansionComponentPoolingMode)
      The method of component-pooling to employ for expansionComponents.

      The default mode is "destroy", which means that automatically created expansionComponents are destroyed when rows are collapsed.

      Note : This is an advanced setting

      Parameters:
      expansionComponentPoolingMode - New expansionComponentPoolingMode value. Default value is "destroy"
      Returns:
      ListGrid instance, for chaining setter calls
    • getExpansionComponentPoolingMode

      public ExpansionComponentPoolingMode getExpansionComponentPoolingMode()
      The method of component-pooling to employ for expansionComponents.

      The default mode is "destroy", which means that automatically created expansionComponents are destroyed when rows are collapsed.

      Returns:
      Current expansionComponentPoolingMode value. Default value is "destroy"
    • getExpansionDetailField

      public HTMLFlow getExpansionDetailField()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Automatically generated HTMLFlow for displaying the contents of a specified field in a record's expanded section when listGrid.expansionMode is detailField.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via listGrid.expansionDetailFieldProperties and listGrid.expansionDetailFieldDefaults.

      Note, however, that this is a multi-instance component (potentially one per record), so it is created using createAutoChild() not addAutoChild(), and no default single instance is created by name on the grid.

      Returns:
      null
    • getExpansionDetailRelated

      public HLayout getExpansionDetailRelated()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Automatically generated HLayout appearing in a record's expanded section when listGrid.expansionMode is detailRelated. This component contains two other autoChild components, a DetailViewer for viewing fields from the record which are not already present in the grid and a separate embedded ListGrid for displaying other data related to this record via record.detailDS. See expansionDetails and expansionRelated for more information.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via listGrid.expansionDetailRelatedProperties and listGrid.expansionDetailRelatedDefaults.

      Note, however, that this is a multi-instance component (potentially one per record), so it is created using createAutoChild() not addAutoChild(), and no default single instance is created by name on the grid.

      Returns:
      null
    • getExpansionDetails

      public DetailViewer getExpansionDetails()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Automatically generated DetailViewer for displaying the details of a record in its expanded section when listGrid.expansionMode is details. Note that only those fields which do not already appear in the grid are displayed in the expanded section.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via listGrid.expansionDetailsProperties and listGrid.expansionDetailsDefaults.

      Note, however, that this is a multi-instance component (potentially one per record), so it is created using createAutoChild() not addAutoChild(), and no default single instance is created by name on the grid.

      Returns:
      null
    • getExpansionEditor

      public DynamicForm getExpansionEditor()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Automatically generated DynamicForm for editing the details of a record in its expanded section when listGrid.expansionMode is editor. Note that only those fields which do not already appear in the grid will appear in the expanded section.

      According to the value of showExpansionEditorSaveButton, a save button is shown beneath the editor. You can save the values in the editor by clicking this button

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via listGrid.expansionEditorProperties and listGrid.expansionEditorDefaults.

      Note, however, that this is a multi-instance component (potentially one per record), so it is created using createAutoChild() not addAutoChild(), and no default single instance is created by name on the grid.

      Returns:
      null
    • getExpansionEditorCollapseOnSave

      public Boolean getExpansionEditorCollapseOnSave() throws IllegalStateException
      When ExpansionMode is editor, should the row be collapsed following a save initiated by the expansion-component's save button.

      Note : This method should be called only after the widget has been rendered.

      Returns:
      Current expansionEditorCollapseOnSave value. Default value is true
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getExpansionEditorSaveButton

      public IButton getExpansionEditorSaveButton()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Automatically generated IButton for saving the values in the expanded portion of a ListGrid row.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via listGrid.expansionEditorSaveButtonProperties and listGrid.expansionEditorSaveButtonDefaults.

      Note, however, that this is a multi-instance component (potentially one per record), so it is created using createAutoChild() not addAutoChild(), and no default single instance is created by name on the grid.

      Returns:
      null
    • getExpansionEditorSaveButtonTitle

      public String getExpansionEditorSaveButtonTitle() throws IllegalStateException
      The title for the expansionEditorSaveButton.

      Note : This method should be called only after the widget has been rendered.

      Returns:
      Current expansionEditorSaveButtonTitle value. Default value is "Save"
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setExpansionEditorSaveDialogPrompt

      public ListGrid setExpansionEditorSaveDialogPrompt(String expansionEditorSaveDialogPrompt) throws IllegalStateException
      When canExpandRecords is true and expansionMode is editor, the prompt to display in a dialog when an expanded row is collapsed while it's nested editor has changed values.
      Parameters:
      expansionEditorSaveDialogPrompt - New expansionEditorSaveDialogPrompt value. Default value is "You have unsaved changes - do you want to save them now?"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExpansionEditorSaveDialogPrompt

      public String getExpansionEditorSaveDialogPrompt()
      When canExpandRecords is true and expansionMode is editor, the prompt to display in a dialog when an expanded row is collapsed while it's nested editor has changed values.
      Returns:
      Current expansionEditorSaveDialogPrompt value. Default value is "You have unsaved changes - do you want to save them now?"
    • setExpansionEditorShowSaveDialog

      public ListGrid setExpansionEditorShowSaveDialog(Boolean expansionEditorShowSaveDialog) throws IllegalStateException
      When canExpandRecords is true and expansionMode is editor, whether a dialog should be displayed when an expanded row is collapsed while it's nested editor has changed values.
      Parameters:
      expansionEditorShowSaveDialog - New expansionEditorShowSaveDialog value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExpansionEditorShowSaveDialog

      public Boolean getExpansionEditorShowSaveDialog()
      When canExpandRecords is true and expansionMode is editor, whether a dialog should be displayed when an expanded row is collapsed while it's nested editor has changed values.
      Returns:
      Current expansionEditorShowSaveDialog value. Default value is null
    • getExpansionField

      public ListGridField getExpansionField() throws IllegalStateException
      The field providing the facility to expand and collapse rows.

      This component is an AutoChild named "expansionField". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Returns the specially generated expansion field used when canExpandRecords is true.

      Called during setFields(), this method can be overridden to add advanced dynamic defaults to the expansion field (call Super, modify the default field returned by Super, return the modified field). Normal customization can be handled by just setting com.smartgwt.client.types.AutoChild properties, as mentioned under the docs for expansionField. Default value is null

      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setExpansionFieldFalseImage

      public ListGrid setExpansionFieldFalseImage(String expansionFieldFalseImage)
      If canExpandRecords is set to true, this property determines the image to display in the expansion field for collapsed rows. If unset, the booleanFalseImage will be used.

      Note : This is an advanced setting

      Parameters:
      expansionFieldFalseImage - New expansionFieldFalseImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getExpansionFieldFalseImage

      public String getExpansionFieldFalseImage()
      If canExpandRecords is set to true, this property determines the image to display in the expansion field for collapsed rows. If unset, the booleanFalseImage will be used.
      Returns:
      Current expansionFieldFalseImage value. Default value is null
      See Also:
    • setExpansionFieldImageHeight

      public ListGrid setExpansionFieldImageHeight(Integer expansionFieldImageHeight) throws IllegalStateException
      If canExpandRecords is set to true, this property may be set to govern the height of the expansion image displayed to indicate whether a row is expanded. If unset, the expansionField image will be sized to match the booleanImageHeight for this grid.
      Parameters:
      expansionFieldImageHeight - New expansionFieldImageHeight value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExpansionFieldImageHeight

      public Integer getExpansionFieldImageHeight()
      If canExpandRecords is set to true, this property may be set to govern the height of the expansion image displayed to indicate whether a row is expanded. If unset, the expansionField image will be sized to match the booleanImageHeight for this grid.
      Returns:
      Current expansionFieldImageHeight value. Default value is null
    • setExpansionFieldImageShowRTL

      public ListGrid setExpansionFieldImageShowRTL(boolean expansionFieldImageShowRTL) throws IllegalStateException
      If this grid is in RTL mode, should an "_rtl" suffix be added to the expansionFieldTrueImage and expansionFieldFalseImage image URLs? This should only be enabled if RTL media for the true and false expansion field images are available.

      If both this property and expansionFieldImageShowSelected are true, and the grid is in RTL mode, both suffixes will be applied to selected rows' expansion field images (combined as "selected_rtl").

      Note : This is an advanced setting

      Parameters:
      expansionFieldImageShowRTL - New expansionFieldImageShowRTL value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExpansionFieldImageShowRTL

      public boolean getExpansionFieldImageShowRTL()
      If this grid is in RTL mode, should an "_rtl" suffix be added to the expansionFieldTrueImage and expansionFieldFalseImage image URLs? This should only be enabled if RTL media for the true and false expansion field images are available.

      If both this property and expansionFieldImageShowSelected are true, and the grid is in RTL mode, both suffixes will be applied to selected rows' expansion field images (combined as "selected_rtl").

      Returns:
      Current expansionFieldImageShowRTL value. Default value is false
    • setExpansionFieldImageShowSelected

      public ListGrid setExpansionFieldImageShowSelected(boolean expansionFieldImageShowSelected) throws IllegalStateException
      Should a "_selected" suffix be added to the expansionFieldTrueImage and expansionFieldFalseImage image URLs for selected rows?

      This allows developers to provide separate expansion field media for selected rows, in case the selected row style does not contrast well with the standard expansion field image media.

      If both this property and expansionFieldImageShowRTL are true, and the grid is in RTL mode, both suffixes will be applied to selected rows' expansion field image (combined as "selected_rtl")

      Note : This is an advanced setting

      Parameters:
      expansionFieldImageShowSelected - New expansionFieldImageShowSelected value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExpansionFieldImageShowSelected

      public boolean getExpansionFieldImageShowSelected()
      Should a "_selected" suffix be added to the expansionFieldTrueImage and expansionFieldFalseImage image URLs for selected rows?

      This allows developers to provide separate expansion field media for selected rows, in case the selected row style does not contrast well with the standard expansion field image media.

      If both this property and expansionFieldImageShowRTL are true, and the grid is in RTL mode, both suffixes will be applied to selected rows' expansion field image (combined as "selected_rtl")

      Returns:
      Current expansionFieldImageShowSelected value. Default value is false
    • setExpansionFieldImageStyle

      public ListGrid setExpansionFieldImageStyle(String expansionFieldImageStyle)
      Custom style to apply to the image in the expansionField displayed in collapsible rows when canExpandRecords is true. Affects the icons provided by expansionFieldTrueImage and expansionFieldFalseImage.
      Parameters:
      expansionFieldImageStyle - New expansionFieldImageStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getExpansionFieldImageStyle

      public String getExpansionFieldImageStyle()
      Custom style to apply to the image in the expansionField displayed in collapsible rows when canExpandRecords is true. Affects the icons provided by expansionFieldTrueImage and expansionFieldFalseImage.
      Returns:
      Current expansionFieldImageStyle value. Default value is null
      See Also:
    • setExpansionFieldImageWidth

      public ListGrid setExpansionFieldImageWidth(Integer expansionFieldImageWidth) throws IllegalStateException
      If canExpandRecords is set to true, this property may be set to govern the width of the expansion image displayed to indicate whether a row is expanded. If unset, the expansionField image will be sized to match the booleanImageWidth for this grid.
      Parameters:
      expansionFieldImageWidth - New expansionFieldImageWidth value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExpansionFieldImageWidth

      public Integer getExpansionFieldImageWidth()
      If canExpandRecords is set to true, this property may be set to govern the width of the expansion image displayed to indicate whether a row is expanded. If unset, the expansionField image will be sized to match the booleanImageWidth for this grid.
      Returns:
      Current expansionFieldImageWidth value. Default value is null
    • setExpansionFieldTrueImage

      public ListGrid setExpansionFieldTrueImage(String expansionFieldTrueImage)
      If canExpandRecords is set to true, this property determines the image to display in the expansion field for expanded rows. If unset, the booleanTrueImage will be used.

      Note : This is an advanced setting

      Parameters:
      expansionFieldTrueImage - New expansionFieldTrueImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getExpansionFieldTrueImage

      public String getExpansionFieldTrueImage()
      If canExpandRecords is set to true, this property determines the image to display in the expansion field for expanded rows. If unset, the booleanTrueImage will be used.
      Returns:
      Current expansionFieldTrueImage value. Default value is null
      See Also:
    • setExpansionIndent

      public ListGrid setExpansionIndent(Integer expansionIndent)
      When canExpandRecords is true, this is the pixel-amount by which child components are offset within the grid-body, by default from the left, or from the right when RTL is in effect. If unset, assumes the width of the expansionField, so that child components line up with the following field, according to RTL.

      This setting overrides the general indent for embedded-components, on the appropriate side.

      Parameters:
      expansionIndent - New expansionIndent value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getExpansionIndent

      public Integer getExpansionIndent()
      When canExpandRecords is true, this is the pixel-amount by which child components are offset within the grid-body, by default from the left, or from the right when RTL is in effect. If unset, assumes the width of the expansionField, so that child components line up with the following field, according to RTL.

      This setting overrides the general indent for embedded-components, on the appropriate side.

      Returns:
      Current expansionIndent value. Default value is null
    • getExpansionLayout

      public VLayout getExpansionLayout()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Automatically generated VLayout which fills a record's expanded section and contains other builtin expansion-components. You can also override getExpansionComponent() to provide components of your own specification.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via listGrid.expansionLayoutProperties and listGrid.expansionLayoutDefaults.

      Note, however, that this is a multi-instance component (potentially one per record), so it is created using createAutoChild() not addAutoChild(), and no default single instance is created by name on the grid.

      Returns:
      null
    • setExpansionMode

      public ListGrid setExpansionMode(ExpansionMode expansionMode)
      The ExpansionMode for records in this grid.

      If canExpandRecords is true but expansionMode is not set, it defaults to "detailRelated" if detailDS is set, or to "details" otherwise.

      Parameters:
      expansionMode - New expansionMode value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getExpansionMode

      public ExpansionMode getExpansionMode()
      The ExpansionMode for records in this grid.

      If canExpandRecords is true but expansionMode is not set, it defaults to "detailRelated" if detailDS is set, or to "details" otherwise.

      Returns:
      Current expansionMode value. Default value is null
    • getExpansionRelated

      public ListGrid getExpansionRelated()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Automatically generated ListGrid for displaying data related to a record in its expanded section when listGrid.expansionMode is related. The DataSource containing the related data is provided by getRelatedDataSource() which, by default, returns the DataSource referred to in ListGridRecord.detailDS.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via listGrid.expansionRelatedProperties and listGrid.expansionRelatedDefaults.

      Note, however, that this is a multi-instance component (potentially one per record), so it is created using createAutoChild() not addAutoChild(), and no default single instance is created by name on the grid.

      Returns:
      null
    • setExpansionScreen

      public ListGrid setExpansionScreen(String expansionScreen) throws IllegalStateException
      Screen to create (via createScreen()) in lieu of calling getExpansionComponent().

      If this grid has a dataSource, the created screen is provided with a Canvas.dataContext that includes the record being expanded. Be sure the expansion screen meets these requirements to utilize the dataContext.

      Parameters:
      expansionScreen - New expansionScreen value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExpansionScreen

      public String getExpansionScreen()
      Screen to create (via createScreen()) in lieu of calling getExpansionComponent().

      If this grid has a dataSource, the created screen is provided with a Canvas.dataContext that includes the record being expanded. Be sure the expansion screen meets these requirements to utilize the dataContext.

      Returns:
      Current expansionScreen value. Default value is null
    • setExplicitFetchDelay

      public ListGrid setExplicitFetchDelay(int explicitFetchDelay)
      If we're showing the filterEditor (showFilterEditor is true), this property determines the delay in kicking off the filter request if the current filter values are submitted by clicking the filter button or hitting return. By default, this property is set to zero so that a filter request is immediately sent.

      Note : This is an advanced setting

      Parameters:
      explicitFetchDelay - New explicitFetchDelay value. Default value is 0
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getExplicitFetchDelay

      public int getExplicitFetchDelay()
      If we're showing the filterEditor (showFilterEditor is true), this property determines the delay in kicking off the filter request if the current filter values are submitted by clicking the filter button or hitting return. By default, this property is set to zero so that a filter request is immediately sent.
      Returns:
      Current explicitFetchDelay value. Default value is 0
      See Also:
    • setExportAlternateRowBGColor

      public ListGrid setExportAlternateRowBGColor(String exportAlternateRowBGColor) throws IllegalStateException
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), background color to use for even-numbered rows, to create a "banded" or "ledger" effect. Odd-numbered rows will use the exportDefaultBGColor.

      See ExportBGColor for an overview.

      Parameters:
      exportAlternateRowBGColor - New exportAlternateRowBGColor value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getExportAlternateRowBGColor

      public String getExportAlternateRowBGColor()
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), background color to use for even-numbered rows, to create a "banded" or "ledger" effect. Odd-numbered rows will use the exportDefaultBGColor.

      See ExportBGColor for an overview.

      Returns:
      Current exportAlternateRowBGColor value. Default value is null
      See Also:
    • setExportDefaultBGColor

      public ListGrid setExportDefaultBGColor(String exportDefaultBGColor) throws IllegalStateException
      Default background color to use when exporting data to Excel/OpenOffice format using exportData() or exportClientData().

      If unset (the default), cells that are not provided a background color by more specific APIs will be the default background color used by the spreadsheet program where they are viewed.

      See ExportBGColor for an overview.

      Parameters:
      exportDefaultBGColor - New exportDefaultBGColor value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getExportDefaultBGColor

      public String getExportDefaultBGColor()
      Default background color to use when exporting data to Excel/OpenOffice format using exportData() or exportClientData().

      If unset (the default), cells that are not provided a background color by more specific APIs will be the default background color used by the spreadsheet program where they are viewed.

      See ExportBGColor for an overview.

      Returns:
      Current exportDefaultBGColor value. Default value is null
      See Also:
    • setExportFieldAlignments

      public ListGrid setExportFieldAlignments(boolean exportFieldAlignments)
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), whether field horizontal header alignments and data value alignments should be replicated in the resulting spreadsheet.

      If this attribute is not set, cells will be assigned a default alignment by the spreadsheet, which is typically right-aligned for numeric and date values, and left-aligned for everything else (including dates and numbers that have been exported as strings, as would be the case, for example, if DSRequest.exportDatesAsFormattedString is set)

      Parameters:
      exportFieldAlignments - New exportFieldAlignments value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getExportFieldAlignments

      public boolean getExportFieldAlignments()
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), whether field horizontal header alignments and data value alignments should be replicated in the resulting spreadsheet.

      If this attribute is not set, cells will be assigned a default alignment by the spreadsheet, which is typically right-aligned for numeric and date values, and left-aligned for everything else (including dates and numbers that have been exported as strings, as would be the case, for example, if DSRequest.exportDatesAsFormattedString is set)

      Returns:
      Current exportFieldAlignments value. Default value is false
    • setExportFieldWidths

      public ListGrid setExportFieldWidths(boolean exportFieldWidths)
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), whether widths of fields should be replicated in the resulting spreadsheet.

      Because Excel's unit of measurement for field widths is based on the default system font, there is no exact way to translate field widths in pixels to Excel column widths. The exportWidthScale property can be set to adjust scaling; it's default value errs on the side of making Excel's columns slightly wider than the ListGrid field's actual width to avoid clipping.

      Note that you can switch off width export for individual fields with the ListGridField.exportFieldWidth flag.

      Parameters:
      exportFieldWidths - New exportFieldWidths value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getExportFieldWidths

      public boolean getExportFieldWidths()
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), whether widths of fields should be replicated in the resulting spreadsheet.

      Because Excel's unit of measurement for field widths is based on the default system font, there is no exact way to translate field widths in pixels to Excel column widths. The exportWidthScale property can be set to adjust scaling; it's default value errs on the side of making Excel's columns slightly wider than the ListGrid field's actual width to avoid clipping.

      Note that you can switch off width export for individual fields with the ListGridField.exportFieldWidth flag.

      Returns:
      Current exportFieldWidths value. Default value is false
      See Also:
    • setExportHeaderHeights

      public ListGrid setExportHeaderHeights(boolean exportHeaderHeights)
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), causes the headerHeight and headerSpan heights to be applied to the corresponding cells in the spreadsheet.
      Parameters:
      exportHeaderHeights - New exportHeaderHeights value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getExportHeaderHeights

      public boolean getExportHeaderHeights()
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), causes the headerHeight and headerSpan heights to be applied to the corresponding cells in the spreadsheet.
      Returns:
      Current exportHeaderHeights value. Default value is false
    • setExportHiddenFieldWidth

      public ListGrid setExportHiddenFieldWidth(int exportHiddenFieldWidth)
      Width to size non-visible fields (which may be specified with exportFields or DSRequest.exportFields) during exportData() or exportClientData(), if they have no defined numeric width.
      Parameters:
      exportHiddenFieldWidth - New exportHiddenFieldWidth value. Default value is 100
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getExportHiddenFieldWidth

      public int getExportHiddenFieldWidth()
      Width to size non-visible fields (which may be specified with exportFields or DSRequest.exportFields) during exportData() or exportClientData(), if they have no defined numeric width.
      Returns:
      Current exportHiddenFieldWidth value. Default value is 100
      See Also:
    • setExportRawNumbers

      public ListGrid setExportRawNumbers(Boolean exportRawNumbers) throws IllegalStateException
      Dictates whether numeric values should be exported as raw numbers instead of formatted values when using exportClientData().

      This property is only consulted if exportRawValues is not set to true at the grid or field 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.

      May be overridden at the field level via ListGridField.exportRawNumbers.

      Parameters:
      exportRawNumbers - New exportRawNumbers value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExportRawNumbers

      public Boolean getExportRawNumbers()
      Dictates whether numeric values should be exported as raw numbers instead of formatted values when using exportClientData().

      This property is only consulted if exportRawValues is not set to true at the grid or field 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.

      May be overridden at the field level via ListGridField.exportRawNumbers.

      Returns:
      Current exportRawNumbers value. Default value is null
    • setExportRawValues

      public ListGrid setExportRawValues(Boolean exportRawValues) throws IllegalStateException
      Dictates whether the data in this grid should be exported raw by exportClientData(). If set to true, data will not be processed by field-formatters during exports. Decreases the time taken for large exports. This property can also be set at the field level.
      Parameters:
      exportRawValues - New exportRawValues value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getExportRawValues

      public Boolean getExportRawValues()
      Dictates whether the data in this grid should be exported raw by exportClientData(). If set to true, data will not be processed by field-formatters during exports. Decreases the time taken for large exports. This property can also be set at the field level.
      Returns:
      Current exportRawValues value. Default value is null
    • setExportWidthScale

      public ListGrid setExportWidthScale(double exportWidthScale)
      Scaling factor to translate from ListGrid field widths in pixels to Excel/OpenOffice units for field width, which are 1/256th of the width of the widest digit character in the default font for the spreadsheet. See exportFieldWidths for where this is used.
      Parameters:
      exportWidthScale - New exportWidthScale value. Default value is 0.12
      Returns:
      ListGrid instance, for chaining setter calls
    • getExportWidthScale

      public double getExportWidthScale()
      Scaling factor to translate from ListGrid field widths in pixels to Excel/OpenOffice units for field width, which are 1/256th of the width of the widest digit character in the default font for the spreadsheet. See exportFieldWidths for where this is used.
      Returns:
      Current exportWidthScale value. Default value is 0.12
    • setExportWrapHeaderTitles

      public ListGrid setExportWrapHeaderTitles(boolean exportWrapHeaderTitles)
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), whether titles in the ListGrid header and headerSpans should be allowed to wrap.

      Excel will wrap at the column boundary automatically; for explicit control over wrapping, insert "<br>" tags into your titles.

      See also exportFieldWidths for replicating the widths of fields in the exported spreadsheet.

      Parameters:
      exportWrapHeaderTitles - New exportWrapHeaderTitles value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getExportWrapHeaderTitles

      public boolean getExportWrapHeaderTitles()
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), whether titles in the ListGrid header and headerSpans should be allowed to wrap.

      Excel will wrap at the column boundary automatically; for explicit control over wrapping, insert "<br>" tags into your titles.

      See also exportFieldWidths for replicating the widths of fields in the exported spreadsheet.

      Returns:
      Current exportWrapHeaderTitles value. Default value is false
    • setFastCellUpdates

      public ListGrid setFastCellUpdates(Boolean fastCellUpdates) throws IllegalStateException
      Note: This property only has an effect in Internet Explorer

      Advanced property to improve performance for dynamic styling of gridRenderer cells in Internet Explorer, at the expense of slightly slower initial drawing, and some limitations on supported styling options.

      fastCellUpdates speeds up the dynamic styling system used by rollovers, selections, and custom styling that calls GridRenderer.refreshCellStyle(), at the cost of slightly slower draw() and redraw() times.

      Notes:

      • When this property is set, ListGrid cells may be styled using the tallBaseStyle. See getBaseStyle() for more information.
      • If any cell styles specify a a background image URL, the URL will be resolved relative to the page location rather than the location of the CSS stylesheet. This means cell styles with a background URL should either supply a fully qualified path, or the background image media should be made available at a second location for IE.
      • fastCellUpdates will not work if the styles involved are in an external stylesheet loaded from a remote host. Either the stylesheet containing cell styles needs to be loaded from the same host as the main page, or the cell styles need to be inlined in the html of the bootstrap page.
      • fastCellUpdates will not work if the css styles for cells are defined in a .css file loaded via @import. Instead the .css file should be loaded via a <link ...> tag.


      If this method is called after the component has been drawn/initialized: Setter for GridRenderer.fastCellUpdates. Has no effect in browsers other than Internet Explorer.
      Parameters:
      fastCellUpdates - whether to enable fastCellUpdates. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • setFetchDelay

      public ListGrid setFetchDelay(int fetchDelay)
      If we're showing the filterEditor (showFilterEditor is true), and filterByCell or filterOnKeypress are enabled, this property is the delay in milliseconds between the user changing the filter and the filter request being sent to the server. If multiple changes are made to the filter within this fetch delay, only the most recent will actually cause a re-filter

      Note : This is an advanced setting

      Parameters:
      fetchDelay - New fetchDelay value. Default value is 300
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFetchDelay

      public int getFetchDelay()
      If we're showing the filterEditor (showFilterEditor is true), and filterByCell or filterOnKeypress are enabled, this property is the delay in milliseconds between the user changing the filter and the filter request being sent to the server. If multiple changes are made to the filter within this fetch delay, only the most recent will actually cause a re-filter
      Returns:
      Current fetchDelay value. Default value is 300
      See Also:
    • setFetchFields

      public ListGrid setFetchFields(ListGridField... fetchFields)
      Fields that will be always requested from the server when the grid fetches data, even if they are not visible - may be either an array of fields or a CSV string.

      If fetchFields has been set, then aside from the declared fetchFields, the full set of requested fields will always include the primary-key fields from the dataSource and any visible fields that are also DataSource fields - so if either a SavedSearch or the fields configuration includes fields not declared in fetchFields, those fields will be requested from the server even if they are not included in fetchFields.

      In addition, any fields that are referenced by declarative features, such as UserFormula or ListGridField.visibleWhen, will also be automatically included, even if not listed in fetchFields. Also applies to declarative expansion and hover modes, where fields required by those modes are also fetched.

      This means you can essentially set fetchFields to just fields that always need to be there, whether visible or not - such as fields that are required by custom grid logic (e.g. formatters, or canEditCell()) or may be required when other components interact with the data (such as editing a record from the grid in a form via DynamicForm.editSelectedData()).

      To enable the feature of causing just primary-keys, visible and declaratively required fields to be requested, without any specific additional fields, you can set fetchFields to the special value "*visible*". In order for application code to more easily build a list of fields, you may also include this special value in a compound string, such as "*visible*, field1, field2" - in this case, the special value is simply ignored, since visible fields are always requested if fetchFields is set to a value.

      If fetchFields includes fields which do not appear in the dataSource, a warning is logged and those fields will not be requested from the server.

      Fields to be retrieved are communicated to the server via DSRequest.outputs.

      If a user dynamically shows additional fields (via the field picking menu, via Saved Search or another mechanism), and such fields are not currently loaded, the ListGrid will automatically invalidate the data cache and issue a new fetch with a different dsRequest.outputs setting in order to fetch the necessary data.

      If fetchFields has been set and outputs are also set via another mechanism (like fetchRequestProperties), fetchFields wins.

      Note that since fetchFields ultimately just sets DSRequest.outputs, DataSourceField.outputWhen settings will override fetchFields settings. This also means that, currently, fetchFields is not supported by clientOnly DataSources, because they do not support dsRequest.outputs.

      Additionally, if OperationBinding.outputs is specified in a server-side .ds.xml file, fetchFields will only be able to request fields listed as valid server outputs. In general, client-specified outputs do not override server-specified outputs; client-specified outputs must be a subset of outputs listed on the server.

      Parameters:
      fetchFields - New fetchFields value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFetchFields

      public ListGridField[] getFetchFields()
      Fields that will be always requested from the server when the grid fetches data, even if they are not visible - may be either an array of fields or a CSV string.

      If fetchFields has been set, then aside from the declared fetchFields, the full set of requested fields will always include the primary-key fields from the dataSource and any visible fields that are also DataSource fields - so if either a SavedSearch or the fields configuration includes fields not declared in fetchFields, those fields will be requested from the server even if they are not included in fetchFields.

      In addition, any fields that are referenced by declarative features, such as UserFormula or ListGridField.visibleWhen, will also be automatically included, even if not listed in fetchFields. Also applies to declarative expansion and hover modes, where fields required by those modes are also fetched.

      This means you can essentially set fetchFields to just fields that always need to be there, whether visible or not - such as fields that are required by custom grid logic (e.g. formatters, or canEditCell()) or may be required when other components interact with the data (such as editing a record from the grid in a form via DynamicForm.editSelectedData()).

      To enable the feature of causing just primary-keys, visible and declaratively required fields to be requested, without any specific additional fields, you can set fetchFields to the special value "*visible*". In order for application code to more easily build a list of fields, you may also include this special value in a compound string, such as "*visible*, field1, field2" - in this case, the special value is simply ignored, since visible fields are always requested if fetchFields is set to a value.

      If fetchFields includes fields which do not appear in the dataSource, a warning is logged and those fields will not be requested from the server.

      Fields to be retrieved are communicated to the server via DSRequest.outputs.

      If a user dynamically shows additional fields (via the field picking menu, via Saved Search or another mechanism), and such fields are not currently loaded, the ListGrid will automatically invalidate the data cache and issue a new fetch with a different dsRequest.outputs setting in order to fetch the necessary data.

      If fetchFields has been set and outputs are also set via another mechanism (like fetchRequestProperties), fetchFields wins.

      Note that since fetchFields ultimately just sets DSRequest.outputs, DataSourceField.outputWhen settings will override fetchFields settings. This also means that, currently, fetchFields is not supported by clientOnly DataSources, because they do not support dsRequest.outputs.

      Additionally, if OperationBinding.outputs is specified in a server-side .ds.xml file, fetchFields will only be able to request fields listed as valid server outputs. In general, client-specified outputs do not override server-specified outputs; client-specified outputs must be a subset of outputs listed on the server.

      Returns:
      Current fetchFields value. Default value is null
      See Also:
    • setFetchFields

      public ListGrid setFetchFields(String fetchFields)
      Fields that will be always requested from the server when the grid fetches data, even if they are not visible - may be either an array of fields or a CSV string.

      If fetchFields has been set, then aside from the declared fetchFields, the full set of requested fields will always include the primary-key fields from the dataSource and any visible fields that are also DataSource fields - so if either a SavedSearch or the fields configuration includes fields not declared in fetchFields, those fields will be requested from the server even if they are not included in fetchFields.

      In addition, any fields that are referenced by declarative features, such as UserFormula or ListGridField.visibleWhen, will also be automatically included, even if not listed in fetchFields. Also applies to declarative expansion and hover modes, where fields required by those modes are also fetched.

      This means you can essentially set fetchFields to just fields that always need to be there, whether visible or not - such as fields that are required by custom grid logic (e.g. formatters, or canEditCell()) or may be required when other components interact with the data (such as editing a record from the grid in a form via DynamicForm.editSelectedData()).

      To enable the feature of causing just primary-keys, visible and declaratively required fields to be requested, without any specific additional fields, you can set fetchFields to the special value "*visible*". In order for application code to more easily build a list of fields, you may also include this special value in a compound string, such as "*visible*, field1, field2" - in this case, the special value is simply ignored, since visible fields are always requested if fetchFields is set to a value.

      If fetchFields includes fields which do not appear in the dataSource, a warning is logged and those fields will not be requested from the server.

      Fields to be retrieved are communicated to the server via DSRequest.outputs.

      If a user dynamically shows additional fields (via the field picking menu, via Saved Search or another mechanism), and such fields are not currently loaded, the ListGrid will automatically invalidate the data cache and issue a new fetch with a different dsRequest.outputs setting in order to fetch the necessary data.

      If fetchFields has been set and outputs are also set via another mechanism (like fetchRequestProperties), fetchFields wins.

      Note that since fetchFields ultimately just sets DSRequest.outputs, DataSourceField.outputWhen settings will override fetchFields settings. This also means that, currently, fetchFields is not supported by clientOnly DataSources, because they do not support dsRequest.outputs.

      Additionally, if OperationBinding.outputs is specified in a server-side .ds.xml file, fetchFields will only be able to request fields listed as valid server outputs. In general, client-specified outputs do not override server-specified outputs; client-specified outputs must be a subset of outputs listed on the server.

      Parameters:
      fetchFields - New fetchFields value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFetchFieldsAsString

      public String getFetchFieldsAsString()
      Fields that will be always requested from the server when the grid fetches data, even if they are not visible - may be either an array of fields or a CSV string.

      If fetchFields has been set, then aside from the declared fetchFields, the full set of requested fields will always include the primary-key fields from the dataSource and any visible fields that are also DataSource fields - so if either a SavedSearch or the fields configuration includes fields not declared in fetchFields, those fields will be requested from the server even if they are not included in fetchFields.

      In addition, any fields that are referenced by declarative features, such as UserFormula or ListGridField.visibleWhen, will also be automatically included, even if not listed in fetchFields. Also applies to declarative expansion and hover modes, where fields required by those modes are also fetched.

      This means you can essentially set fetchFields to just fields that always need to be there, whether visible or not - such as fields that are required by custom grid logic (e.g. formatters, or canEditCell()) or may be required when other components interact with the data (such as editing a record from the grid in a form via DynamicForm.editSelectedData()).

      To enable the feature of causing just primary-keys, visible and declaratively required fields to be requested, without any specific additional fields, you can set fetchFields to the special value "*visible*". In order for application code to more easily build a list of fields, you may also include this special value in a compound string, such as "*visible*, field1, field2" - in this case, the special value is simply ignored, since visible fields are always requested if fetchFields is set to a value.

      If fetchFields includes fields which do not appear in the dataSource, a warning is logged and those fields will not be requested from the server.

      Fields to be retrieved are communicated to the server via DSRequest.outputs.

      If a user dynamically shows additional fields (via the field picking menu, via Saved Search or another mechanism), and such fields are not currently loaded, the ListGrid will automatically invalidate the data cache and issue a new fetch with a different dsRequest.outputs setting in order to fetch the necessary data.

      If fetchFields has been set and outputs are also set via another mechanism (like fetchRequestProperties), fetchFields wins.

      Note that since fetchFields ultimately just sets DSRequest.outputs, DataSourceField.outputWhen settings will override fetchFields settings. This also means that, currently, fetchFields is not supported by clientOnly DataSources, because they do not support dsRequest.outputs.

      Additionally, if OperationBinding.outputs is specified in a server-side .ds.xml file, fetchFields will only be able to request fields listed as valid server outputs. In general, client-specified outputs do not override server-specified outputs; client-specified outputs must be a subset of outputs listed on the server.

      Returns:
      Current fetchFields value. Default value is null
      See Also:
    • setFetchRequestProperties

      public ListGrid setFetchRequestProperties(DSRequest fetchRequestProperties) throws IllegalStateException
      If autoFetchData is true, this attribute allows the developer to declaratively specify DSRequest properties for the initial fetchData() call.

      Note that any properties governing more specific request attributes for the initial fetch (such as autoFetchTextMatchStyle) will be applied on top of this properties block.

      Parameters:
      fetchRequestProperties - New fetchRequestProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFetchRequestProperties

      public DSRequest getFetchRequestProperties()
      If autoFetchData is true, this attribute allows the developer to declaratively specify DSRequest properties for the initial fetchData() call.

      Note that any properties governing more specific request attributes for the initial fetch (such as autoFetchTextMatchStyle) will be applied on top of this properties block.

      Returns:
      Current fetchRequestProperties value. Default value is null
      See Also:
    • setFieldCriteriaText

      public ListGrid setFieldCriteriaText(String fieldCriteriaText) throws IllegalStateException
      The field criteria prefix to show in filter editor field hover before the descriptive version of the field's criteria, if any. The descriptive text is formatted by DataSource.getAdvancedCriteriaDescription().
      Parameters:
      fieldCriteriaText - New fieldCriteriaText value. Default value is "Field criteria:"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFieldCriteriaText

      public String getFieldCriteriaText()
      The field criteria prefix to show in filter editor field hover before the descriptive version of the field's criteria, if any. The descriptive text is formatted by DataSource.getAdvancedCriteriaDescription().
      Returns:
      Current fieldCriteriaText value. Default value is "Field criteria:"
      See Also:
    • setFieldPickerFieldProperties

      public ListGrid setFieldPickerFieldProperties(String... fieldPickerFieldProperties) throws IllegalStateException
      Names of properties on ListGridField for which the FieldPicker should show an editing interface, for convenience.

      For example, specify ["frozen", "decimalPrecision"] to allow end users to modify ListGridField.frozen and ListGridField.decimalPrecision respectively.

      Parameters:
      fieldPickerFieldProperties - New fieldPickerFieldProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFieldPickerFieldProperties

      public String[] getFieldPickerFieldProperties()
      Names of properties on ListGridField for which the FieldPicker should show an editing interface, for convenience.

      For example, specify ["frozen", "decimalPrecision"] to allow end users to modify ListGridField.frozen and ListGridField.decimalPrecision respectively.

      Returns:
      Current fieldPickerFieldProperties value. Default value is null
    • setFieldPickerShowSampleValues

      public ListGrid setFieldPickerShowSampleValues(Boolean fieldPickerShowSampleValues) throws IllegalStateException
      When set to false, sample values of the FieldPicker are never shown. This property applies to the entire FieldPicker.
      Parameters:
      fieldPickerShowSampleValues - New fieldPickerShowSampleValues value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFieldPickerShowSampleValues

      public Boolean getFieldPickerShowSampleValues()
      When set to false, sample values of the FieldPicker are never shown. This property applies to the entire FieldPicker.
      Returns:
      Current fieldPickerShowSampleValues value. Default value is true
    • getFieldPickerWindow

      public FieldPickerWindow getFieldPickerWindow() throws IllegalStateException
      Instance of FieldPickerWindow used if useAdvancedFieldPicker is set.

      This component is an AutoChild named "fieldPickerWindow". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current fieldPickerWindow value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setFields

      public ListGrid setFields(ListGridField... fields)
      An array of field objects, specifying the order, layout, formatting, and sorting behavior of each field in the listGrid object. In ListGrids, the fields array specifies columns. Each field in the fields array is a ListGridField object. Any listGrid that will display data should have at least one visible field.

      If dataSource is also set, this value acts as a set of overrides as explained in DataBoundComponent.fields.

      Note: grids with useAllDataSourceFields:true will render the full set of dataSource fields in the order in which they are defined in the dataSource - in this usage the component fields array is just a way to customize the appearance of individual fields.

      Grids with canPickOmittedFields:true will only show the explicitly specified set of fields, but will similarly show them in the order in which they're defined within the dataSource.

      If this method is called after the component has been drawn/initialized: Sets the fields array and/or field widths to newFields and sizes, respectively.

      If newFields is specified, it is assumed that the new fields may have nothing in common with the old fields, and the component is substantially rebuilt. Furthermore, it's invalid to modify any of the existing ListGridFields after they've been passed to this function. Consider the following methods for more efficient, more incremental changes: resizeField(), reorderField(), showField(), hideField(), or setFieldProperties().

      Two specific values of newFields have explicit meanings:

      • null - a newFields value of null indicates there are no field overrides. All current fields are removed and, if the grid is bound to a DataSource, the "default binding" is used. (see DataBoundComponent.fields).
      • empty array - providing an empty array for the newFields indicates that no fields are desired even if a dataSource is provided.
      Parameters:
      fields - array of fields to draw. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFields

      public ListGridField[] getFields()
      An array of field objects, specifying the order, layout, formatting, and sorting behavior of each field in the listGrid object. In ListGrids, the fields array specifies columns. Each field in the fields array is a ListGridField object. Any listGrid that will display data should have at least one visible field.

      If dataSource is also set, this value acts as a set of overrides as explained in DataBoundComponent.fields.

      Note: grids with useAllDataSourceFields:true will render the full set of dataSource fields in the order in which they are defined in the dataSource - in this usage the component fields array is just a way to customize the appearance of individual fields.

      Grids with canPickOmittedFields:true will only show the explicitly specified set of fields, but will similarly show them in the order in which they're defined within the dataSource.

      Returns:
      Get the array of all currently visible fields for this ListGrid.

      This list fields is only valid once the ListGrid has been drawn or once setFields() has been called explicitly. If called earlier, only the list of directly specified fields will be returned (the Array passed to create()).

      This Array should be treated as read-only. To modify the set of visible fields, use showField(), hideField() and related APIs. To update properties of individual fields, use setFieldProperties() or more specific APIs such as setFieldTitle().

      To get the Array of all fields, including fields that are not currently visible or were specified implicitly, use getAllFields(). Default value is null

      See Also:
    • setFieldState

      public ListGrid setFieldState(String fieldState)
      Initial field state for the grid.

      ViewState can be used to initialize all view properties of the grid. When doing so, fieldState is not needed because viewState includes it as well. If both are provided, fieldState has priority for field state.

      If this method is called after the component has been drawn/initialized: Sets some presentation properties (visibility, width, userFormula and userSummary) of the listGrid fields based on the ListGridFieldState object passed in.
      Used to restore previous state retrieved from the grid by a call to getFieldState().

      The optional isSparse parameter may be passed to indicate whether the fieldState object is "sparse" - whether it includes explicit state information for hidden fields. In this case any fields defined on the component not explicitly included in the fieldState object will be hidden.
      If isSparse is not explicitly passed as a parameter, sparseness will be assumed if DataBoundComponent.sparseFieldState is true.

      Parameters:
      fieldState - state to apply to the listGrid's fields. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFieldState

      public String getFieldState()
      Initial field state for the grid.

      ViewState can be used to initialize all view properties of the grid. When doing so, fieldState is not needed because viewState includes it as well. If both are provided, fieldState has priority for field state.

      Returns:
      Returns a snapshot of the current presentation of this listGrid's fields as a ListGridFieldState object.

      This object can later be passed to setFieldState() to reset this grid's fields to the current state.

      Note that the information stored includes the current width and visibility of each of this grid's fields, as well as any formula or summary fields added by the user.

      The optional sparse parameter governs whether the returned field state should omit state information for hidden fields. If this parameter is not passed explicitly, field state will be sparse if DataBoundComponent.sparseFieldState is true.
      When applying sparse field state to a component via setFieldState(), any explicitly defined fields on the component that were not captured in the stored state object will be hidden. Default value is null

      See Also:
    • setFieldVisibilitySubmenuTitle

      public ListGrid setFieldVisibilitySubmenuTitle(String fieldVisibilitySubmenuTitle)
      If we're showing a headerContextMenu for this grid, and this.canPickFields is true, this attribute will be shown as the title for the menu item which contains a submenu with items allowing the user to show and hide fields in the grid.
      Parameters:
      fieldVisibilitySubmenuTitle - New fieldVisibilitySubmenuTitle value. Default value is "Columns"
      Returns:
      ListGrid instance, for chaining setter calls
    • getFieldVisibilitySubmenuTitle

      public String getFieldVisibilitySubmenuTitle()
      If we're showing a headerContextMenu for this grid, and this.canPickFields is true, this attribute will be shown as the title for the menu item which contains a submenu with items allowing the user to show and hide fields in the grid.
      Returns:
      Current fieldVisibilitySubmenuTitle value. Default value is "Columns"
    • setFilterButtonPrompt

      public ListGrid setFilterButtonPrompt(String filterButtonPrompt) throws IllegalStateException
      The prompt to show when the mouse hovers over the Filter button in the FilterEditor.
      Parameters:
      filterButtonPrompt - New filterButtonPrompt value. Default value is "Filter"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFilterButtonPrompt

      public String getFilterButtonPrompt()
      The prompt to show when the mouse hovers over the Filter button in the FilterEditor.
      Returns:
      Current filterButtonPrompt value. Default value is "Filter"
    • setFilterButtonProperties

      public ListGrid setFilterButtonProperties(Button filterButtonProperties) throws IllegalStateException
      If showFilterEditor is true, this attribute may be used to customize the filter button shown to the right of the filterEditor row.
      Parameters:
      filterButtonProperties - New filterButtonProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFilterButtonProperties

      public Button getFilterButtonProperties()
      If showFilterEditor is true, this attribute may be used to customize the filter button shown to the right of the filterEditor row.
      Returns:
      Current filterButtonProperties value. Default value is null
    • setFilterByCell

      public ListGrid setFilterByCell(boolean filterByCell)
      If we're showing the filterEditor, should this list be filtered every time the user changes edit values for particular cells rather than waiting for an Enter keypress or a click on the filterEditor submit button.

      Note that by default fields in the filter editor will be set to changeOnKeypress:false, so the grid will not filter as the user types in text-based items.
      To enable filtering as the user types in text fields, we recommend the filterOnKeypress attribute. Also note that filterOnKeypress:true implies filtering will occur on change to edit values for cells, even if filterByCell is not set to true.

      Note : This is an advanced setting

      Parameters:
      filterByCell - New filterByCell value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFilterByCell

      public boolean getFilterByCell()
      If we're showing the filterEditor, should this list be filtered every time the user changes edit values for particular cells rather than waiting for an Enter keypress or a click on the filterEditor submit button.

      Note that by default fields in the filter editor will be set to changeOnKeypress:false, so the grid will not filter as the user types in text-based items.
      To enable filtering as the user types in text fields, we recommend the filterOnKeypress attribute. Also note that filterOnKeypress:true implies filtering will occur on change to edit values for cells, even if filterByCell is not set to true.

      Returns:
      Current filterByCell value. Default value is true
      See Also:
    • getFilterEditor

      public RecordEditor getFilterEditor() throws IllegalStateException
      If showFilterEditor is set to true, the filterEditor is automatically created as an AutoChild.

      The filterEditor autoChild is a RecordEditor - essentially it is a specialized listGrid in edit mode for editing a single set of values to be used as criteria. Once created, developers may access it and use standard listGrid APIs to interact with it. For example, given a listGrid myListGrid, live edit items could be accessed via
      myListGrid.getFilterEditor().getEditFormItem(someFieldName);

      Developers may configure the AutoChild using filterEditorProperties.

      This component is an AutoChild named "filterEditor". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current filterEditor value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
      See Also:
    • setFilterEditorHeight

      public ListGrid setFilterEditorHeight(int filterEditorHeight)
      Height for the filterEditor, if shown.
      Parameters:
      filterEditorHeight - New filterEditorHeight value. Default value is 22
      Returns:
      ListGrid instance, for chaining setter calls
    • getFilterEditorHeight

      public int getFilterEditorHeight()
      Height for the filterEditor, if shown.
      Returns:
      Current filterEditorHeight value. Default value is 22
    • setFilterEditorProperties

      public ListGrid setFilterEditorProperties(RecordEditor filterEditorProperties) throws IllegalStateException
      Properties to apply to the automatically generated filterEditor if showFilterEditor is true.
      Parameters:
      filterEditorProperties - New filterEditorProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFilterEditorProperties

      public RecordEditor getFilterEditorProperties()
      Properties to apply to the automatically generated filterEditor if showFilterEditor is true.
      Returns:
      Current filterEditorProperties value. Default value is null
    • setFilterLocalData

      public ListGrid setFilterLocalData(Boolean filterLocalData) throws IllegalStateException
      Causes filtering to be performed against the local data set, even when a dataSource is provided.

      When using this mode, data must be provided to the grid via setData(), and must be provided as a RecordList.

      Note that a dataSource must be provided for filtering to occur even when filtering locally.

      If this property is set to true, the supplied data is applied as the complete dataset of a ResultSet, which is then filtered according to the specified criteria, and the results displayed. If false, a normal databound fetch will occur, retrieving records that match the specified criteria from this component's dataSource.

      filterLocalData includes both calls to fetchData() and filterData() as well as automatic filtering when the filterEditor is enabled.

      If this property is not explicitly set, default behavior will filter against the dataSource unless the grid has a specified dataPath, in which case filtering will occur locally.

      See also saveLocally to cause saves to ignore the DataSource and affect the local data set only.

      Note : This is an advanced setting

      Parameters:
      filterLocalData - New filterLocalData value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFilterLocalData

      public Boolean getFilterLocalData()
      Causes filtering to be performed against the local data set, even when a dataSource is provided.

      When using this mode, data must be provided to the grid via setData(), and must be provided as a RecordList.

      Note that a dataSource must be provided for filtering to occur even when filtering locally.

      If this property is set to true, the supplied data is applied as the complete dataset of a ResultSet, which is then filtered according to the specified criteria, and the results displayed. If false, a normal databound fetch will occur, retrieving records that match the specified criteria from this component's dataSource.

      filterLocalData includes both calls to fetchData() and filterData() as well as automatic filtering when the filterEditor is enabled.

      If this property is not explicitly set, default behavior will filter against the dataSource unless the grid has a specified dataPath, in which case filtering will occur locally.

      See also saveLocally to cause saves to ignore the DataSource and affect the local data set only.

      Returns:
      Current filterLocalData value. Default value is null
    • setFilterOnKeypress

      public ListGrid setFilterOnKeypress(boolean filterOnKeypress)
      When this attribute is true and this component has been assigned a searchForm or is showing the filterEditor, data will be filtered automatically as users change values in those components.

      In the filterEditor case, this is equivalent to setting FormItem.changeOnKeypress to true for each text-based field in the ListGridField.filterEditorProperties when filterByCell is true.

      Parameters:
      filterOnKeypress - New filterOnKeypress value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFilterOnKeypress

      public boolean getFilterOnKeypress()
      When this attribute is true and this component has been assigned a searchForm or is showing the filterEditor, data will be filtered automatically as users change values in those components.

      In the filterEditor case, this is equivalent to setting FormItem.changeOnKeypress to true for each text-based field in the ListGridField.filterEditorProperties when filterByCell is true.

      Returns:
      Current filterOnKeypress value. Default value is false
      See Also:
    • setFilterUsingText

      public ListGrid setFilterUsingText(String filterUsingText) throws IllegalStateException
      Text for the menu item shown in the headerContextMenu when allowFilterOperators is enabled.
      Parameters:
      filterUsingText - New filterUsingText value. Default value is "Filter using"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFilterUsingText

      public String getFilterUsingText()
      Text for the menu item shown in the headerContextMenu when allowFilterOperators is enabled.
      Returns:
      Current filterUsingText value. Default value is "Filter using"
    • setFilterViaAIMode

      public ListGrid setFilterViaAIMode(AIServiceMode filterViaAIMode) throws IllegalStateException
      If filtering of the grid is enabled, filtering-via-AI can also be enabled by setting the AIServiceMode to use.
      Parameters:
      filterViaAIMode - New filterViaAIMode value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFilterViaAIMode

      public AIServiceMode getFilterViaAIMode()
      If filtering of the grid is enabled, filtering-via-AI can also be enabled by setting the AIServiceMode to use.
      Returns:
      Current filterViaAIMode value. Default value is null
    • setFilterViaAIPanelInstructions

      public ListGrid setFilterViaAIPanelInstructions(String filterViaAIPanelInstructions) throws IllegalStateException
      The instruction text to display above the "Filter via AI" text box.
      Parameters:
      filterViaAIPanelInstructions - New filterViaAIPanelInstructions value. Default value is "Alternatively, you can use AI to help create a filter for you, by describing the criteria using natural language."
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFilterViaAIPanelInstructions

      public String getFilterViaAIPanelInstructions()
      The instruction text to display above the "Filter via AI" text box.
      Returns:
      Current filterViaAIPanelInstructions value. Default value is "Alternatively, you can use AI to help create a filter for you, by describing the criteria using natural language."
      See Also:
    • setFilterViaAIText

      public ListGrid setFilterViaAIText(String filterViaAIText)
      Title for the menu-item displayed in this component's header context-menu when AI-assisted filtering is allowed.
      Parameters:
      filterViaAIText - New filterViaAIText value. Default value is "Filter via AI..."
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFilterViaAIText

      public String getFilterViaAIText()
      Title for the menu-item displayed in this component's header context-menu when AI-assisted filtering is allowed.
      Returns:
      Current filterViaAIText value. Default value is "Filter via AI..."
      See Also:
    • getFilterWindow

      public Window getFilterWindow() throws IllegalStateException
      Instance of Window used to show the FilterBuilder.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      By default the FilterBuilder shows with the top operator selection as a radio group and allows switching between simple and advanced modes. These defaults can be changed using autoChild features such as setting filterWindowFilter properties on a grid instance or globally by changing the ListGrid defaults.

      For example, to always use advanced mode on a single grid:

        FilterBuilder filterBuilderProperties = new FilterBuilder();          
        filterBuilderProperties.setTopOperatorAppearance(TopOperatorAppearance.BRACKET);
        filterBuilderProperties.setShowModeSwitcher(false);
       
        ListGrid listGrid = new ListGrid();
        listGrid.setAutoChildProperties("filterWindowFilter", filterBuilderProperties);
        
      or to always use advanced mode:
        ListGrid.changeAutoChildDefaults("filterWindowFilter", filterBuilderProperties);
        

      This component is an AutoChild named "filterWindow". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current filterWindow value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setFilterWindowCriteria

      public ListGrid setFilterWindowCriteria(Criteria filterWindowCriteria)
      Advanced filtering criteria, either simple or advanced, that is combined with the filter editor criteria during filtering.

      This criteria is normally configured via advanced filtering dialog shown because of the allowFilterWindow option but can be assigned directly as well.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      If this method is called after the component has been drawn/initialized: Setter for filterWindowCriteria.

      Parameters:
      filterWindowCriteria - criteria for advanced filtering. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getFilterWindowCriteria

      public Criteria getFilterWindowCriteria()
      Advanced filtering criteria, either simple or advanced, that is combined with the filter editor criteria during filtering.

      This criteria is normally configured via advanced filtering dialog shown because of the allowFilterWindow option but can be assigned directly as well.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      Returns:
      Returns the current filterWindowCriteria. Default value is null
    • getFilterWindowCriteriaIndicator

      public Canvas getFilterWindowCriteriaIndicator() throws IllegalStateException
      Instance of Canvas used to show visual indicator that filterWindowCriteria is configured. showFilterWindowCriteriaIndicator must be enabled to show indicator.

      This component is an AutoChild named "filterWindowCriteriaIndicator". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current filterWindowCriteriaIndicator value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getFilterWindowFilter

      public FilterBuilder getFilterWindowFilter() throws IllegalStateException
      Instance of FilterBuilder shown in filterWindow by showFilterWindow(). See filterWindow for more information on the filter defaults and changing them.

      This component is an AutoChild named "filterWindowFilter". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current filterWindowFilter value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setFilterWindowInstructions

      public ListGrid setFilterWindowInstructions(String filterWindowInstructions) throws IllegalStateException
      The instruction text to display at the top of the filterWindow.
      Parameters:
      filterWindowInstructions - New filterWindowInstructions value. Default value is "Enter criteria below. These criteria are <i>in addition to</i> any criteria entered in the filter immediately above column headers."
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFilterWindowInstructions

      public String getFilterWindowInstructions()
      The instruction text to display at the top of the filterWindow.
      Returns:
      Current filterWindowInstructions value. Default value is "Enter criteria below. These criteria are <i>in addition to</i> any criteria entered in the filter immediately above column headers."
      See Also:
    • setFilterWindowTitle

      public ListGrid setFilterWindowTitle(String filterWindowTitle) throws IllegalStateException
      The title for the advanced filtering window.
      Parameters:
      filterWindowTitle - New filterWindowTitle value. Default value is "Advanced Filtering"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFilterWindowTitle

      public String getFilterWindowTitle()
      The title for the advanced filtering window.
      Returns:
      Current filterWindowTitle value. Default value is "Advanced Filtering"
      See Also:
    • setFirstCellStyle

      public ListGrid setFirstCellStyle(String firstCellStyle)
      The style to apply to the first cell in each row, when styledRowEnds is true. Note that this style is additional to the regular cell styling and should not introduce settings that change the layout or size of the cell, such as padding or font-size. The styling will work with any design, and is also applied correctly with or without frozen fields.

      If all you want to do is provide rounded-corners for records in this grid, it may be simpler to set recordRadius to a CSS border-radius string that achieves the rounding you want.

      Parameters:
      firstCellStyle - New firstCellStyle value. Default value is "gridFirstCell"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFirstCellStyle

      public String getFirstCellStyle()
      The style to apply to the first cell in each row, when styledRowEnds is true. Note that this style is additional to the regular cell styling and should not introduce settings that change the layout or size of the cell, such as padding or font-size. The styling will work with any design, and is also applied correctly with or without frozen fields.

      If all you want to do is provide rounded-corners for records in this grid, it may be simpler to set recordRadius to a CSS border-radius string that achieves the rounding you want.

      Returns:
      Current firstCellStyle value. Default value is "gridFirstCell"
      See Also:
    • setFixedFieldWidths

      public ListGrid setFixedFieldWidths(Boolean fixedFieldWidths)
      Should we horizontally clip cell contents, or allow columns to expand horizontally to show all contents?

      If we allow columns to expand, the column width is treated as a minimum.

      NOTE: the header does not automatically respond to expanded field widths. If your grid is showing a header we'd recommend developers consider setting autoFitFieldWidths rather than using this attribute.

      Note : This is an advanced setting

      Parameters:
      fixedFieldWidths - New fixedFieldWidths value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getFixedFieldWidths

      public Boolean getFixedFieldWidths()
      Should we horizontally clip cell contents, or allow columns to expand horizontally to show all contents?

      If we allow columns to expand, the column width is treated as a minimum.

      NOTE: the header does not automatically respond to expanded field widths. If your grid is showing a header we'd recommend developers consider setting autoFitFieldWidths rather than using this attribute.

      Returns:
      Current fixedFieldWidths value. Default value is true
    • setFixedRecordHeights

      public ListGrid setFixedRecordHeights(Boolean fixedRecordHeights)
      Should we vertically clip cell contents, or allow rows to expand vertically to show all contents?

      If we allow rows to expand, the row height as derived from getRowHeight() or the default cellHeight is treated as a minimum.

      Setting fixedRecordHeights to false enables the virtualScrolling system.

      NOTE:

      • Setting fixedRecordHeights to false for CubeGrid is not supported, though a similar option for the row headers is available as CubeGrid.autoSizeHeaders.
      • By default, for performance reasons, clipping is not enforced for some kinds of content (such as images) on all browsers. Set enforceVClipping:true to enforce clipping for all types of content on all browsers.


      If this method is called after the component has been drawn/initialized: Setter for fixedRecordHeights

      Note : This is an advanced setting

      Parameters:
      fixedRecordHeights - New fixedRecordHeights value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFixedRecordHeights

      public Boolean getFixedRecordHeights()
      Should we vertically clip cell contents, or allow rows to expand vertically to show all contents?

      If we allow rows to expand, the row height as derived from getRowHeight() or the default cellHeight is treated as a minimum.

      Setting fixedRecordHeights to false enables the virtualScrolling system.

      NOTE:

      • Setting fixedRecordHeights to false for CubeGrid is not supported, though a similar option for the row headers is available as CubeGrid.autoSizeHeaders.
      • By default, for performance reasons, clipping is not enforced for some kinds of content (such as images) on all browsers. Set enforceVClipping:true to enforce clipping for all types of content on all browsers.
      Returns:
      Current fixedRecordHeights value. Default value is true
      See Also:
    • setFormulaBuilderSpanTitleSeparator

      public ListGrid setFormulaBuilderSpanTitleSeparator(String formulaBuilderSpanTitleSeparator)
      If this grid has specified headerSpans, and showHeaderSpanTitlesInFormulaBuilder is true, this string will be inserted between the headerSpan title(s) and the field title in the field chooser grid in the FormulaBuilder and SummaryBuilder.
      Parameters:
      formulaBuilderSpanTitleSeparator - New formulaBuilderSpanTitleSeparator value. Default value is " - "
      Returns:
      ListGrid instance, for chaining setter calls
    • getFormulaBuilderSpanTitleSeparator

      public String getFormulaBuilderSpanTitleSeparator()
      If this grid has specified headerSpans, and showHeaderSpanTitlesInFormulaBuilder is true, this string will be inserted between the headerSpan title(s) and the field title in the field chooser grid in the FormulaBuilder and SummaryBuilder.
      Returns:
      Current formulaBuilderSpanTitleSeparator value. Default value is " - "
    • setFreezeFieldText

      public ListGrid setFreezeFieldText(String freezeFieldText)
      If we're showing a headerContextMenu for this grid and this.canFreezeFields is true, this string will be shown as the title for the menu item to freeze a currently unfrozen field.

      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed, with title available as a variable containing the field title.

      Default value returns "Freeze " + the field's summary title.

      Note : This is an advanced setting

      Parameters:
      freezeFieldText - New freezeFieldText value. Default value is "Freeze ${title}"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFreezeFieldText

      public String getFreezeFieldText()
      If we're showing a headerContextMenu for this grid and this.canFreezeFields is true, this string will be shown as the title for the menu item to freeze a currently unfrozen field.

      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed, with title available as a variable containing the field title.

      Default value returns "Freeze " + the field's summary title.

      Returns:
      Current freezeFieldText value. Default value is "Freeze ${title}"
      See Also:
    • setFrozenBaseStyle

      public ListGrid setFrozenBaseStyle(String frozenBaseStyle)
      If this listGrid contains any frozen fields, this property can be used to apply a custom baseStyle to all cells in those frozen fields. If unset, the standard base style will be used for both frozen and unfrozen cells.
      Parameters:
      frozenBaseStyle - New frozenBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getFrozenBaseStyle

      public String getFrozenBaseStyle()
      If this listGrid contains any frozen fields, this property can be used to apply a custom baseStyle to all cells in those frozen fields. If unset, the standard base style will be used for both frozen and unfrozen cells.
      Returns:
      Current frozenBaseStyle value. Default value is null
      See Also:
    • setFrozenFieldsMaxWidth

      public ListGrid setFrozenFieldsMaxWidth(String frozenFieldsMaxWidth)
      Maximum width available for any frozen fields shown in this grid. May be specified as a percentage or numeric pixel value.

      If the frozen fields' combined width exceeds this value, a horizontal scrollbar will be shown, allowing the frozen fields to be horizontally scrolled (independently from the unfrozen fields).

      If this method is called after the component has been drawn/initialized: Setter for the frozenFieldsMaxWidth attribute

      Parameters:
      frozenFieldsMaxWidth - new maximum width for frozen fields. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getFrozenFieldsMaxWidth

      public String getFrozenFieldsMaxWidth()
      Maximum width available for any frozen fields shown in this grid. May be specified as a percentage or numeric pixel value.

      If the frozen fields' combined width exceeds this value, a horizontal scrollbar will be shown, allowing the frozen fields to be horizontally scrolled (independently from the unfrozen fields).

      Returns:
      Current frozenFieldsMaxWidth value. Default value is null
    • setFrozenFieldsMaxWidth

      public ListGrid setFrozenFieldsMaxWidth(Integer frozenFieldsMaxWidth)
      Maximum width available for any frozen fields shown in this grid. May be specified as a percentage or numeric pixel value.

      If the frozen fields' combined width exceeds this value, a horizontal scrollbar will be shown, allowing the frozen fields to be horizontally scrolled (independently from the unfrozen fields).

      If this method is called after the component has been drawn/initialized: Setter for the frozenFieldsMaxWidth attribute

      Parameters:
      frozenFieldsMaxWidth - new maximum width for frozen fields. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getFrozenFieldsMaxWidthAsInt

      public Integer getFrozenFieldsMaxWidthAsInt()
      Maximum width available for any frozen fields shown in this grid. May be specified as a percentage or numeric pixel value.

      If the frozen fields' combined width exceeds this value, a horizontal scrollbar will be shown, allowing the frozen fields to be horizontally scrolled (independently from the unfrozen fields).

      Returns:
      Current frozenFieldsMaxWidth value. Default value is null
    • setFrozenHeaderBaseStyle

      public ListGrid setFrozenHeaderBaseStyle(String frozenHeaderBaseStyle) throws IllegalStateException
      If this listGrid contains any frozen fields, this property can be used to apply a custom headerBaseStyle to the frozen set of fields. If unset, the standard headerBaseStyle will be used for both frozen and unfrozen cells.
      Parameters:
      frozenHeaderBaseStyle - New frozenHeaderBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFrozenHeaderBaseStyle

      public String getFrozenHeaderBaseStyle()
      If this listGrid contains any frozen fields, this property can be used to apply a custom headerBaseStyle to the frozen set of fields. If unset, the standard headerBaseStyle will be used for both frozen and unfrozen cells.
      Returns:
      Current frozenHeaderBaseStyle value. Default value is null
      See Also:
    • setFrozenHeaderTitleStyle

      public ListGrid setFrozenHeaderTitleStyle(String frozenHeaderTitleStyle) throws IllegalStateException
      If this listGrid contains any frozen fields, this property can be used to apply a custom headerTitleStyle to the frozen set of fields. If unset, the standard headerTitleStyle will be used for both frozen and unfrozen cells.
      Parameters:
      frozenHeaderTitleStyle - New frozenHeaderTitleStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFrozenHeaderTitleStyle

      public String getFrozenHeaderTitleStyle()
      If this listGrid contains any frozen fields, this property can be used to apply a custom headerTitleStyle to the frozen set of fields. If unset, the standard headerTitleStyle will be used for both frozen and unfrozen cells.
      Returns:
      Current frozenHeaderTitleStyle value. Default value is null
      See Also:
    • setFullRowRangeDisplayValue

      public ListGrid setFullRowRangeDisplayValue(String fullRowRangeDisplayValue)
      Dynamic String specifying the format for the row range summary value when RowRangeDisplayStyle is set to "full".

      The following variables are available for evaluation within this string:

      Parameters:
      fullRowRangeDisplayValue - New fullRowRangeDisplayValue value. Default value is "Showing ${rowRange} of ${rowCount} rows"
      Returns:
      ListGrid instance, for chaining setter calls
    • getFullRowRangeDisplayValue

      public String getFullRowRangeDisplayValue()
      Dynamic String specifying the format for the row range summary value when RowRangeDisplayStyle is set to "full".

      The following variables are available for evaluation within this string:

      Returns:
      Current fullRowRangeDisplayValue value. Default value is "Showing ${rowRange} of ${rowCount} rows"
    • setGenerateClickOnEnter

      public ListGrid setGenerateClickOnEnter(Boolean generateClickOnEnter)
      If true, when the user navigates to a cell using arrow keys and hits Enter, the cell will respond to a click event.

      Note : This is an advanced setting

      Parameters:
      generateClickOnEnter - New generateClickOnEnter value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getGenerateClickOnEnter

      public Boolean getGenerateClickOnEnter()
      If true, when the user navigates to a cell using arrow keys and hits Enter, the cell will respond to a click event.
      Returns:
      Current generateClickOnEnter value. Default value is false
    • setGenerateClickOnSpace

      public ListGrid setGenerateClickOnSpace(Boolean generateClickOnSpace)
      If true, when the user navigates to a cell using arrow keys and hits space, the cell will respond to a click event.

      Note : This is an advanced setting

      Parameters:
      generateClickOnSpace - New generateClickOnSpace value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getGenerateClickOnSpace

      public Boolean getGenerateClickOnSpace()
      If true, when the user navigates to a cell using arrow keys and hits space, the cell will respond to a click event.
      Returns:
      Current generateClickOnSpace value. Default value is true
    • setGenerateDoubleClickOnEnter

      public ListGrid setGenerateDoubleClickOnEnter(Boolean generateDoubleClickOnEnter)
      If true, when the user navigates to a cell using arrow keys and hits Enter, the cell will respond to a double click event.

      Note : This is an advanced setting

      Parameters:
      generateDoubleClickOnEnter - New generateDoubleClickOnEnter value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getGenerateDoubleClickOnEnter

      public Boolean getGenerateDoubleClickOnEnter()
      If true, when the user navigates to a cell using arrow keys and hits Enter, the cell will respond to a double click event.
      Returns:
      Current generateDoubleClickOnEnter value. Default value is true
    • setGenerateDoubleClickOnSpace

      public ListGrid setGenerateDoubleClickOnSpace(Boolean generateDoubleClickOnSpace)
      If true, when the user navigates to a cell using arrow keys and hits Space, the cell will respond to a double click event.

      Note : This is an advanced setting

      Parameters:
      generateDoubleClickOnSpace - New generateDoubleClickOnSpace value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getGenerateDoubleClickOnSpace

      public Boolean getGenerateDoubleClickOnSpace()
      If true, when the user navigates to a cell using arrow keys and hits Space, the cell will respond to a double click event.
      Returns:
      Current generateDoubleClickOnSpace value. Default value is false
    • setGridAdditionalCriteriaText

      public ListGrid setGridAdditionalCriteriaText(String gridAdditionalCriteriaText) throws IllegalStateException
      The additional criteria prefix to show in filter editor field hover, the filter action button or the sorter button before the descriptive version of the filterWindowCriteria, if any. The descriptive text is formatted by DataSource.getAdvancedCriteriaDescription().
      Parameters:
      gridAdditionalCriteriaText - New gridAdditionalCriteriaText value. Default value is "Grid additional criteria:"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGridAdditionalCriteriaText

      public String getGridAdditionalCriteriaText()
      The additional criteria prefix to show in filter editor field hover, the filter action button or the sorter button before the descriptive version of the filterWindowCriteria, if any. The descriptive text is formatted by DataSource.getAdvancedCriteriaDescription().
      Returns:
      Current gridAdditionalCriteriaText value. Default value is "Grid additional criteria:"
      See Also:
    • setGridComponents

      public ListGrid setGridComponents(ListGridComponent... gridComponents) throws IllegalStateException
      Array of components that make up this grid. This array controls which standard and/or custom parts will be displayed within this ListGrid.

      ListGrid is a subclass of VLayout and consists of a number of member components. The standard set of members are automatically generated by the grid, and include (for example) the header (a Toolbar of buttons for each field) and the body (a GridRenderer displaying the actual data contained in the grid).
      The default value of gridComponents is an Array of ListGridComponents listing the standard components in their default order:

           [ListGridComponent.FILTER_EDITOR, ListGridComponent.HEADER, ListGridComponent.BODY,
            ListGridComponent.SUMMARY_ROW]
        
      You can override gridComponents to change the order of standard components. You can also omit standard components this way, although it more efficient to use the related "show" property if available (eg showFilterEditor). Note that this array must contain an entry for the "body" - listGrids with no body showing are unsupported.
      Advanced note: The live components generated for each of these standard ListGridComponent types may differ across different listGrids. For example if this grid has any frozen fields, the "body" entry will actually be created as an HLayout containing two GridRenderers (one for frozen fields, and one for unfrozen fields). This is really an implementation detail - the "body" entry in the gridComponents array simply specifies where the UI for the body should render within the ListGrid layout.

      By embedding a Canvas directly in this list you can add arbitrary additional components to the listGrid as members, and have them be displayed alongside the standard automatically generated parts of the ListGrid.

      Note that having added controls to gridComponents, you can still call APIs directly on those controls to change their appearance, and you can also show() and hide() them if they should not be shown in some circumstances.

      Tip: custom controls need to set layoutAlign:"center" to appear vertically centered.

      See this example of subclassing ListGrid and using gridComponents to add a tool bar with standard functions that you want throughout your application.

      Parameters:
      gridComponents - New gridComponents value. Default value is (see below)
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getGridComponents

      public ListGridComponent[] getGridComponents()
      Array of components that make up this grid. This array controls which standard and/or custom parts will be displayed within this ListGrid.

      ListGrid is a subclass of VLayout and consists of a number of member components. The standard set of members are automatically generated by the grid, and include (for example) the header (a Toolbar of buttons for each field) and the body (a GridRenderer displaying the actual data contained in the grid).
      The default value of gridComponents is an Array of ListGridComponents listing the standard components in their default order:

           [ListGridComponent.FILTER_EDITOR, ListGridComponent.HEADER, ListGridComponent.BODY,
            ListGridComponent.SUMMARY_ROW]
        
      You can override gridComponents to change the order of standard components. You can also omit standard components this way, although it more efficient to use the related "show" property if available (eg showFilterEditor). Note that this array must contain an entry for the "body" - listGrids with no body showing are unsupported.
      Advanced note: The live components generated for each of these standard ListGridComponent types may differ across different listGrids. For example if this grid has any frozen fields, the "body" entry will actually be created as an HLayout containing two GridRenderers (one for frozen fields, and one for unfrozen fields). This is really an implementation detail - the "body" entry in the gridComponents array simply specifies where the UI for the body should render within the ListGrid layout.

      By embedding a Canvas directly in this list you can add arbitrary additional components to the listGrid as members, and have them be displayed alongside the standard automatically generated parts of the ListGrid.

      Note that having added controls to gridComponents, you can still call APIs directly on those controls to change their appearance, and you can also show() and hide() them if they should not be shown in some circumstances.

      Tip: custom controls need to set layoutAlign:"center" to appear vertically centered.

      See this example of subclassing ListGrid and using gridComponents to add a tool bar with standard functions that you want throughout your application.

      Returns:
      Current gridComponents value. Default value is (see below)
    • setGridComponents

      public ListGrid setGridComponents(Object... gridComponents) throws IllegalStateException
      Array of components that make up this grid. This array controls which standard and/or custom parts will be displayed within this ListGrid.

      ListGrid is a subclass of VLayout and consists of a number of member components. The standard set of members are automatically generated by the grid, and include (for example) the header (a Toolbar of buttons for each field) and the body (a GridRenderer displaying the actual data contained in the grid).
      The default value of gridComponents is an Array of ListGridComponents listing the standard components in their default order:

           [ListGridComponent.FILTER_EDITOR, ListGridComponent.HEADER, ListGridComponent.BODY,
            ListGridComponent.SUMMARY_ROW]
        
      You can override gridComponents to change the order of standard components. You can also omit standard components this way, although it more efficient to use the related "show" property if available (eg showFilterEditor). Note that this array must contain an entry for the "body" - listGrids with no body showing are unsupported.
      Advanced note: The live components generated for each of these standard ListGridComponent types may differ across different listGrids. For example if this grid has any frozen fields, the "body" entry will actually be created as an HLayout containing two GridRenderers (one for frozen fields, and one for unfrozen fields). This is really an implementation detail - the "body" entry in the gridComponents array simply specifies where the UI for the body should render within the ListGrid layout.

      By embedding a Canvas directly in this list you can add arbitrary additional components to the listGrid as members, and have them be displayed alongside the standard automatically generated parts of the ListGrid.

      Note that having added controls to gridComponents, you can still call APIs directly on those controls to change their appearance, and you can also show() and hide() them if they should not be shown in some circumstances.

      Tip: custom controls need to set layoutAlign:"center" to appear vertically centered.

      See this example of subclassing ListGrid and using gridComponents to add a tool bar with standard functions that you want throughout your application.

      Parameters:
      gridComponents - New gridComponents value. Default value is (see below)
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • setGridSummaryRecordProperty

      public ListGrid setGridSummaryRecordProperty(String gridSummaryRecordProperty)
      If showGridSummary is true, this attribute will be set to true on the record object representing the grid summary row.
      Parameters:
      gridSummaryRecordProperty - New gridSummaryRecordProperty value. Default value is "isGridSummary"
      Returns:
      ListGrid instance, for chaining setter calls
    • getGridSummaryRecordProperty

      public String getGridSummaryRecordProperty()
      If showGridSummary is true, this attribute will be set to true on the record object representing the grid summary row.
      Returns:
      Current gridSummaryRecordProperty value. Default value is "isGridSummary"
    • setGroupByAsyncThreshold

      public ListGrid setGroupByAsyncThreshold(int groupByAsyncThreshold)
      When grouping is requested with this number of records or more, an asynchronous approach is used to avoid the browser showing a "script is running slowly.." message prompting the user to stop execution of JavaScript.

      Note that groupByMaxRecords must be set at least as high as groupByAsyncThreshold or asynchronous grouping will never be used.

      During async grouping, interactivity is blocked and the asynchGroupingPrompt is shown to the user, then hidden when grouping completes; ListGrid.groupByComplete() then fires.

      Note that this async processing covers grouping only - it does not cover whole grid or per-group summaries, client-side sort or filter, or other operations that may cause the browser to show the "script is running slowly" prompt when working with very large sets of records in a grid.

      At this time, there is no generally effective way to avoid this warning dialog appearing with very large datasets in Microsoft's Internet Explorer (IE). IE's severely flawed detection algorithm for runaway scripts has been shown to interrupt computations after only 0.2 seconds elapsed time even if the computation would have finished in 0.3 seconds. Optimizations that reduce execution time can sometimes trigger the "script running slowly" dialog sooner. Since not every operation can reasonably be made asynchronous, the current recommendation is to avoid working with overly large datasets until the affected versions of IE are obsoleted.

      Parameters:
      groupByAsyncThreshold - New groupByAsyncThreshold value. Default value is 50
      Returns:
      ListGrid instance, for chaining setter calls
    • getGroupByAsyncThreshold

      public int getGroupByAsyncThreshold()
      When grouping is requested with this number of records or more, an asynchronous approach is used to avoid the browser showing a "script is running slowly.." message prompting the user to stop execution of JavaScript.

      Note that groupByMaxRecords must be set at least as high as groupByAsyncThreshold or asynchronous grouping will never be used.

      During async grouping, interactivity is blocked and the asynchGroupingPrompt is shown to the user, then hidden when grouping completes; ListGrid.groupByComplete() then fires.

      Note that this async processing covers grouping only - it does not cover whole grid or per-group summaries, client-side sort or filter, or other operations that may cause the browser to show the "script is running slowly" prompt when working with very large sets of records in a grid.

      At this time, there is no generally effective way to avoid this warning dialog appearing with very large datasets in Microsoft's Internet Explorer (IE). IE's severely flawed detection algorithm for runaway scripts has been shown to interrupt computations after only 0.2 seconds elapsed time even if the computation would have finished in 0.3 seconds. Optimizations that reduce execution time can sometimes trigger the "script running slowly" dialog sooner. Since not every operation can reasonably be made asynchronous, the current recommendation is to avoid working with overly large datasets until the affected versions of IE are obsoleted.

      Returns:
      Current groupByAsyncThreshold value. Default value is 50
    • setGroupByField

      public ListGrid setGroupByField(String groupByField) throws IllegalStateException
      List of fields to group grid records. If only a single field is used, that field may be specified as a string. After initialization, use groupBy() to update the grouping field list, instead of modifying groupByField directly.
      Parameters:
      groupByField - New groupByField value. Default value is see below
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setGroupByField

      public ListGrid setGroupByField(String... groupByField) throws IllegalStateException
      List of fields to group grid records. If only a single field is used, that field may be specified as a string. After initialization, use groupBy() to update the grouping field list, instead of modifying groupByField directly.
      Parameters:
      groupByField - New groupByField value. Default value is see below
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setGroupByFieldSummaries

      public ListGrid setGroupByFieldSummaries(String... groupByFieldSummaries)
      If this grid is grouped, and showGroupSummary is true, this attribute may be set to an array of groupBy field names for which group summaries should appear.

      This is particularly useful for listGrids grouped by more than one field as it allows developers to display the group summary for a particular nested group without showing a summary for every level of the tree.

      If this method is called after the component has been drawn/initialized: Setter for the groupByFieldSummaries attribute

      Note : This is an advanced setting

      Parameters:
      groupByFieldSummaries - new value for this.groupByFieldSummaries. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupByFieldSummaries

      public String[] getGroupByFieldSummaries()
      If this grid is grouped, and showGroupSummary is true, this attribute may be set to an array of groupBy field names for which group summaries should appear.

      This is particularly useful for listGrids grouped by more than one field as it allows developers to display the group summary for a particular nested group without showing a summary for every level of the tree.

      Returns:
      Current groupByFieldSummaries value. Default value is null
      See Also:
    • setGroupByMaxRecords

      public ListGrid setGroupByMaxRecords(int groupByMaxRecords)
      Maximum number of records to which a groupBy can be applied. If there are more records, grouping will not be available via the default header context menu, and calls to groupBy() will be ignored.

      The maximum exists because ListGrid grouping is performed in-browser, hence requires loading of all records that match the current filter criteria before records can be grouped. The default maximum represents a number of records which are safe to load in legacy browsers such as Internet Explorer 8 (modern browsers can handle far more), and is also a good upper limit from the perspective of loading data from a database.

      Going beyond this limit can cause "script running slowly" errors from legacy browsers (as well as high database load). To build an interface for grouping that handles arbitrary data volume, use a TreeGrid with TreeGrid.loadDataOnDemand with server-side grouping code.

      Parameters:
      groupByMaxRecords - New groupByMaxRecords value. Default value is 1000
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupByMaxRecords

      public int getGroupByMaxRecords()
      Maximum number of records to which a groupBy can be applied. If there are more records, grouping will not be available via the default header context menu, and calls to groupBy() will be ignored.

      The maximum exists because ListGrid grouping is performed in-browser, hence requires loading of all records that match the current filter criteria before records can be grouped. The default maximum represents a number of records which are safe to load in legacy browsers such as Internet Explorer 8 (modern browsers can handle far more), and is also a good upper limit from the perspective of loading data from a database.

      Going beyond this limit can cause "script running slowly" errors from legacy browsers (as well as high database load). To build an interface for grouping that handles arbitrary data volume, use a TreeGrid with TreeGrid.loadDataOnDemand with server-side grouping code.

      Returns:
      Current groupByMaxRecords value. Default value is 1000
      See Also:
    • setGroupByMaxRecordsExceededMessage

      public ListGrid setGroupByMaxRecordsExceededMessage(String groupByMaxRecordsExceededMessage)
      Warning shown to the user when a grouping attempt failed as the data set length exceeds groupByMaxRecords.

      If defined, this prompt will be shown to the user in a warning dialog when the user attempts to group a data set that exceeds the groupByMaxRecords threshold.

      This can occur if an already-grouped grid's filter criteria are modified such that a new set of records is loaded from the DataSource which exceeds the groupByMaxRecords threshold.

      It can also occur when a user attempts to group a grid with a partially loaded data set where the true size of the data set is not known due to progressiveLoading. In this case, the grouping logic will attempt to retrieve all the records in the data set and may get back a new total row count from the DataSource which exceeds groupByMaxRecords.

      In either case the warning will be displayed to the user and the group by menu item will be disabled.

      See also disabledGroupByPrompt.

      Parameters:
      groupByMaxRecordsExceededMessage - New groupByMaxRecordsExceededMessage value. Default value is "Grouping has been disabled. This data set is too large to apply grouping efficiently."
      Returns:
      ListGrid instance, for chaining setter calls
    • getGroupByMaxRecordsExceededMessage

      public String getGroupByMaxRecordsExceededMessage()
      Warning shown to the user when a grouping attempt failed as the data set length exceeds groupByMaxRecords.

      If defined, this prompt will be shown to the user in a warning dialog when the user attempts to group a data set that exceeds the groupByMaxRecords threshold.

      This can occur if an already-grouped grid's filter criteria are modified such that a new set of records is loaded from the DataSource which exceeds the groupByMaxRecords threshold.

      It can also occur when a user attempts to group a grid with a partially loaded data set where the true size of the data set is not known due to progressiveLoading. In this case, the grouping logic will attempt to retrieve all the records in the data set and may get back a new total row count from the DataSource which exceeds groupByMaxRecords.

      In either case the warning will be displayed to the user and the group by menu item will be disabled.

      See also disabledGroupByPrompt.

      Returns:
      Current groupByMaxRecordsExceededMessage value. Default value is "Grouping has been disabled. This data set is too large to apply grouping efficiently."
    • setGroupByText

      public ListGrid setGroupByText(String groupByText)
      If we're showing a headerContextMenu for this grid and this.canGroupBy is true, this string will be shown as the title for the menu item to toggle the group by setting for a field.

      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed, with title available as a variable containing the field title.

      Default value returns "Group by " + the field's summary title.

      Note : This is an advanced setting

      Parameters:
      groupByText - New groupByText value. Default value is "Group by ${title}"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupByText

      public String getGroupByText()
      If we're showing a headerContextMenu for this grid and this.canGroupBy is true, this string will be shown as the title for the menu item to toggle the group by setting for a field.

      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed, with title available as a variable containing the field title.

      Default value returns "Group by " + the field's summary title.

      Returns:
      If we're showing a headerContextMenu for this grid and this.canGroupBy is true, this string will be shown as the title for the menu item to toggle the group by setting for a field.
      Default implementation evaluates and returns the dynamic groupByText string. Default value is "Group by ${title}"
      See Also:
    • setGroupIcon

      public ListGrid setGroupIcon(String groupIcon)
      The URL of the base icon for the group icons in this listGrid. Default value may be overridden by the current skin.
      Parameters:
      groupIcon - New groupIcon value. Default value is "[SKINIMG]/TreeGrid/opener.gif"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupIcon

      public String getGroupIcon()
      The URL of the base icon for the group icons in this listGrid. Default value may be overridden by the current skin.
      Returns:
      Current groupIcon value. Default value is "[SKINIMG]/TreeGrid/opener.gif"
      See Also:
    • setGroupIconSize

      public ListGrid setGroupIconSize(int groupIconSize)
      Default width and height of group icons for this ListGrid.
      Parameters:
      groupIconSize - New groupIconSize value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupIconSize

      public int getGroupIconSize()
      Default width and height of group icons for this ListGrid.
      Returns:
      Current groupIconSize value. Default value is 16
      See Also:
    • setGroupIconStyle

      public ListGrid setGroupIconStyle(String groupIconStyle)
      Custom style to apply to the groupIcon displayed in collapsible rows when canGroupBy is true.
      Parameters:
      groupIconStyle - New groupIconStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupIconStyle

      public String getGroupIconStyle()
      Custom style to apply to the groupIcon displayed in collapsible rows when canGroupBy is true.
      Returns:
      Current groupIconStyle value. Default value is null
      See Also:
    • setGroupIndentSize

      public ListGrid setGroupIndentSize(int groupIndentSize)
      Default number of pixels by which to indent subgroups relative to parent group.
      Parameters:
      groupIndentSize - New groupIndentSize value. Default value is 20
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupIndentSize

      public int getGroupIndentSize()
      Default number of pixels by which to indent subgroups relative to parent group.
      Returns:
      Current groupIndentSize value. Default value is 20
      See Also:
    • setGroupLeadingIndent

      public ListGrid setGroupLeadingIndent(int groupLeadingIndent)
      Default number of pixels by which to indent all groups.
      Parameters:
      groupLeadingIndent - New groupLeadingIndent value. Default value is 10
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupLeadingIndent

      public int getGroupLeadingIndent()
      Default number of pixels by which to indent all groups.
      Returns:
      Current groupLeadingIndent value. Default value is 10
      See Also:
    • setGroupNodeBaseStyle

      public ListGrid setGroupNodeBaseStyle(String groupNodeBaseStyle)
      Base style for group rows.

      Note that this property has no effect if groupNodeStyle is non null.

      Parameters:
      groupNodeBaseStyle - New groupNodeBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getGroupNodeBaseStyle

      public String getGroupNodeBaseStyle()
      Base style for group rows.

      Note that this property has no effect if groupNodeStyle is non null.

      Returns:
      Current groupNodeBaseStyle value. Default value is null
    • setGroupNodeStyle

      public ListGrid setGroupNodeStyle(String groupNodeStyle)
      The CSS style that group rows will have.

      Note that this is not a base style, so, if this property is set, group nodes will not show stateful styling (different styles for showRollOver, alternateRecordStyles, etc). To enable stateful styling for groupNodes, set this property to null and specify a groupNodeBaseStyle

      Parameters:
      groupNodeStyle - New groupNodeStyle value. Default value is "groupNode"
      Returns:
      ListGrid instance, for chaining setter calls
    • getGroupNodeStyle

      public String getGroupNodeStyle()
      The CSS style that group rows will have.

      Note that this is not a base style, so, if this property is set, group nodes will not show stateful styling (different styles for showRollOver, alternateRecordStyles, etc). To enable stateful styling for groupNodes, set this property to null and specify a groupNodeBaseStyle

      Returns:
      Current groupNodeStyle value. Default value is "groupNode"
    • setGroupSortDirection

      public ListGrid setGroupSortDirection(SortDirection groupSortDirection)
      When sortByGroupFirst is active, the sorting direction applied for implicit sorting by the field(s) used for grouping. Default of null means that sort direction is based on the current direction of user-configured sort, or is "ascending" if the user has not sorted the data.
      Parameters:
      groupSortDirection - New groupSortDirection value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupSortDirection

      public SortDirection getGroupSortDirection()
      When sortByGroupFirst is active, the sorting direction applied for implicit sorting by the field(s) used for grouping. Default of null means that sort direction is based on the current direction of user-configured sort, or is "ascending" if the user has not sorted the data.
      Returns:
      Current groupSortDirection value. Default value is null
      See Also:
    • setGroupState

      public ListGrid setGroupState(String groupState)
      Initial group state for the grid.

      viewState can be used to initialize all view properties of the grid. When doing so, groupState is not needed because viewState includes it as well. If both are provided, groupState has priority for group state.

      If this method is called after the component has been drawn/initialized: Reset this grid's grouping to match the ListGridGroupState object passed in.
      Used to restore previous state retrieved from the grid by a call to getGroupState().

      Parameters:
      groupState - Object describing the desired grouping state of the grid. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getGroupState

      public String getGroupState()
      Initial group state for the grid.

      viewState can be used to initialize all view properties of the grid. When doing so, groupState is not needed because viewState includes it as well. If both are provided, groupState has priority for group state.

      Returns:
      Returns a snapshot of the current grouping state of this ListGrid.
      This object can be passed to setGroupState() to reset this grid's grouping to the current state (assuming the same data / fields are present in the grid).
      . Default value is null
      See Also:
    • setGroupSummaryRecordProperty

      public ListGrid setGroupSummaryRecordProperty(String groupSummaryRecordProperty)
      If showGroupSummary is true, this attribute will be set to true on each record object representing a group-level summary row.
      Parameters:
      groupSummaryRecordProperty - New groupSummaryRecordProperty value. Default value is "isGroupSummary"
      Returns:
      ListGrid instance, for chaining setter calls
    • getGroupSummaryRecordProperty

      public String getGroupSummaryRecordProperty()
      If showGroupSummary is true, this attribute will be set to true on each record object representing a group-level summary row.
      Returns:
      Current groupSummaryRecordProperty value. Default value is "isGroupSummary"
    • setGroupSummaryStyle

      public ListGrid setGroupSummaryStyle(String groupSummaryStyle) throws IllegalStateException
      ListGridRecord.customStyle for the group-level summary row displayed when showGroupSummary is true.
      Parameters:
      groupSummaryStyle - New groupSummaryStyle value. Default value is "gridSummaryCell"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGroupSummaryStyle

      public String getGroupSummaryStyle()
      ListGridRecord.customStyle for the group-level summary row displayed when showGroupSummary is true.
      Returns:
      Current groupSummaryStyle value. Default value is "gridSummaryCell"
      See Also:
    • setGroupTitleColumnProperties

      public ListGrid setGroupTitleColumnProperties(ListGridField groupTitleColumnProperties) throws IllegalStateException
      Custom properties for the automatically generated groupTitleColumn.

      See showGroupTitleColumn for an overview of the groupTitleColumn.

      Parameters:
      groupTitleColumnProperties - New groupTitleColumnProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getGroupTitleColumnProperties

      public ListGridField getGroupTitleColumnProperties()
      Custom properties for the automatically generated groupTitleColumn.

      See showGroupTitleColumn for an overview of the groupTitleColumn.

      Returns:
      Current groupTitleColumnProperties value. Default value is null
    • setGroupTitleField

      public ListGrid setGroupTitleField(String groupTitleField) throws IllegalStateException
      When a list grid is grouped, each group shows under an auto generated header node. By default the title of the group will be shown, with a hanging indent in this node, and will span all columns in the grid. Setting this property causes the titles of auto-generated group nodes to appear as though they were values of the designated field instead of spanning all columns and record values in the designated groupTitleField will appear indented under the group title in a manner similar to how a TreeGrid shows a Tree.

      Note if showGroupSummaryInHeader is true, the header nodes will not show a single spanning title value by default - instead they will show the summary values for each field. In this case, if groupTitleField is unset, a groupTitleColumn can be automatically generated to show the title for each group.

      Parameters:
      groupTitleField - New groupTitleField value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGroupTitleField

      public String getGroupTitleField()
      When a list grid is grouped, each group shows under an auto generated header node. By default the title of the group will be shown, with a hanging indent in this node, and will span all columns in the grid. Setting this property causes the titles of auto-generated group nodes to appear as though they were values of the designated field instead of spanning all columns and record values in the designated groupTitleField will appear indented under the group title in a manner similar to how a TreeGrid shows a Tree.

      Note if showGroupSummaryInHeader is true, the header nodes will not show a single spanning title value by default - instead they will show the summary values for each field. In this case, if groupTitleField is unset, a groupTitleColumn can be automatically generated to show the title for each group.

      Returns:
      Current groupTitleField value. Default value is null
      See Also:
    • getGroupTree

      public Tree getGroupTree()
      The data tree that results from a call to groupBy(). This will be a ResultTree if dataSource is present, otherwise it will be a Tree.

      This component is an AutoChild named "groupTree". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current groupTree value. Default value is null
      See Also:
    • getHeader

      public Layout getHeader() throws IllegalStateException
      A Toolbar used to manager the headers shown for each column of the grid.

      This component is an AutoChild named "header". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current header value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
      See Also:
    • setHeaderAriaRole

      public ListGrid setHeaderAriaRole(String headerAriaRole) throws IllegalStateException
      Aria role for this listGrid's header. See getHeaderAriaRole()

      Note : This is an advanced setting

      Parameters:
      headerAriaRole - New headerAriaRole value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderAriaRole

      public String getHeaderAriaRole()
      Aria role for this listGrid's header. See getHeaderAriaRole()
      Returns:
      Returns the role for this listGrid's header.

      If headerAriaRole is explicitly provided, it will be used.
      Otherwise default implementation returns "row" if ariaRole is set to "grid". Default value is null

    • setHeaderAutoFitEvent

      public ListGrid setHeaderAutoFitEvent(AutoFitEvent headerAutoFitEvent) throws IllegalStateException
      Event on a ListGrid header that triggers auto fitting to data and/or title.

      Note that if sorting is enabled for the field and the headerAutoFitEvent is "click", both sorting and autofit occur on a click.

      Only has an impact when canAutoFitFields or ListGridField.canAutoFitWidth is set to true.

      Parameters:
      headerAutoFitEvent - New headerAutoFitEvent value. Default value is "doubleClick"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderAutoFitEvent

      public AutoFitEvent getHeaderAutoFitEvent()
      Event on a ListGrid header that triggers auto fitting to data and/or title.

      Note that if sorting is enabled for the field and the headerAutoFitEvent is "click", both sorting and autofit occur on a click.

      Only has an impact when canAutoFitFields or ListGridField.canAutoFitWidth is set to true.

      Returns:
      Current headerAutoFitEvent value. Default value is "doubleClick"
    • setHeaderBackgroundColor

      public ListGrid setHeaderBackgroundColor(String headerBackgroundColor)
      BackgroundColor for the header toolbar. Typically this is set to match the color of the header buttons.
      Parameters:
      headerBackgroundColor - New headerBackgroundColor value. Default value is "#CCCCCC"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHeaderBackgroundColor

      public String getHeaderBackgroundColor()
      BackgroundColor for the header toolbar. Typically this is set to match the color of the header buttons.
      Returns:
      Current headerBackgroundColor value. Default value is "#CCCCCC"
      See Also:
    • setHeaderBarStyle

      public ListGrid setHeaderBarStyle(String headerBarStyle) throws IllegalStateException
      Set the CSS style used for the header as a whole.
      Parameters:
      headerBarStyle - New headerBarStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderBarStyle

      public String getHeaderBarStyle()
      Set the CSS style used for the header as a whole.
      Returns:
      Current headerBarStyle value. Default value is null
      See Also:
    • setHeaderBaseStyle

      public ListGrid setHeaderBaseStyle(String headerBaseStyle) throws IllegalStateException
      Button.baseStyle to apply to the buttons in the header, and the sorter, for this ListGrid. Note that, depending on the Class of the header buttons, you may also need to set headerTitleStyle.
      Parameters:
      headerBaseStyle - New headerBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderBaseStyle

      public String getHeaderBaseStyle()
      Button.baseStyle to apply to the buttons in the header, and the sorter, for this ListGrid. Note that, depending on the Class of the header buttons, you may also need to set headerTitleStyle.
      Returns:
      Current headerBaseStyle value. Default value is null
      See Also:
    • setHeaderButtonAriaRole

      public ListGrid setHeaderButtonAriaRole(String headerButtonAriaRole) throws IllegalStateException
      Default role for header buttons. See getHeaderButtonAriaRole().

      Note : This is an advanced setting

      Parameters:
      headerButtonAriaRole - New headerButtonAriaRole value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderButtonAriaRole

      public String getHeaderButtonAriaRole()
      Returns:
      Returns the role for this listGrid's header buttons.

      If ListGridField.headerButtonAriaRole or headerButtonAriaRole is set, it will be used.
      Othewise, the default implementation returns "columnheader" if ariaRole is set to "grid", "button" otherwise. Default value is null

    • setHeaderButtonAriaState

      public ListGrid setHeaderButtonAriaState(Map headerButtonAriaState) throws IllegalStateException
      Default ARIA state for header buttons. See getHeaderButtonAriaState().

      Note : This is an advanced setting

      Parameters:
      headerButtonAriaState - New headerButtonAriaState value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderButtonAriaState

      public Map getHeaderButtonAriaState()
      Default ARIA state for header buttons. See getHeaderButtonAriaState().
      Returns:
      Returns a map of WAI ARIA state attribute values to be written into header buttons for this grid.

      Default implementation returns an object with combined properties from any specified header button aria state default object, overlaid with any ListGridField.headerButtonAriaState properties specified on the field itself, plus the following attributes:

      • haspopup - true if the button should show the header context menu
      • colindex - index of the column if ariaRole is "grid"
      • sort - "ascending", "descending" or "none" depending on the sort-state of the field
      Also, if an explicit property is set in ariaState, it will be respected and will take precedence over the calculated property. Default value is null
    • setHeaderButtonProperties

      public ListGrid setHeaderButtonProperties(Button headerButtonProperties) throws IllegalStateException
      Properties to apply to all header buttons. Overrides defaults applied via headerButtonDefaults.

      Note : This is an advanced setting

      Parameters:
      headerButtonProperties - New headerButtonProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderButtonProperties

      public Button getHeaderButtonProperties()
      Properties to apply to all header buttons. Overrides defaults applied via headerButtonDefaults.
      Returns:
      Current headerButtonProperties value. Default value is null
      See Also:
    • getHeaderContextMenu

      public Canvas getHeaderContextMenu() throws IllegalStateException
      The context menu displayed for column headers.

      This component is an AutoChild named "headerContextMenu". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current headerContextMenu value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
      See Also:
    • setHeaderHeight

      public ListGrid setHeaderHeight(int headerHeight)
      The height of this listGrid's header, in pixels.

      If this method is called after the component has been drawn/initialized: Modify the height of a listGrid. To hide the header set height to zero.
      Parameters:
      headerHeight - new height for the header. Default value is 22
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHeaderHeight

      public int getHeaderHeight()
      The height of this listGrid's header, in pixels.
      Returns:
      Current headerHeight value. Default value is 22
      See Also:
    • setHeaderHoverAlign

      public ListGrid setHeaderHoverAlign(Alignment headerHoverAlign)
      This property may be set to customize the alignment for the hover shown on ListGrid.headerHover().
      Parameters:
      headerHoverAlign - New headerHoverAlign value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHeaderHoverAlign

      public Alignment getHeaderHoverAlign()
      This property may be set to customize the alignment for the hover shown on ListGrid.headerHover().
      Returns:
      Current headerHoverAlign value. Default value is null
    • setHeaderHoverHeight

      public ListGrid setHeaderHoverHeight(Integer headerHoverHeight)
      Optional default height for the hover shown on ListGrid.headerHover().
      Parameters:
      headerHoverHeight - New headerHoverHeight value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHeaderHoverHeight

      public Integer getHeaderHoverHeight()
      Optional default height for the hover shown on ListGrid.headerHover().
      Returns:
      Current headerHoverHeight value. Default value is null
    • setHeaderHoverOpacity

      public ListGrid setHeaderHoverOpacity(Integer headerHoverOpacity)
      This property may be set to customize the opacity for the hover shown on ListGrid.headerHover().
      Parameters:
      headerHoverOpacity - New headerHoverOpacity value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHeaderHoverOpacity

      public Integer getHeaderHoverOpacity()
      This property may be set to customize the opacity for the hover shown on ListGrid.headerHover().
      Returns:
      Current headerHoverOpacity value. Default value is null
    • setHeaderHoverStyle

      public ListGrid setHeaderHoverStyle(String headerHoverStyle)
      This property may be set to customize the css style for the hover shown on ListGrid.headerHover().
      Parameters:
      headerHoverStyle - New headerHoverStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHeaderHoverStyle

      public String getHeaderHoverStyle()
      This property may be set to customize the css style for the hover shown on ListGrid.headerHover().
      Returns:
      Current headerHoverStyle value. Default value is null
      See Also:
    • setHeaderHoverVAlign

      public ListGrid setHeaderHoverVAlign(VerticalAlignment headerHoverVAlign)
      This property may be set to customize the vertical alignment for the hover shown on ListGrid.headerHover().
      Parameters:
      headerHoverVAlign - New headerHoverVAlign value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHeaderHoverVAlign

      public VerticalAlignment getHeaderHoverVAlign()
      This property may be set to customize the vertical alignment for the hover shown on ListGrid.headerHover().
      Returns:
      Current headerHoverVAlign value. Default value is null
    • setHeaderHoverWidth

      public ListGrid setHeaderHoverWidth(Integer headerHoverWidth)
      Optional default width for the hover shown on ListGrid.headerHover().
      Parameters:
      headerHoverWidth - New headerHoverWidth value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHeaderHoverWidth

      public Integer getHeaderHoverWidth()
      Optional default width for the hover shown on ListGrid.headerHover().
      Returns:
      Current headerHoverWidth value. Default value is null
    • setHeaderHoverWrap

      public ListGrid setHeaderHoverWrap(Boolean headerHoverWrap)
      This property may be set to customize the wrap attribute for the hover shown on ListGrid.headerHover().
      Parameters:
      headerHoverWrap - New headerHoverWrap value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHeaderHoverWrap

      public Boolean getHeaderHoverWrap()
      This property may be set to customize the wrap attribute for the hover shown on ListGrid.headerHover().
      Returns:
      Current headerHoverWrap value. Default value is null
    • getHeaderMenuButton

      public StatefulCanvas getHeaderMenuButton() throws IllegalStateException
      If showHeaderMenuButton is true, when the user rolls over the header buttons in this grid the headerMenuButton will be shown over the header button in question. When clicked this button will display the standard header context menu (see displayHeaderContextMenu()).

      Several properties exist to customize the appearance of the headerMenuButton. Also see the com.smartgwt.client.types.AutoChild documentation for information on how to make free-form modifications to autoChild widgets

      This component is an AutoChild named "headerMenuButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current headerMenuButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setHeaderMenuButtonHeight

      public ListGrid setHeaderMenuButtonHeight(int headerMenuButtonHeight) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the height of the auto-generated headerMenuButton

      Note : This is an advanced setting

      Parameters:
      headerMenuButtonHeight - New headerMenuButtonHeight value. Default value is "100%"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderMenuButtonHeight

      public int getHeaderMenuButtonHeight()
      If showHeaderMenuButton is true, this property governs the height of the auto-generated headerMenuButton
      Returns:
      Current headerMenuButtonHeight value. Default value is "100%"
      See Also:
    • setHeaderMenuButtonHeight

      public ListGrid setHeaderMenuButtonHeight(String headerMenuButtonHeight) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the height of the auto-generated headerMenuButton

      Note : This is an advanced setting

      Parameters:
      headerMenuButtonHeight - New headerMenuButtonHeight value. Default value is "100%"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderMenuButtonHeightAsString

      public String getHeaderMenuButtonHeightAsString()
      If showHeaderMenuButton is true, this property governs the height of the auto-generated headerMenuButton
      Returns:
      Current headerMenuButtonHeight value. Default value is "100%"
      See Also:
    • setHeaderMenuButtonIcon

      public ListGrid setHeaderMenuButtonIcon(String headerMenuButtonIcon) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the icon shown on the auto-generated headerMenuButton

      Note : This is an advanced setting

      Parameters:
      headerMenuButtonIcon - New headerMenuButtonIcon value. Default value is "[SKIN]/ListGrid/headerMenuButton_icon.gif"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderMenuButtonIcon

      public String getHeaderMenuButtonIcon()
      If showHeaderMenuButton is true, this property governs the icon shown on the auto-generated headerMenuButton
      Returns:
      Current headerMenuButtonIcon value. Default value is "[SKIN]/ListGrid/headerMenuButton_icon.gif"
      See Also:
    • setHeaderMenuButtonIconHeight

      public ListGrid setHeaderMenuButtonIconHeight(int headerMenuButtonIconHeight) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the height of the icon shown on the auto-generated headerMenuButton

      Note : This is an advanced setting

      Parameters:
      headerMenuButtonIconHeight - New headerMenuButtonIconHeight value. Default value is 7
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderMenuButtonIconHeight

      public int getHeaderMenuButtonIconHeight()
      If showHeaderMenuButton is true, this property governs the height of the icon shown on the auto-generated headerMenuButton
      Returns:
      Current headerMenuButtonIconHeight value. Default value is 7
    • setHeaderMenuButtonIconWidth

      public ListGrid setHeaderMenuButtonIconWidth(int headerMenuButtonIconWidth) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the width of the icon shown on the auto-generated headerMenuButton

      Note : This is an advanced setting

      Parameters:
      headerMenuButtonIconWidth - New headerMenuButtonIconWidth value. Default value is 7
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderMenuButtonIconWidth

      public int getHeaderMenuButtonIconWidth()
      If showHeaderMenuButton is true, this property governs the width of the icon shown on the auto-generated headerMenuButton
      Returns:
      Current headerMenuButtonIconWidth value. Default value is 7
    • setHeaderMenuButtonSnapOffsetLeft

      public ListGrid setHeaderMenuButtonSnapOffsetLeft(Integer headerMenuButtonSnapOffsetLeft)
      Offset of the right edge of a headerMenuButton from the right edge of it's parent button.
      Parameters:
      headerMenuButtonSnapOffsetLeft - New headerMenuButtonSnapOffsetLeft value. Default value is 0
      Returns:
      ListGrid instance, for chaining setter calls
    • getHeaderMenuButtonSnapOffsetLeft

      public Integer getHeaderMenuButtonSnapOffsetLeft()
      Offset of the right edge of a headerMenuButton from the right edge of it's parent button.
      Returns:
      Current headerMenuButtonSnapOffsetLeft value. Default value is 0
    • setHeaderMenuButtonWidth

      public ListGrid setHeaderMenuButtonWidth(int headerMenuButtonWidth) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the width of the auto-generated headerMenuButton

      Note : This is an advanced setting

      Parameters:
      headerMenuButtonWidth - New headerMenuButtonWidth value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderMenuButtonWidth

      public int getHeaderMenuButtonWidth()
      If showHeaderMenuButton is true, this property governs the width of the auto-generated headerMenuButton
      Returns:
      Current headerMenuButtonWidth value. Default value is 16
      See Also:
    • setHeaderRadius

      public ListGrid setHeaderRadius(String headerRadius)
      When set to any valid CSS border-radius string, allows for a rounded header in this grid by applying a corner-radius to the left of the header, and to the right of the corner sort-button if it's visible, or the right of the header otherwise. This styling is applied on top of the regular header styles, so will work with any design, and is also applied correctly with or without frozen fields.

      If this method is called after the component has been drawn/initialized: Setter for headerRadius, which provides rounded corners for this grid's header area.
      Parameters:
      headerRadius - any CSS border-radius string, with 1 to 4 space-separated sizes. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHeaderRadius

      public String getHeaderRadius()
      When set to any valid CSS border-radius string, allows for a rounded header in this grid by applying a corner-radius to the left of the header, and to the right of the corner sort-button if it's visible, or the right of the header otherwise. This styling is applied on top of the regular header styles, so will work with any design, and is also applied correctly with or without frozen fields.
      Returns:
      Current headerRadius value. Default value is null
    • setHeaderShadowColor

      public ListGrid setHeaderShadowColor(String headerShadowColor) throws IllegalStateException
      If showHeaderShadow is true, the Canvas.shadowColor for the header shadow.

      Note : This is an advanced setting

      Parameters:
      headerShadowColor - New headerShadowColor value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderShadowColor

      public String getHeaderShadowColor()
      If showHeaderShadow is true, the Canvas.shadowColor for the header shadow.
      Returns:
      Current headerShadowColor value. Default value is null
      See Also:
    • setHeaderShadowHOffset

      public ListGrid setHeaderShadowHOffset(int headerShadowHOffset) throws IllegalStateException
      If showHeaderShadow is true, the Canvas.shadowHOffset for the header shadow

      Note : This is an advanced setting

      Parameters:
      headerShadowHOffset - New headerShadowHOffset value. Default value is 0
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderShadowHOffset

      public int getHeaderShadowHOffset()
      If showHeaderShadow is true, the Canvas.shadowHOffset for the header shadow
      Returns:
      Current headerShadowHOffset value. Default value is 0
    • setHeaderShadowSoftness

      public ListGrid setHeaderShadowSoftness(int headerShadowSoftness) throws IllegalStateException
      If showHeaderShadow is true, the Canvas.shadowSoftness for the header shadow

      Note : This is an advanced setting

      Parameters:
      headerShadowSoftness - New headerShadowSoftness value. Default value is 1
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderShadowSoftness

      public int getHeaderShadowSoftness()
      If showHeaderShadow is true, the Canvas.shadowSoftness for the header shadow
      Returns:
      Current headerShadowSoftness value. Default value is 1
    • setHeaderShadowVOffset

      public ListGrid setHeaderShadowVOffset(int headerShadowVOffset) throws IllegalStateException
      If showHeaderShadow is true, the Canvas.shadowVOffset for the header shadow

      Note : This is an advanced setting

      Parameters:
      headerShadowVOffset - New headerShadowVOffset value. Default value is 1
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderShadowVOffset

      public int getHeaderShadowVOffset()
      If showHeaderShadow is true, the Canvas.shadowVOffset for the header shadow
      Returns:
      Current headerShadowVOffset value. Default value is 1
    • getHeaderSpan

      public StatefulCanvas getHeaderSpan()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      headerSpans are created via the com.smartgwt.client.types.AutoChild pattern, hence headerSpanConstructor, headerSpanDefaults and headerSpanProperties are valid.

      Returns:
      null
    • setHeaderSpanHeight

      public ListGrid setHeaderSpanHeight(Integer headerSpanHeight) throws IllegalStateException
      Default height for a headerSpan with no height specified.

      If headerSpanHeight is not specified (the default), headerSpans will be 1/2 of headerHeight.

      Parameters:
      headerSpanHeight - New headerSpanHeight value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHeaderSpanHeight

      public Integer getHeaderSpanHeight()
      Default height for a headerSpan with no height specified.

      If headerSpanHeight is not specified (the default), headerSpans will be 1/2 of headerHeight.

      Returns:
      Current headerSpanHeight value. Default value is null
    • setHeaderSpans

      public ListGrid setHeaderSpans(HeaderSpan... headerSpans)
      Header spans are a second level of headers that appear above the normal ListGrid headers, spanning one or more listGrid fields in a manner similar to a column-spanning cell in an HTML table.

      A header span can be created by simply naming the fields the header should span. The example below creates a headerSpan that spans the first two fields of the ListGrid.

             ListGrid grid = new ListGrid();
             grid.setHeaderHeight(40);
             grid.setFields(new ListGridField[] {
                 new ListGridField("field1"),
                 new ListGridField("field2"),
                 new ListGridField("field3")
             });
             grid.setHeaderSpans(new HeaderSpan[] {
                 new HeaderSpan("Field 1 and 2", new String[] {"field1", "field2"})
             });
        
      Header spans can be nested, allowing fields to be grouped by multiple levels of granularity. See HeaderSpan.spans for further information on nesting spans.

      Header spans will automatically react to resizing of the headers they span, and will be hidden automatically when all of the spanned fields are hidden.

      Header spans appear in the header area of the ListGrid, sharing space with the existing headers, so it's typical to set headerHeight to approximately double its normal height when using headerSpans, or if using nested header spans, the default header height multiplied by the number of levels of header spans to be shown.

      See HeaderSpan for many properties that allow the control of the appearance of headerSpans.

      Neither headerSpans themselves nor the fields within them may be drag reordered, but other unspanned headers may be.

      A span can only span adjacent fields - if a span is defined and the spanned fields don't sit next to each other in the specified fields array, the fields array will be automatically reordered to match the order specified in the span's HeaderSpan.fields array.

      Note that headerSpans primarily provide a visual cue for grouping multiple headers together. If you have an OLAP, data "cube" or multi-dimensional data model, the CubeGrid component is the right choice.

      If this method is called after the component has been drawn/initialized: Update the headerSpans configuration on the grid dynamically.

      Parameters:
      headerSpans - same configuration block as that passed to headerSpans. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • setHeaderTitleStyle

      public ListGrid setHeaderTitleStyle(String headerTitleStyle) throws IllegalStateException
      StretchImgButton.titleStyle to apply to the buttons in the header, and the sorter, for this ListGrid. Note that this will typically only have an effect if headerButtonConstructor is set to StretchImgButton or a subclass thereof.
      Parameters:
      headerTitleStyle - New headerTitleStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderTitleStyle

      public String getHeaderTitleStyle()
      StretchImgButton.titleStyle to apply to the buttons in the header, and the sorter, for this ListGrid. Note that this will typically only have an effect if headerButtonConstructor is set to StretchImgButton or a subclass thereof.
      Returns:
      Current headerTitleStyle value. Default value is null
      See Also:
    • setHeaderTitleVAlign

      public ListGrid setHeaderTitleVAlign(VerticalAlignment headerTitleVAlign) throws IllegalStateException
      Specifies vertical alignment in the column headers: "top", "center", or "bottom". Can be overridden for individual fields by setting ListGridField.valign.

      When using rotated titles, this attribute defaults to "bottom" if it remains unset.

      Parameters:
      headerTitleVAlign - New headerTitleVAlign value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHeaderTitleVAlign

      public VerticalAlignment getHeaderTitleVAlign()
      Specifies vertical alignment in the column headers: "top", "center", or "bottom". Can be overridden for individual fields by setting ListGridField.valign.

      When using rotated titles, this attribute defaults to "bottom" if it remains unset.

      Returns:
      Current headerTitleVAlign value. Default value is null
      See Also:
    • setHideEmptySummaryRow

      public ListGrid setHideEmptySummaryRow(Boolean hideEmptySummaryRow)
      If true, causes the summaryRow component to be hidden if it has no data after summaries have been recalculated
      Parameters:
      hideEmptySummaryRow - New hideEmptySummaryRow value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHideEmptySummaryRow

      public Boolean getHideEmptySummaryRow()
      If true, causes the summaryRow component to be hidden if it has no data after summaries have been recalculated
      Returns:
      Current hideEmptySummaryRow value. Default value is null
    • setHideFilterEditorTitle

      public ListGrid setHideFilterEditorTitle(String hideFilterEditorTitle)
      When canShowFilterEditor is true, this is the title for the filterEditor show/hide menu-item, in the headerContextmenu, when the filterEditor is visible.

      showFilterEditorTitle affects the same menu-item when the filterEditor is hidden.

      Parameters:
      hideFilterEditorTitle - New hideFilterEditorTitle value. Default value is "Hide Filter Row"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHideFilterEditorTitle

      public String getHideFilterEditorTitle()
      When canShowFilterEditor is true, this is the title for the filterEditor show/hide menu-item, in the headerContextmenu, when the filterEditor is visible.

      showFilterEditorTitle affects the same menu-item when the filterEditor is hidden.

      Returns:
      Current hideFilterEditorTitle value. Default value is "Hide Filter Row"
      See Also:
    • setHiliteCanReplaceValue

      public ListGrid setHiliteCanReplaceValue(Boolean hiliteCanReplaceValue) throws IllegalStateException
      If set, end users can create advanced hiliting rules that will use the Hilite.replacementValue feature to cause values in hilited cells to be replaced with a user-entered value. For example, a user could create a hilite rule that replaces numeric values ranging from 0.5 to 1.0 with the text "LOW".

      Specifically, when the "Add Advanced Rule" button is pressed and hiliteCanReplaceValue is true, the user will see a text entry field titled "Replace value with" (hiliteReplaceValueFieldTitle) and if they enter a value, that value will appear in the grid cell in lieu of the cell's original value.

      Parameters:
      hiliteCanReplaceValue - New hiliteCanReplaceValue value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHiliteCanReplaceValue

      public Boolean getHiliteCanReplaceValue()
      If set, end users can create advanced hiliting rules that will use the Hilite.replacementValue feature to cause values in hilited cells to be replaced with a user-entered value. For example, a user could create a hilite rule that replaces numeric values ranging from 0.5 to 1.0 with the text "LOW".

      Specifically, when the "Add Advanced Rule" button is pressed and hiliteCanReplaceValue is true, the user will see a text entry field titled "Replace value with" (hiliteReplaceValueFieldTitle) and if they enter a value, that value will appear in the grid cell in lieu of the cell's original value.

      Returns:
      Current hiliteCanReplaceValue value. Default value is null
      See Also:
    • setHiliteEditorSpanTitleSeparator

      public ListGrid setHiliteEditorSpanTitleSeparator(String hiliteEditorSpanTitleSeparator)
      If this grid has specified headerSpans, and showHeaderSpanTitlesInHiliteEditor is true, this string will be inserted between the headerSpan title and the field title in the hiliteEditor field chooser grid.
      Parameters:
      hiliteEditorSpanTitleSeparator - New hiliteEditorSpanTitleSeparator value. Default value is " - "
      Returns:
      ListGrid instance, for chaining setter calls
    • getHiliteEditorSpanTitleSeparator

      public String getHiliteEditorSpanTitleSeparator()
      If this grid has specified headerSpans, and showHeaderSpanTitlesInHiliteEditor is true, this string will be inserted between the headerSpan title and the field title in the hiliteEditor field chooser grid.
      Returns:
      Current hiliteEditorSpanTitleSeparator value. Default value is " - "
    • setHiliteHTMLAfterFormat

      public ListGrid setHiliteHTMLAfterFormat(boolean hiliteHTMLAfterFormat) throws IllegalStateException
      If set to true, custom HTML applied as part of hiliting will be applied after formatting for each cell. If false, hilite HTML will be applied before formatting.

      This applies to the following hilite properties:

      May be overridden per field via ListGridField.hiliteHTMLAfterFormat

      Parameters:
      hiliteHTMLAfterFormat - New hiliteHTMLAfterFormat value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHiliteHTMLAfterFormat

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

      This applies to the following hilite properties:

      May be overridden per field via ListGridField.hiliteHTMLAfterFormat

      Returns:
      Current hiliteHTMLAfterFormat value. Default value is true
    • setHiliteIconHeight

      public ListGrid setHiliteIconHeight(Integer hiliteIconHeight)
      Height for hilite icons for this listGrid. Overrides hiliteIconSize. Can be overridden at the field level
      Parameters:
      hiliteIconHeight - New hiliteIconHeight value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHiliteIconHeight

      public Integer getHiliteIconHeight()
      Height for hilite icons for this listGrid. Overrides hiliteIconSize. Can be overridden at the field level
      Returns:
      Current hiliteIconHeight value. Default value is null
      See Also:
    • setHiliteIconLeftPadding

      public ListGrid setHiliteIconLeftPadding(int hiliteIconLeftPadding)
      How much padding should there be on the left of hilite icons by default? Can be overridden at the field level
      Parameters:
      hiliteIconLeftPadding - New hiliteIconLeftPadding value. Default value is 2
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHiliteIconLeftPadding

      public int getHiliteIconLeftPadding()
      How much padding should there be on the left of hilite icons by default? Can be overridden at the field level
      Returns:
      Current hiliteIconLeftPadding value. Default value is 2
      See Also:
    • setHiliteIconPosition

      public ListGrid setHiliteIconPosition(HiliteIconPosition hiliteIconPosition) throws IllegalStateException
      When hiliteIcons are present, where the hilite icon will be placed relative to the field value. See HiliteIconPosition. Can be overridden at the field level.
      Parameters:
      hiliteIconPosition - New hiliteIconPosition value. Default value is "before"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHiliteIconPosition

      public HiliteIconPosition getHiliteIconPosition()
      When hiliteIcons are present, where the hilite icon will be placed relative to the field value. See HiliteIconPosition. Can be overridden at the field level.
      Returns:
      Current hiliteIconPosition value. Default value is "before"
      See Also:
    • setHiliteIconRightPadding

      public ListGrid setHiliteIconRightPadding(int hiliteIconRightPadding)
      How much padding should there be on the right of hilite icons by default? Can be overridden at the field level
      Parameters:
      hiliteIconRightPadding - New hiliteIconRightPadding value. Default value is 2
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHiliteIconRightPadding

      public int getHiliteIconRightPadding()
      How much padding should there be on the right of hilite icons by default? Can be overridden at the field level
      Returns:
      Current hiliteIconRightPadding value. Default value is 2
      See Also:
    • setHiliteIcons

      public ListGrid setHiliteIcons(String... hiliteIcons) throws IllegalStateException
      Specifies a list of icons that can be used in hilites.

      hiliteIcons should be specified as an Array of SCImgURL. When present, the hilite editing interface shown when DataBoundComponent.editHilites() is called will offer the user a drop down for picking one of these icons when defining either a simple or advanced hilite rule.

      If the user picks an icon, the created hiliting rule will have Hilite.icon set to the chosen icon. DataBoundComponent.hiliteIconPosition controls where the icon will appear for that field -- the default is that it appears in front of the normal cell content. This can also be overridden at the field level.

      Parameters:
      hiliteIcons - New hiliteIcons value. Default value is ["[SKINIMG]/Dialog/notify.png", "[SKINIMG]/Dialog/warn.png", "[SKINIMG]/actions/approve.png"]
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHiliteIcons

      public String[] getHiliteIcons()
      Specifies a list of icons that can be used in hilites.

      hiliteIcons should be specified as an Array of SCImgURL. When present, the hilite editing interface shown when DataBoundComponent.editHilites() is called will offer the user a drop down for picking one of these icons when defining either a simple or advanced hilite rule.

      If the user picks an icon, the created hiliting rule will have Hilite.icon set to the chosen icon. DataBoundComponent.hiliteIconPosition controls where the icon will appear for that field -- the default is that it appears in front of the normal cell content. This can also be overridden at the field level.

      Returns:
      Current hiliteIcons value. Default value is ["[SKINIMG]/Dialog/notify.png", "[SKINIMG]/Dialog/warn.png", "[SKINIMG]/actions/approve.png"]
      See Also:
    • setHiliteIconSize

      public ListGrid setHiliteIconSize(int hiliteIconSize)
      Default width and height of hilite icons for this component. Can be overridden at the component level via explicit hiliteIconWidth and hiliteIconHeight, or at the field level via hiliteIconSize, hiliteIconWidth and hiliteIconHeight
      Parameters:
      hiliteIconSize - New hiliteIconSize value. Default value is 12
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHiliteIconSize

      public int getHiliteIconSize()
      Default width and height of hilite icons for this component. Can be overridden at the component level via explicit hiliteIconWidth and hiliteIconHeight, or at the field level via hiliteIconSize, hiliteIconWidth and hiliteIconHeight
      Returns:
      Current hiliteIconSize value. Default value is 12
      See Also:
    • setHiliteIconWidth

      public ListGrid setHiliteIconWidth(Integer hiliteIconWidth)
      Width for hilite icons for this component. Overrides hiliteIconSize. Can be overridden at the field level.
      Parameters:
      hiliteIconWidth - New hiliteIconWidth value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHiliteIconWidth

      public Integer getHiliteIconWidth()
      Width for hilite icons for this component. Overrides hiliteIconSize. Can be overridden at the field level.
      Returns:
      Current hiliteIconWidth value. Default value is null
      See Also:
    • setHiliteReplaceValueFieldTitle

      public ListGrid setHiliteReplaceValueFieldTitle(String hiliteReplaceValueFieldTitle) throws IllegalStateException
      Title used for the text box shown when hiliteCanReplaceValue is set.
      Parameters:
      hiliteReplaceValueFieldTitle - New hiliteReplaceValueFieldTitle value. Default value is "Replace value with"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHiliteReplaceValueFieldTitle

      public String getHiliteReplaceValueFieldTitle()
      Title used for the text box shown when hiliteCanReplaceValue is set.
      Returns:
      Current hiliteReplaceValueFieldTitle value. Default value is "Replace value with"
    • setHiliteRowOnFocus

      public ListGrid setHiliteRowOnFocus(Boolean hiliteRowOnFocus)
      When the grid body gets keyboard focus, should we highlight the current focus row, using the rollover cell style?

      This property may be explicitly set to control this behavior independently of showRollOver. Otherwise (if this property is null), we will show the roll-over styling for the keyboard focus row if showRollOver is true.

      Parameters:
      hiliteRowOnFocus - New hiliteRowOnFocus value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHiliteRowOnFocus

      public Boolean getHiliteRowOnFocus()
      When the grid body gets keyboard focus, should we highlight the current focus row, using the rollover cell style?

      This property may be explicitly set to control this behavior independently of showRollOver. Otherwise (if this property is null), we will show the roll-over styling for the keyboard focus row if showRollOver is true.

      Returns:
      Current hiliteRowOnFocus value. Default value is null
    • setHiliteViaAIMode

      public ListGrid setHiliteViaAIMode(AIServiceMode hiliteViaAIMode) throws IllegalStateException
      When canHiliteViaAI is true, the AI service mode to use.
      Parameters:
      hiliteViaAIMode - New hiliteViaAIMode value. Default value is "hybrid"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHiliteViaAIMode

      public AIServiceMode getHiliteViaAIMode()
      When canHiliteViaAI is true, the AI service mode to use.
      Returns:
      Current hiliteViaAIMode value. Default value is "hybrid"
    • setHiliteViaAIText

      public ListGrid setHiliteViaAIText(String hiliteViaAIText)
      Title for the menu item displayed in this component's header context menu when AI-assisted hiliting is allowed.
      Parameters:
      hiliteViaAIText - New hiliteViaAIText value. Default value is "Hilite via AI..."
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHiliteViaAIText

      public String getHiliteViaAIText()
      Title for the menu item displayed in this component's header context menu when AI-assisted hiliting is allowed.
      Returns:
      Current hiliteViaAIText value. Default value is "Hilite via AI..."
      See Also:
    • setHoverMode

      public ListGrid setHoverMode(HoverMode hoverMode)
      When showHoverComponents is true, the builtin mode to use when automatically creating a hover component for rows in this grid.

      A number of builtin modes are provided - see HoverMode. You can also override getCellHoverComponent() to provide a custom hover widget - in that case, this attribute is ignored.

      If showHoverComponents is true but hoverMode is not set, it defaults to "detailRelated" if detailDS is set, or to "details" otherwise. If showHoverComponents is not set (ie, is null) and hoverMode is set, showHoverComponents defaults to true.

      Parameters:
      hoverMode - New hoverMode value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getHoverMode

      public HoverMode getHoverMode()
      When showHoverComponents is true, the builtin mode to use when automatically creating a hover component for rows in this grid.

      A number of builtin modes are provided - see HoverMode. You can also override getCellHoverComponent() to provide a custom hover widget - in that case, this attribute is ignored.

      If showHoverComponents is true but hoverMode is not set, it defaults to "detailRelated" if detailDS is set, or to "details" otherwise. If showHoverComponents is not set (ie, is null) and hoverMode is set, showHoverComponents defaults to true.

      Returns:
      Current hoverMode value. Default value is null
    • setHoverScreen

      public ListGrid setHoverScreen(String hoverScreen) throws IllegalStateException
      Screen to create (via createScreen()) in lieu of calling getHoverComponent() or getCellHoverComponent().

      If this grid has a dataSource, the created screen is provided with a Canvas.dataContext that includes the record being shown at the row.

      Overrides:
      setHoverScreen in class Canvas
      Parameters:
      hoverScreen - New hoverScreen value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHoverScreen

      public String getHoverScreen()
      Screen to create (via createScreen()) in lieu of calling getHoverComponent() or getCellHoverComponent().

      If this grid has a dataSource, the created screen is provided with a Canvas.dataContext that includes the record being shown at the row.

      Overrides:
      getHoverScreen in class Canvas
      Returns:
      Current hoverScreen value. Default value is null
    • setHoverStyle

      public ListGrid setHoverStyle(String hoverStyle)
      Style to apply to hovers shown over this grid.

      Note : This is an advanced setting

      Overrides:
      setHoverStyle in class Canvas
      Parameters:
      hoverStyle - New hoverStyle value. Default value is "gridHover"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getHoverStyle

      public String getHoverStyle()
      Style to apply to hovers shown over this grid.
      Overrides:
      getHoverStyle in class Canvas
      Returns:
      Current hoverStyle value. Default value is "gridHover"
      See Also:
    • setIconCursor

      public ListGrid setIconCursor(Cursor iconCursor)
      Default cursor to display when the user rolls over icons within cells of an type:icon field.

      May be overridden by ListGridField.iconCursor.

      Note: Unlike the field-level ListGridField.iconCursor property, listGrid.iconCursor has no effect on the cursor displayed for valueIcons.
      See getValueIconCursor() for more details.

      Parameters:
      iconCursor - New iconCursor value. Default value is Canvas.POINTER
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getIconCursor

      public Cursor getIconCursor()
      Default cursor to display when the user rolls over icons within cells of an type:icon field.

      May be overridden by ListGridField.iconCursor.

      Note: Unlike the field-level ListGridField.iconCursor property, listGrid.iconCursor has no effect on the cursor displayed for valueIcons.
      See getValueIconCursor() for more details.

      Returns:
      Returns the cursor to display when the mouse pointer is over an icon in an "icon" type field.

      Default behavior will display the ListGridField.iconCursor if specified, otherwise the component level iconCursor. Default value is Canvas.POINTER

      See Also:
    • setIconPadding

      public ListGrid setIconPadding(Integer iconPadding) throws IllegalStateException
      When using autoFitFieldWidths, padding in pixels left on each side of fields that show images.
      Parameters:
      iconPadding - New iconPadding value. Default value is 2
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getIconPadding

      public Integer getIconPadding()
      When using autoFitFieldWidths, padding in pixels left on each side of fields that show images.
      Returns:
      Current iconPadding value. Default value is 2
    • setImageSize

      public ListGrid setImageSize(int imageSize)
      Default size of thumbnails shown for fieldTypes image and imageFile. Overrideable on a per-field basis via ListGridField.imageSize or ListGridField.imageWidth/ListGridField.imageHeight
      Parameters:
      imageSize - New imageSize value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getImageSize

      public int getImageSize()
      Default size of thumbnails shown for fieldTypes image and imageFile. Overrideable on a per-field basis via ListGridField.imageSize or ListGridField.imageWidth/ListGridField.imageHeight
      Returns:
      Current imageSize value. Default value is 16
      See Also:
    • setIncludeHilitesInSummaryFields

      public ListGrid setIncludeHilitesInSummaryFields(boolean includeHilitesInSummaryFields)
      When assembling a value for a summary field, if a referenced field is hilited, should the hilite HTML be included in the summary field value?

      To control hilites showing in group summaries, see showHilitesInGroupSummary.

      Note : This is an advanced setting

      Parameters:
      includeHilitesInSummaryFields - New includeHilitesInSummaryFields value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getIncludeHilitesInSummaryFields

      public boolean getIncludeHilitesInSummaryFields()
      When assembling a value for a summary field, if a referenced field is hilited, should the hilite HTML be included in the summary field value?

      To control hilites showing in group summaries, see showHilitesInGroupSummary.

      Returns:
      Current includeHilitesInSummaryFields value. Default value is true
      See Also:
    • setIncludeInSummaryProperty

      public ListGrid setIncludeInSummaryProperty(String includeInSummaryProperty)
      Property name on a record that will be checked to determine whether a record should be included when calculating totals for the grid summary.
      Parameters:
      includeInSummaryProperty - New includeInSummaryProperty value. Default value is "includeInSummary"
      Returns:
      ListGrid instance, for chaining setter calls
    • getIncludeInSummaryProperty

      public String getIncludeInSummaryProperty()
      Property name on a record that will be checked to determine whether a record should be included when calculating totals for the grid summary.
      Returns:
      Current includeInSummaryProperty value. Default value is "includeInSummary"
    • setInitialSort

      public ListGrid setInitialSort(SortSpecifier... initialSort) throws IllegalStateException
      An array of SortSpecifier objects used to set up the initial sort configuration for this grid. If specified, this will be used instead of any sortField specified.
      Parameters:
      initialSort - New initialSort value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getInitialSort

      public SortSpecifier[] getInitialSort()
      An array of SortSpecifier objects used to set up the initial sort configuration for this grid. If specified, this will be used instead of any sortField specified.
      Returns:
      Current initialSort value. Default value is null
    • setInstantScrollTrackRedraw

      public ListGrid setInstantScrollTrackRedraw(Boolean instantScrollTrackRedraw)
      If true, if the user clicks on the scroll buttons at the end of the track or clicks once on the scroll track, there will be an instant redraw of the grid content so that the user doesn't see any blank space. For drag scrolling or other types of scrolling, the scrollRedrawDelay applies.
      Parameters:
      instantScrollTrackRedraw - New instantScrollTrackRedraw value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getInstantScrollTrackRedraw

      public Boolean getInstantScrollTrackRedraw()
      If true, if the user clicks on the scroll buttons at the end of the track or clicks once on the scroll track, there will be an instant redraw of the grid content so that the user doesn't see any blank space. For drag scrolling or other types of scrolling, the scrollRedrawDelay applies.
      Returns:
      Current instantScrollTrackRedraw value. Default value is true
    • setInvalidSummaryValue

      public ListGrid setInvalidSummaryValue(String invalidSummaryValue)
      Value to display to the user if showing summary values (through showGridSummary, showGroupSummary or listGridFieldType:"summary"), and the summary function returns "null" (implying it was unable to calculate a valid summary value). This property will only be used in the default formatting behavior. If an explicit formatter has been specified - via setCellFormatter() or formatGridSummary(), for example - this property has no effect.

      Note : This is an advanced setting

      Parameters:
      invalidSummaryValue - New invalidSummaryValue value. Default value is "&nbsp;"
      Returns:
      ListGrid instance, for chaining setter calls
    • getInvalidSummaryValue

      public String getInvalidSummaryValue()
      Value to display to the user if showing summary values (through showGridSummary, showGroupSummary or listGridFieldType:"summary"), and the summary function returns "null" (implying it was unable to calculate a valid summary value). This property will only be used in the default formatting behavior. If an explicit formatter has been specified - via setCellFormatter() or formatGridSummary(), for example - this property has no effect.
      Returns:
      Current invalidSummaryValue value. Default value is "&nbsp;"
    • getIsGrouped

      public boolean getIsGrouped() throws IllegalStateException
      True if this listGrid is grouped, false otherwise

      Note : This method should be called only after the widget has been rendered.

      Returns:
      Current isGrouped value. Default value is false
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
      See Also:
    • setIsSeparatorProperty

      public ListGrid setIsSeparatorProperty(String isSeparatorProperty)
      If record[this.isSeparatorProperty] is set for some record, the record will be displayed as a simple separator row.
      Parameters:
      isSeparatorProperty - New isSeparatorProperty value. Default value is "isSeparator"
      Returns:
      ListGrid instance, for chaining setter calls
    • getIsSeparatorProperty

      public String getIsSeparatorProperty()
      If record[this.isSeparatorProperty] is set for some record, the record will be displayed as a simple separator row.
      Returns:
      Current isSeparatorProperty value. Default value is "isSeparator"
    • setLastCellStyle

      public ListGrid setLastCellStyle(String lastCellStyle)
      The style to apply to the last cell in each row, when styledRowEnds is true. Note that this style is additional to the regular cell styling and should not introduce settings that change the layout or size of the cell, such as padding or font-size, but is ideal for setting a corner-radius or fading gradient. The styling will work with any design, and is also applied correctly with or without frozen fields.

      If all you want to do is provide rounded-corners for records in this grid, it may be simpler to set recordRadius to a CSS border-radius string that achieves the rounding you want.

      Parameters:
      lastCellStyle - New lastCellStyle value. Default value is "gridLastCell"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLastCellStyle

      public String getLastCellStyle()
      The style to apply to the last cell in each row, when styledRowEnds is true. Note that this style is additional to the regular cell styling and should not introduce settings that change the layout or size of the cell, such as padding or font-size, but is ideal for setting a corner-radius or fading gradient. The styling will work with any design, and is also applied correctly with or without frozen fields.

      If all you want to do is provide rounded-corners for records in this grid, it may be simpler to set recordRadius to a CSS border-radius string that achieves the rounding you want.

      Returns:
      Current lastCellStyle value. Default value is "gridLastCell"
      See Also:
    • setLeaveHeaderMenuButtonSpace

      public ListGrid setLeaveHeaderMenuButtonSpace(Boolean leaveHeaderMenuButtonSpace)
      If showHeaderMenuButton is true, when auto-fitting fields to the title width via autoFitFieldWidths or ListGridField.autoFitWidth, 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 the grid level. If not explicitly specified space will be left for fields with ListGridField.align 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:
      ListGrid instance, for chaining setter calls
      See Also:
    • setLeaveScrollbarGap

      public ListGrid setLeaveScrollbarGap(Boolean leaveScrollbarGap)
      Whether to leave a gap for the vertical scrollbar, even when it's not present.

      Note that if leaveScrollbarGap is false and vertical scrolling is introduced, fields will be resized to fit the smaller body area if possible, in order to avoid horizontal scrolling also being required.

      Overrides:
      setLeaveScrollbarGap in class Layout
      Parameters:
      leaveScrollbarGap - New leaveScrollbarGap value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLeaveScrollbarGap

      public Boolean getLeaveScrollbarGap()
      Whether to leave a gap for the vertical scrollbar, even when it's not present.

      Note that if leaveScrollbarGap is false and vertical scrolling is introduced, fields will be resized to fit the smaller body area if possible, in order to avoid horizontal scrolling also being required.

      Overrides:
      getLeaveScrollbarGap in class Layout
      Returns:
      Current leaveScrollbarGap value. Default value is true
      See Also:
    • setLinkTextProperty

      public ListGrid setLinkTextProperty(String linkTextProperty)
      Property name on a record that will hold the link text for that record.

      This property is configurable to avoid possible collision with data values in the record.

      Use ListGridField.linkTextProperty if you have more than one link field and

      Parameters:
      linkTextProperty - New linkTextProperty value. Default value is "linkText"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLinkTextProperty

      public String getLinkTextProperty()
      Property name on a record that will hold the link text for that record.

      This property is configurable to avoid possible collision with data values in the record.

      Use ListGridField.linkTextProperty if you have more than one link field and

      Returns:
      Current linkTextProperty value. Default value is "linkText"
      See Also:
    • setListEndEditAction

      public ListGrid setListEndEditAction(RowEndEditAction listEndEditAction)
      If the user is editing the last record in this listGrid, and attempts to navigate beyond the last row either by tabbing off the last editable field, or using the down arrow key, this property determines what action to take:
      • "next": start editing a new record at the end of the list.
      • "done": hide the editor
      • "stop": leave focus in the cell being edited
      • "none": no action

      See the Grid Editing overview and also the Editing Unsaved Records overview for context about how newly added records behave.

      Parameters:
      listEndEditAction - New listEndEditAction value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getListEndEditAction

      public RowEndEditAction getListEndEditAction()
      If the user is editing the last record in this listGrid, and attempts to navigate beyond the last row either by tabbing off the last editable field, or using the down arrow key, this property determines what action to take:
      • "next": start editing a new record at the end of the list.
      • "done": hide the editor
      • "stop": leave focus in the cell being edited
      • "none": no action

      See the Grid Editing overview and also the Editing Unsaved Records overview for context about how newly added records behave.

      Returns:
      Current listEndEditAction value. Default value is null
      See Also:
    • setLoadingDataMessage

      public ListGrid setLoadingDataMessage(String loadingDataMessage)
      The string to display in the body of a listGrid while data is being loaded. Use "${loadingImage}" to include a loading image.
      Parameters:
      loadingDataMessage - New loadingDataMessage value. Default value is "${loadingImage}&nbsp;Loading data..."
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLoadingDataMessage

      public String getLoadingDataMessage()
      The string to display in the body of a listGrid while data is being loaded. Use "${loadingImage}" to include a loading image.
      Returns:
      Current loadingDataMessage value. Default value is "${loadingImage}&nbsp;Loading data..."
      See Also:
    • setLoadingDataMessageStyle

      public ListGrid setLoadingDataMessageStyle(String loadingDataMessageStyle)
      The CSS style name applied to the loadingDataMessage string if displayed.
      Parameters:
      loadingDataMessageStyle - New loadingDataMessageStyle value. Default value is "loadingDataMessage"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLoadingDataMessageStyle

      public String getLoadingDataMessageStyle()
      The CSS style name applied to the loadingDataMessage string if displayed.
      Returns:
      Current loadingDataMessageStyle value. Default value is "loadingDataMessage"
      See Also:
    • setLoadingMessage

      public ListGrid setLoadingMessage(String loadingMessage) throws IllegalStateException
      If you have a databound listGrid and you scroll out of the currently loaded dataset, by default you will see blank rows until the server returns the data for those rows. The loadingMessage attribute allows you to specify arbitrary html that will be shown in each such "blank" record while the data for that record is loading.
      Parameters:
      loadingMessage - New loadingMessage value. Default value is "&nbsp;"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLoadingMessage

      public String getLoadingMessage()
      If you have a databound listGrid and you scroll out of the currently loaded dataset, by default you will see blank rows until the server returns the data for those rows. The loadingMessage attribute allows you to specify arbitrary html that will be shown in each such "blank" record while the data for that record is loading.
      Returns:
      Current loadingMessage value. Default value is "&nbsp;"
    • setLoadingRowCountDisplayIcoHeight

      public ListGrid setLoadingRowCountDisplayIcoHeight(int loadingRowCountDisplayIcoHeight)
      Parameters:
      loadingRowCountDisplayIcoHeight - New loadingRowCountDisplayIcoHeight value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLoadingRowCountDisplayIcoHeight

      public int getLoadingRowCountDisplayIcoHeight()
      Returns:
      Current loadingRowCountDisplayIcoHeight value. Default value is 16
      See Also:
    • setLoadingRowCountDisplayIcon

      public ListGrid setLoadingRowCountDisplayIcon(String loadingRowCountDisplayIcon)
      The URL of the icon to display as a row count value when the row count is loading.
      Parameters:
      loadingRowCountDisplayIcon - New loadingRowCountDisplayIcon value. Default value is "[SKINIMG]/loading_horizontal.gif"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLoadingRowCountDisplayIcon

      public String getLoadingRowCountDisplayIcon()
      The URL of the icon to display as a row count value when the row count is loading.
      Returns:
      Current loadingRowCountDisplayIcon value. Default value is "[SKINIMG]/loading_horizontal.gif"
      See Also:
    • setLoadingRowCountDisplayIconWidth

      public ListGrid setLoadingRowCountDisplayIconWidth(int loadingRowCountDisplayIconWidth)
      Parameters:
      loadingRowCountDisplayIconWidth - New loadingRowCountDisplayIconWidth value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLoadingRowCountDisplayIconWidth

      public int getLoadingRowCountDisplayIconWidth()
      Returns:
      Current loadingRowCountDisplayIconWidth value. Default value is 16
      See Also:
    • setLocateColumnsBy

      public ListGrid setLocateColumnsBy(String locateColumnsBy)
      When AutoTest.getElement() is used to parse locator strings generated by AutoTest.getLocator() for a cell in this grid, how should the column be identified?
      Note that getLocator() will actually store all available information about the column in the generated string -- this attribute effects how a stored string will be parsed only.

      Valid options area:

      • "fieldName" Attempt to identify by fieldName.
      • "index" Attempt to identify by colNum (index in the fields array).
      If unset, default behavior is to identify by fieldName (if available), otherwise by index.
      Parameters:
      locateColumnsBy - New locateColumnsBy value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLocateColumnsBy

      public String getLocateColumnsBy()
      When AutoTest.getElement() is used to parse locator strings generated by AutoTest.getLocator() for a cell in this grid, how should the column be identified?
      Note that getLocator() will actually store all available information about the column in the generated string -- this attribute effects how a stored string will be parsed only.

      Valid options area:

      • "fieldName" Attempt to identify by fieldName.
      • "index" Attempt to identify by colNum (index in the fields array).
      If unset, default behavior is to identify by fieldName (if available), otherwise by index.
      Returns:
      Current locateColumnsBy value. Default value is null
      See Also:
    • setLocateRowsBy

      public ListGrid setLocateRowsBy(String locateRowsBy)
      When AutoTest.getElement() is used to parse locator strings generated by AutoTest.getLocator() for a cell in this grid, how should the row be identified?
      Note that getLocator() will actually store all available information about the row in the generated string -- this attribute effects how a stored string will be parsed only.

      Valid options area:

      • "primaryKey" Only applies to databound grids: If the cell in question has a primary key cell value, use it to identify cells in autoTest locator strings.
      • "titleField" If the cell in question has a value for the titleField, use it to identify cells in autoTest locator strings
      • "targetCellValue" Identify rows by storing the cell value for the target row / field in autoTest locator strings
      • "cellValue" Use the value of a specific cell to identify the row. The rowLocatorField attribute may be used to specify the field from which the cellValue should be retrieved.
      • "index"The rowNum will be used to identify the row.
      If unset, default behavior depends on what information is available in the locator passed to AutoTest.getElement().

      If a primaryKey value was recorded (and this grid has a primary key field), it will be used to identify the target row. Otherwise the system will back off to use the titleField (if present in the locator), then the cell value (if present in the locator), and lastly the recorded index.

      Parameters:
      locateRowsBy - New locateRowsBy value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLocateRowsBy

      public String getLocateRowsBy()
      When AutoTest.getElement() is used to parse locator strings generated by AutoTest.getLocator() for a cell in this grid, how should the row be identified?
      Note that getLocator() will actually store all available information about the row in the generated string -- this attribute effects how a stored string will be parsed only.

      Valid options area:

      • "primaryKey" Only applies to databound grids: If the cell in question has a primary key cell value, use it to identify cells in autoTest locator strings.
      • "titleField" If the cell in question has a value for the titleField, use it to identify cells in autoTest locator strings
      • "targetCellValue" Identify rows by storing the cell value for the target row / field in autoTest locator strings
      • "cellValue" Use the value of a specific cell to identify the row. The rowLocatorField attribute may be used to specify the field from which the cellValue should be retrieved.
      • "index"The rowNum will be used to identify the row.
      If unset, default behavior depends on what information is available in the locator passed to AutoTest.getElement().

      If a primaryKey value was recorded (and this grid has a primary key field), it will be used to identify the target row. Otherwise the system will back off to use the titleField (if present in the locator), then the cell value (if present in the locator), and lastly the recorded index.

      Returns:
      Current locateRowsBy value. Default value is null
      See Also:
    • setLongTextEditorThreshold

      public ListGrid setLongTextEditorThreshold(int longTextEditorThreshold)
      When the length of the field specified by DataSourceField.length exceeds this value, the ListGrid shows an edit field of type longTextEditorType rather than the standard text field when the field enters inline edit mode.
      Parameters:
      longTextEditorThreshold - New longTextEditorThreshold value. Default value is 255
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLongTextEditorThreshold

      public int getLongTextEditorThreshold()
      When the length of the field specified by DataSourceField.length exceeds this value, the ListGrid shows an edit field of type longTextEditorType rather than the standard text field when the field enters inline edit mode.
      Returns:
      Current longTextEditorThreshold value. Default value is 255
      See Also:
    • setLongTextEditorType

      public ListGrid setLongTextEditorType(String longTextEditorType)
      When the length of the field specified by DataSourceField.length exceeds this.longTextEditorThreshold show an edit field of this type rather than the standard text field when the field enters inline edit mode.
      Parameters:
      longTextEditorType - New longTextEditorType value. Default value is "PopUpTextAreaItem"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getLongTextEditorType

      public String getLongTextEditorType()
      When the length of the field specified by DataSourceField.length exceeds this.longTextEditorThreshold show an edit field of this type rather than the standard text field when the field enters inline edit mode.
      Returns:
      Current longTextEditorType value. Default value is "PopUpTextAreaItem"
      See Also:
    • setMaxExpandedRecords

      public ListGrid setMaxExpandedRecords(Integer maxExpandedRecords)
      When canExpandRecords and canExpandMultipleRecords are both true, this property dictates the number of records which can be expanded simultaneously. If the expanded record count hits the value of this property, further attempts to expand records will result in a popup warning (see maxExpandedRecordsPrompt) and expansion will be cancelled.

      The default value is null, meaning there is no limit on the number of expanded records.

      Parameters:
      maxExpandedRecords - New maxExpandedRecords value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getMaxExpandedRecords

      public Integer getMaxExpandedRecords()
      When canExpandRecords and canExpandMultipleRecords are both true, this property dictates the number of records which can be expanded simultaneously. If the expanded record count hits the value of this property, further attempts to expand records will result in a popup warning (see maxExpandedRecordsPrompt) and expansion will be cancelled.

      The default value is null, meaning there is no limit on the number of expanded records.

      Returns:
      Current maxExpandedRecords value. Default value is null
    • setMaxExpandedRecordsPrompt

      public ListGrid setMaxExpandedRecordsPrompt(String maxExpandedRecordsPrompt) throws IllegalStateException
      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed. Note that the local variable count will be available and set to this.maxExpandedRecords. The string will be executed in the scope of the ListGrid so this may also be used to determine other information about this grid.

      Default value returns

      This grid is limited to [maxExpandedRecords] simultaneously expanded records. Please collapse some expanded records and retry.

      Parameters:
      maxExpandedRecordsPrompt - New maxExpandedRecordsPrompt value. Default value is "This grid is limited to ${count} simultaneously expanded records. Please collapse some expanded records and retry."
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getMaxExpandedRecordsPrompt

      public String getMaxExpandedRecordsPrompt()
      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed. Note that the local variable count will be available and set to this.maxExpandedRecords. The string will be executed in the scope of the ListGrid so this may also be used to determine other information about this grid.

      Default value returns

      This grid is limited to [maxExpandedRecords] simultaneously expanded records. Please collapse some expanded records and retry.

      Returns:
      Current maxExpandedRecordsPrompt value. Default value is "This grid is limited to ${count} simultaneously expanded records. Please collapse some expanded records and retry."
      See Also:
    • setMaximumRowCountFormat

      public ListGrid setMaximumRowCountFormat(String maximumRowCountFormat)
      Format for the string returned from getFormattedRowCount() when row count status is "maximum".

      The variable rowCount is available for evaluation within this string and will be set to the current row count as a locale-formatted number.

      Parameters:
      maximumRowCountFormat - New maximumRowCountFormat value. Default value is "-${rowCount}"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getMaximumRowCountFormat

      public String getMaximumRowCountFormat()
      Format for the string returned from getFormattedRowCount() when row count status is "maximum".

      The variable rowCount is available for evaluation within this string and will be set to the current row count as a locale-formatted number.

      Returns:
      Current maximumRowCountFormat value. Default value is "-${rowCount}"
      See Also:
    • setMaxSummaryRowRecords

      public ListGrid setMaxSummaryRowRecords(Integer maxSummaryRowRecords) throws IllegalStateException
      If showGridSummary is true, and summary records are being derived from a fetch against the summaryRowDataSource, this property may be set to specify the maximum expected number of results from the fetch opeeration. If specified, the DSRequest.startRow for the summary row fetch operation will be zero and the DSRequest.endRow will be this value.

      This property has no effect unless summary row records are being retrieved from the summaryRowDataSource.

      Note : This is an advanced setting

      Parameters:
      maxSummaryRowRecords - New maxSummaryRowRecords value. Default value is 1
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMaxSummaryRowRecords

      public Integer getMaxSummaryRowRecords()
      If showGridSummary is true, and summary records are being derived from a fetch against the summaryRowDataSource, this property may be set to specify the maximum expected number of results from the fetch opeeration. If specified, the DSRequest.startRow for the summary row fetch operation will be zero and the DSRequest.endRow will be this value.

      This property has no effect unless summary row records are being retrieved from the summaryRowDataSource.

      Returns:
      Current maxSummaryRowRecords value. Default value is 1
    • setMinFieldWidth

      public ListGrid setMinFieldWidth(int minFieldWidth)
      Minimum size, in pixels, for ListGrid headers.

      If this method is called after the component has been drawn/initialized: Updates minFieldWidth and redraws any columns as needed.
      Parameters:
      minFieldWidth - New minFieldWidth value. Default value is 15
      Returns:
      ListGrid instance, for chaining setter calls
    • getMinFieldWidth

      public int getMinFieldWidth()
      Minimum size, in pixels, for ListGrid headers.
      Returns:
      Current minFieldWidth value. Default value is 15
    • setMinHeight

      public ListGrid setMinHeight(int minHeight)
      Sets the minimum height for the entire list (smaller than this doesn't tend to work very well). If not set, this value will be defaulted when draw() is called to something reasonable based on whether we're showing the filter editor, header, summary rows, and/or the empty message. Any top or bottom CSS padding specified by emptyMessageStyle will be taken into account, increasing minHeight so that the empty message can be shown without overflow.

      Note: Minimum sizes do not apply to all situations. See minimum sizing rules for details.

      Overrides:
      setMinHeight in class Canvas
      Parameters:
      minHeight - New minHeight value. Default value is varies
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getMinHeight

      public int getMinHeight()
      Sets the minimum height for the entire list (smaller than this doesn't tend to work very well). If not set, this value will be defaulted when draw() is called to something reasonable based on whether we're showing the filter editor, header, summary rows, and/or the empty message. Any top or bottom CSS padding specified by emptyMessageStyle will be taken into account, increasing minHeight so that the empty message can be shown without overflow.

      Note: Minimum sizes do not apply to all situations. See minimum sizing rules for details.

      Overrides:
      getMinHeight in class Canvas
      Returns:
      Current minHeight value. Default value is varies
      See Also:
    • setMinimumCellHeight

      public ListGrid setMinimumCellHeight(int minimumCellHeight) throws IllegalStateException
      Minimum height for ListGrid cells, settable by the skin, based on the size of the checkbox media used for boolean fields plus minimal surrounding padding. minimumCellHeight is used by Canvas.resizeControls() to avoid shrinking ListGrid rows so much that correct display is impossible. Do not set minimumCellHeight on a per-instance basis - it's only for use in custom skins.
      Parameters:
      minimumCellHeight - New minimumCellHeight value. Default value is 20
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinimumCellHeight

      public int getMinimumCellHeight()
      Minimum height for ListGrid cells, settable by the skin, based on the size of the checkbox media used for boolean fields plus minimal surrounding padding. minimumCellHeight is used by Canvas.resizeControls() to avoid shrinking ListGrid rows so much that correct display is impossible. Do not set minimumCellHeight on a per-instance basis - it's only for use in custom skins.
      Returns:
      Current minimumCellHeight value. Default value is 20
    • setMinimumRowCountFormat

      public ListGrid setMinimumRowCountFormat(String minimumRowCountFormat)
      Format for the string returned from getFormattedRowCount() when row count status is "minimum".

      The variable rowCount is available for evaluation within this string and will be set to the current row count as a locale-formatted number.

      Parameters:
      minimumRowCountFormat - New minimumRowCountFormat value. Default value is "${rowCount}+"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getMinimumRowCountFormat

      public String getMinimumRowCountFormat()
      Format for the string returned from getFormattedRowCount() when row count status is "minimum".

      The variable rowCount is available for evaluation within this string and will be set to the current row count as a locale-formatted number.

      Returns:
      Current minimumRowCountFormat value. Default value is "${rowCount}+"
      See Also:
    • setMissingSummaryFieldValue

      public ListGrid setMissingSummaryFieldValue(String missingSummaryFieldValue)
      If a summary format string contains an invalid field reference, replace the reference with the missingSummaryFieldValue. The default value is "-".
      Parameters:
      missingSummaryFieldValue - New missingSummaryFieldValue value. Default value is "-"
      Returns:
      ListGrid instance, for chaining setter calls
    • getMissingSummaryFieldValue

      public String getMissingSummaryFieldValue()
      If a summary format string contains an invalid field reference, replace the reference with the missingSummaryFieldValue. The default value is "-".
      Returns:
      Current missingSummaryFieldValue value. Default value is "-"
    • setModalEditing

      public ListGrid setModalEditing(Boolean modalEditing)
      If this property is true, any mouse click outside of the open cell editors will end editing mode, hiding the cell editors and saving any changes to those cell values.

      Note : This is an advanced setting

      Parameters:
      modalEditing - New modalEditing value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getModalEditing

      public Boolean getModalEditing()
      If this property is true, any mouse click outside of the open cell editors will end editing mode, hiding the cell editors and saving any changes to those cell values.
      Returns:
      Current modalEditing value. Default value is null
      See Also:
    • setMultiGroupDialogDefaults

      public ListGrid setMultiGroupDialogDefaults(MultiGroupDialog multiGroupDialogDefaults) throws IllegalStateException
      Class-level defaults to apply to the MultiGroupDialog which gets automatically generated when configureGrouping() is called.
      Parameters:
      multiGroupDialogDefaults - New multiGroupDialogDefaults value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getMultiGroupDialogDefaults

      public MultiGroupDialog getMultiGroupDialogDefaults()
      Class-level defaults to apply to the MultiGroupDialog which gets automatically generated when configureGrouping() is called.
      Returns:
      Current multiGroupDialogDefaults value. Default value is null
    • setMultiGroupDialogProperties

      public ListGrid setMultiGroupDialogProperties(MultiGroupDialog multiGroupDialogProperties) throws IllegalStateException
      Properties to apply to the MultiGroupDialog which gets automatically generated when configureGrouping() is called.
      Parameters:
      multiGroupDialogProperties - New multiGroupDialogProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getMultiGroupDialogProperties

      public MultiGroupDialog getMultiGroupDialogProperties()
      Properties to apply to the MultiGroupDialog which gets automatically generated when configureGrouping() is called.
      Returns:
      Current multiGroupDialogProperties value. Default value is null
    • setNavigateOnTab

      public ListGrid setNavigateOnTab(Boolean navigateOnTab)
      If canSelectCells is true, this property allows the user to navigate through the cells of a grid using Tab and Shift+Tab keypresses. When a user tabs to the end of the row, the rowEndEditAction is used to determine whether to shift selection to the next row, return to the beginning of the same row, or simply move on through the page's tab order.

      Note - if this property is not explicitly set, navigateOnTab behavior will be enabled for grids unless screenReader mode is on in which case it will be disabled.
      Developers should be aware that setting navigateOnTab explicitly to true enabled the behavior even in screenReader mode. This may have an impact on the accessibility of an application - screen reader mode users navigating the application via the keyboard would have to tab through every single data cell in the grid grid before being able to tab to the next component.

      Parameters:
      navigateOnTab - New navigateOnTab value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getNavigateOnTab

      public Boolean getNavigateOnTab()
      If canSelectCells is true, this property allows the user to navigate through the cells of a grid using Tab and Shift+Tab keypresses. When a user tabs to the end of the row, the rowEndEditAction is used to determine whether to shift selection to the next row, return to the beginning of the same row, or simply move on through the page's tab order.

      Note - if this property is not explicitly set, navigateOnTab behavior will be enabled for grids unless screenReader mode is on in which case it will be disabled.
      Developers should be aware that setting navigateOnTab explicitly to true enabled the behavior even in screenReader mode. This may have an impact on the accessibility of an application - screen reader mode users navigating the application via the keyboard would have to tab through every single data cell in the grid grid before being able to tab to the next component.

      Returns:
      Current navigateOnTab value. Default value is null
    • setNeverValidate

      public ListGrid setNeverValidate(Boolean neverValidate)
      If true, validation will not occur as a result of cell editing for this grid.

      Note : This is an advanced setting

      Parameters:
      neverValidate - New neverValidate value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getNeverValidate

      public Boolean getNeverValidate()
      If true, validation will not occur as a result of cell editing for this grid.
      Returns:
      Current neverValidate value. Default value is null
      See Also:
    • setNewRecordRowMessage

      public ListGrid setNewRecordRowMessage(String newRecordRowMessage) throws IllegalStateException
      If this listGrid is showing the 'newRecordRow' (used for adding new rows to the end of the data), this property determines what message should be displayed in this row.
      Parameters:
      newRecordRowMessage - New newRecordRowMessage value. Default value is "-- Add New Row --"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getNewRecordRowMessage

      public String getNewRecordRowMessage()
      If this listGrid is showing the 'newRecordRow' (used for adding new rows to the end of the data), this property determines what message should be displayed in this row.
      Returns:
      Current newRecordRowMessage value. Default value is "-- Add New Row --"
      See Also:
    • setNewSearchText

      public ListGrid setNewSearchText(String newSearchText) throws IllegalStateException
      Text to show for saving the current view as a new "saved search".
      Parameters:
      newSearchText - New newSearchText value. Default value is "Save View..."
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getNewSearchText

      public String getNewSearchText()
      Text to show for saving the current view as a new "saved search".
      Returns:
      Current newSearchText value. Default value is "Save View..."
      See Also:
    • setNormalBaseStyle

      public ListGrid setNormalBaseStyle(String normalBaseStyle) throws IllegalStateException
      "Normal" baseStyle for this listGrid. Only applies if baseStyle is set to null.

      If baseStyle is unset, this property will be used as a base cell style if the grid is showing fixed height rows, and the specified cellHeight matches normalCellHeight (and in Internet Explorer, fastCellUpdates is false). Otherwise tallBaseStyle will be used.

      Having separate styles defined for fixed vs. variable height rows allows the developer to specify css which is designed to render at a specific height (typically using background images, which won't scale), without breaking support for styling rows of variable height.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Parameters:
      normalBaseStyle - New normalBaseStyle value. Default value is "cell"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getNormalBaseStyle

      public String getNormalBaseStyle()
      "Normal" baseStyle for this listGrid. Only applies if baseStyle is set to null.

      If baseStyle is unset, this property will be used as a base cell style if the grid is showing fixed height rows, and the specified cellHeight matches normalCellHeight (and in Internet Explorer, fastCellUpdates is false). Otherwise tallBaseStyle will be used.

      Having separate styles defined for fixed vs. variable height rows allows the developer to specify css which is designed to render at a specific height (typically using background images, which won't scale), without breaking support for styling rows of variable height.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Returns:
      Current normalBaseStyle value. Default value is "cell"
      See Also:
    • setNormalCellHeight

      public ListGrid setNormalCellHeight(int normalCellHeight)
      If baseStyle is unset, base style will be derived from normalBaseStyle if this grid has fixed row heights and the specified cellHeight matches this value. Otherwise tallBaseStyle will be used.

      Note : This is an advanced setting

      Parameters:
      normalCellHeight - New normalCellHeight value. Default value is 20
      Returns:
      ListGrid instance, for chaining setter calls
    • getNormalCellHeight

      public int getNormalCellHeight()
      If baseStyle is unset, base style will be derived from normalBaseStyle if this grid has fixed row heights and the specified cellHeight matches this value. Otherwise tallBaseStyle will be used.
      Returns:
      Current normalCellHeight value. Default value is 20
    • setNoSavedSearchesText

      public ListGrid setNoSavedSearchesText(String noSavedSearchesText) throws IllegalStateException
      Text to show in menu listing saved searches when there are no saved searches.
      Parameters:
      noSavedSearchesText - New noSavedSearchesText value. Default value is "[None]"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getNoSavedSearchesText

      public String getNoSavedSearchesText()
      Text to show in menu listing saved searches when there are no saved searches.
      Returns:
      Current noSavedSearchesText value. Default value is "[None]"
      See Also:
    • setNullGroupTitle

      public ListGrid setNullGroupTitle(String nullGroupTitle)
      Default alias to use for groups with no value
      Parameters:
      nullGroupTitle - New nullGroupTitle value. Default value is '-none-'
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getNullGroupTitle

      public String getNullGroupTitle()
      Default alias to use for groups with no value
      Returns:
      Current nullGroupTitle value. Default value is '-none-'
      See Also:
    • setOfflineMessageStyle

      public ListGrid setOfflineMessageStyle(String offlineMessageStyle)
      The CSS style name applied to the offlineMessage if displayed.
      Parameters:
      offlineMessageStyle - New offlineMessageStyle value. Default value is "offlineMessage"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getOfflineMessageStyle

      public String getOfflineMessageStyle()
      The CSS style name applied to the offlineMessage if displayed.
      Returns:
      Current offlineMessageStyle value. Default value is "offlineMessage"
      See Also:
    • getOperatorIcon

      public FormItemIcon getOperatorIcon()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Inline icon shown inside filter editor fields when allowFilterOperators is enabled.

      Returns:
      null
    • setOriginBaseStyle

      public ListGrid setOriginBaseStyle(String originBaseStyle)
      Name of a CSS Style to use as the baseStyle for a cell that is currently a selection origin for shifted incremental cell selection. Only has an effect if canSelectCells is true.

      Parameters:
      originBaseStyle - New originBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getOriginBaseStyle

      public String getOriginBaseStyle()
      Name of a CSS Style to use as the baseStyle for a cell that is currently a selection origin for shifted incremental cell selection. Only has an effect if canSelectCells is true.

      Returns:
      Current originBaseStyle value. Default value is null
      See Also:
    • setOverflow

      public ListGrid setOverflow(Overflow overflow)
      Since body is configured with overflow: auto by default, no overflow is expected for the ListGrid itself so by default it has overflow: hidden.
      Overrides:
      setOverflow in class Layout
      Parameters:
      overflow - New overflow value. Default value is Canvas.HIDDEN
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getOverflow

      public Overflow getOverflow()
      Since body is configured with overflow: auto by default, no overflow is expected for the ListGrid itself so by default it has overflow: hidden.
      Overrides:
      getOverflow in class Layout
      Returns:
      Current overflow value. Default value is Canvas.HIDDEN
      See Also:
    • setPendingAsyncCellValue

      public ListGrid setPendingAsyncCellValue(String pendingAsyncCellValue)
      The value to display for cells whose value is pending asynchronous computation.

      This is the grid-wide setting. ListGridField.pendingAsyncCellValue can override the grid setting for a specific field.

      Parameters:
      pendingAsyncCellValue - New pendingAsyncCellValue value. Default value is "&nbsp;"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPendingAsyncCellValue

      public String getPendingAsyncCellValue()
      The value to display for cells whose value is pending asynchronous computation.

      This is the grid-wide setting. ListGridField.pendingAsyncCellValue can override the grid setting for a specific field.

      Returns:
      Current pendingAsyncCellValue value. Default value is "&nbsp;"
      See Also:
    • setPlaceholderAIHoverContents

      public ListGrid setPlaceholderAIHoverContents(String placeholderAIHoverContents)
      Message to show in the hover while AI-generated hover text is being retrieved for fields specifying an aiHoverRequest.
      Parameters:
      placeholderAIHoverContents - New placeholderAIHoverContents value. Default value is "<b><i>Retrieving summary from AI...</i></b>"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPlaceholderAIHoverContents

      public String getPlaceholderAIHoverContents()
      Message to show in the hover while AI-generated hover text is being retrieved for fields specifying an aiHoverRequest.
      Returns:
      Current placeholderAIHoverContents value. Default value is "<b><i>Retrieving summary from AI...</i></b>"
      See Also:
    • setPoolComponentsPerColumn

      public ListGrid setPoolComponentsPerColumn(Boolean poolComponentsPerColumn)
      Should recycled record components, be pooled per column or per record. Only applies if showRecordComponentsByCell is true.

      When recordComponentPoolingMode is "recycle" and you have components of different types in different columns, set this property to true to ensure that components intended for one column are not recycled for use in another column that should have a different component.

      If no components applicable to a particular column are available in the pool, the system calls createRecordComponent.

      Parameters:
      poolComponentsPerColumn - New poolComponentsPerColumn value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getPoolComponentsPerColumn

      public Boolean getPoolComponentsPerColumn()
      Should recycled record components, be pooled per column or per record. Only applies if showRecordComponentsByCell is true.

      When recordComponentPoolingMode is "recycle" and you have components of different types in different columns, set this property to true to ensure that components intended for one column are not recycled for use in another column that should have a different component.

      If no components applicable to a particular column are available in the pool, the system calls createRecordComponent.

      Returns:
      Current poolComponentsPerColumn value. Default value is true
    • setPreserveFocusStylingOnMouseOut

      public ListGrid setPreserveFocusStylingOnMouseOut(Boolean preserveFocusStylingOnMouseOut)
      If showRollOver or hiliteRowOnFocus is true the current keyboard focus row for navigation via arrow keys, etc, will be hilighted with "Over" styling. This is particularly valuable to indicate which row has keyboard focus where there are multiple selected rows, or where the user is navigating without changing selection (see arrowKeyAction).
      However, note that as the user interacts with the rows using the mouse, the rollover styling will be updated to reflect the mouse position if showRollOver is true.

      When the user rolls the mouse off the grid, the default behavior is to re-style the current focus row with "Over" styling if the grid has keyboard focus. That way a user has a clear visual indication of where navigation would start. This may be disabled by setting preserveFocusStylingOnMouseOut to false.

      Note : This is an advanced setting

      Parameters:
      preserveFocusStylingOnMouseOut - New preserveFocusStylingOnMouseOut value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getPreserveFocusStylingOnMouseOut

      public Boolean getPreserveFocusStylingOnMouseOut()
      If showRollOver or hiliteRowOnFocus is true the current keyboard focus row for navigation via arrow keys, etc, will be hilighted with "Over" styling. This is particularly valuable to indicate which row has keyboard focus where there are multiple selected rows, or where the user is navigating without changing selection (see arrowKeyAction).
      However, note that as the user interacts with the rows using the mouse, the rollover styling will be updated to reflect the mouse position if showRollOver is true.

      When the user rolls the mouse off the grid, the default behavior is to re-style the current focus row with "Over" styling if the grid has keyboard focus. That way a user has a clear visual indication of where navigation would start. This may be disabled by setting preserveFocusStylingOnMouseOut to false.

      Returns:
      Current preserveFocusStylingOnMouseOut value. Default value is true
    • setPreserveWhitespace

      public ListGrid setPreserveWhitespace(Boolean preserveWhitespace)
      Should cells be written out with css that will preserve whitespace?

      If true, depending on the value of wrapCells, the css generated for cells will use the white-space property values of pre or pre-wrap. This avoids collapsing sequences of whitespace without requiring special &nbsp; characters.

      Note : This is an advanced setting

      Parameters:
      preserveWhitespace - New preserveWhitespace value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getPreserveWhitespace

      public Boolean getPreserveWhitespace()
      Should cells be written out with css that will preserve whitespace?

      If true, depending on the value of wrapCells, the css generated for cells will use the white-space property values of pre or pre-wrap. This avoids collapsing sequences of whitespace without requiring special &nbsp; characters.

      Returns:
      Current preserveWhitespace value. Default value is false
    • setPrintAutoFit

      public ListGrid setPrintAutoFit(Boolean printAutoFit)
      Whether cell contents should wrap during printing. Equivalent to Autofit, but specific to printed output.
      Parameters:
      printAutoFit - New printAutoFit value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintAutoFit

      public Boolean getPrintAutoFit()
      Whether cell contents should wrap during printing. Equivalent to Autofit, but specific to printed output.
      Returns:
      Current printAutoFit value. Default value is true
      See Also:
    • setPrintBaseStyle

      public ListGrid setPrintBaseStyle(String printBaseStyle)
      Style for non-header cells in printed output. Defaults to baseStyle if null.
      Parameters:
      printBaseStyle - New printBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintBaseStyle

      public String getPrintBaseStyle()
      Style for non-header cells in printed output. Defaults to baseStyle if null.
      Returns:
      Current printBaseStyle value. Default value is null
      See Also:
    • setPrintBooleanBaseStyle

      public ListGrid setPrintBooleanBaseStyle(String printBooleanBaseStyle) throws IllegalStateException
      If set, the booleanBaseStyle to use when printing.

      Note : This is an advanced setting

      Parameters:
      printBooleanBaseStyle - New printBooleanBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getPrintBooleanBaseStyle

      public String getPrintBooleanBaseStyle()
      If set, the booleanBaseStyle to use when printing.
      Returns:
      Current printBooleanBaseStyle value. Default value is null
      See Also:
    • setPrintBooleanFalseImage

      public ListGrid setPrintBooleanFalseImage(String printBooleanFalseImage)
      If set, the booleanFalseImage to use when printing.

      If this, printBooleanTrueImage and printBooleanPartialImage are unset, this will be set to the default CheckboxItem.printUncheckedImage.

      Note : This is an advanced setting

      Parameters:
      printBooleanFalseImage - New printBooleanFalseImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintBooleanFalseImage

      public String getPrintBooleanFalseImage()
      If set, the booleanFalseImage to use when printing.

      If this, printBooleanTrueImage and printBooleanPartialImage are unset, this will be set to the default CheckboxItem.printUncheckedImage.

      Returns:
      Current printBooleanFalseImage value. Default value is null
      See Also:
    • setPrintBooleanPartialImage

      public ListGrid setPrintBooleanPartialImage(String printBooleanPartialImage)
      If set, the booleanPartialImage to use when printing.

      If this, printBooleanTrueImage and printBooleanFalseImage are unset, this will be set to the default CheckboxItem.printPartialSelectedImage.

      Note : This is an advanced setting

      Parameters:
      printBooleanPartialImage - New printBooleanPartialImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintBooleanPartialImage

      public String getPrintBooleanPartialImage()
      If set, the booleanPartialImage to use when printing.

      If this, printBooleanTrueImage and printBooleanFalseImage are unset, this will be set to the default CheckboxItem.printPartialSelectedImage.

      Returns:
      Current printBooleanPartialImage value. Default value is null
      See Also:
    • setPrintBooleanTrueImage

      public ListGrid setPrintBooleanTrueImage(String printBooleanTrueImage)
      If set, the booleanTrueImage to use when printing.

      If this, printBooleanFalseImage and printBooleanPartialImage are unset, this will be set to the default CheckboxItem.printCheckedImage.

      Note : This is an advanced setting

      Parameters:
      printBooleanTrueImage - New printBooleanTrueImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintBooleanTrueImage

      public String getPrintBooleanTrueImage()
      If set, the booleanTrueImage to use when printing.

      If this, printBooleanFalseImage and printBooleanPartialImage are unset, this will be set to the default CheckboxItem.printCheckedImage.

      Returns:
      Current printBooleanTrueImage value. Default value is null
      See Also:
    • setPrintCheckboxFieldFalseImage

      public ListGrid setPrintCheckboxFieldFalseImage(String printCheckboxFieldFalseImage)
      If set, the checkboxFieldFalseImage to use when printing.

      Note : This is an advanced setting

      Parameters:
      printCheckboxFieldFalseImage - New printCheckboxFieldFalseImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintCheckboxFieldFalseImage

      public String getPrintCheckboxFieldFalseImage()
      If set, the checkboxFieldFalseImage to use when printing.
      Returns:
      Current printCheckboxFieldFalseImage value. Default value is null
      See Also:
    • setPrintCheckboxFieldPartialImage

      public ListGrid setPrintCheckboxFieldPartialImage(String printCheckboxFieldPartialImage)
      If set, the checkboxFieldPartialImage to use when printing.

      Note : This is an advanced setting

      Parameters:
      printCheckboxFieldPartialImage - New printCheckboxFieldPartialImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintCheckboxFieldPartialImage

      public String getPrintCheckboxFieldPartialImage()
      If set, the checkboxFieldPartialImage to use when printing.
      Returns:
      Current printCheckboxFieldPartialImage value. Default value is null
      See Also:
    • setPrintCheckboxFieldTrueImage

      public ListGrid setPrintCheckboxFieldTrueImage(String printCheckboxFieldTrueImage)
      If set, the checkboxFieldTrueImage to use when printing.

      Note : This is an advanced setting

      Parameters:
      printCheckboxFieldTrueImage - New printCheckboxFieldTrueImage value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintCheckboxFieldTrueImage

      public String getPrintCheckboxFieldTrueImage()
      If set, the checkboxFieldTrueImage to use when printing.
      Returns:
      Current printCheckboxFieldTrueImage value. Default value is null
      See Also:
    • setPrintHeaderStyle

      public ListGrid setPrintHeaderStyle(String printHeaderStyle)
      Style for header cells in printed output. Defaults to headerBaseStyle if null.
      Parameters:
      printHeaderStyle - New printHeaderStyle value. Default value is "printHeader"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintHeaderStyle

      public String getPrintHeaderStyle()
      Style for header cells in printed output. Defaults to headerBaseStyle if null.
      Returns:
      Current printHeaderStyle value. Default value is "printHeader"
      See Also:
    • setPrintMaxRows

      public ListGrid setPrintMaxRows(int printMaxRows)
      Advanced property - when generating printHTML for a large ListGrid, rows are printed in batches in order to avoid triggering a native "script is running slowly" browser dialog.

      For grids with exceptional numbers of columns or complex formatting logic, this number might need to be adjusted downward.

      Note : This is an advanced setting

      Parameters:
      printMaxRows - New printMaxRows value. Default value is 100
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintMaxRows

      public int getPrintMaxRows()
      Advanced property - when generating printHTML for a large ListGrid, rows are printed in batches in order to avoid triggering a native "script is running slowly" browser dialog.

      For grids with exceptional numbers of columns or complex formatting logic, this number might need to be adjusted downward.

      Returns:
      Current printMaxRows value. Default value is 100
      See Also:
    • setPrintWrapCells

      public ListGrid setPrintWrapCells(Boolean printWrapCells)
      Whether cell contents should wrap during printing. Equivalent to wrapCells, but specific to printed output.
      Parameters:
      printWrapCells - New printWrapCells value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getPrintWrapCells

      public Boolean getPrintWrapCells()
      Whether cell contents should wrap during printing. Equivalent to wrapCells, but specific to printed output.
      Returns:
      Current printWrapCells value. Default value is true
      See Also:
    • setQuickDrawAheadRatio

      public ListGrid setQuickDrawAheadRatio(float quickDrawAheadRatio)
      Alternative to drawAheadRatio, to be used when the user is rapidly changing the grids viewport (for example drag scrolling through the grid). If unspecified drawAheadRatio will be used in all cases
      Parameters:
      quickDrawAheadRatio - New quickDrawAheadRatio value. Default value is 2.0
      Returns:
      ListGrid instance, for chaining setter calls
    • getQuickDrawAheadRatio

      public float getQuickDrawAheadRatio()
      Alternative to drawAheadRatio, to be used when the user is rapidly changing the grids viewport (for example drag scrolling through the grid). If unspecified drawAheadRatio will be used in all cases
      Returns:
      Current quickDrawAheadRatio value. Default value is 2.0
    • setRangeRowCountFormat

      public ListGrid setRangeRowCountFormat(String rangeRowCountFormat)
      Format for the string returned from getFormattedRowCount() when row count status is "range".

      The following variables are available for evaluation within this string:

      • minRowCount: the lower bound of this row count value from getRowCountRange()[0], as a locale-formatted number.
      • minRowCount: the upper bound of this row count value from getRowCountRange()[1], as a locale-formatted number.
      Parameters:
      rangeRowCountFormat - New rangeRowCountFormat value. Default value is "${minRowCount}-${maxRowCount}"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRangeRowCountFormat

      public String getRangeRowCountFormat()
      Format for the string returned from getFormattedRowCount() when row count status is "range".

      The following variables are available for evaluation within this string:

      • minRowCount: the lower bound of this row count value from getRowCountRange()[0], as a locale-formatted number.
      • minRowCount: the upper bound of this row count value from getRowCountRange()[1], as a locale-formatted number.
      Returns:
      Current rangeRowCountFormat value. Default value is "${minRowCount}-${maxRowCount}"
      See Also:
    • setRecordBaseStyleProperty

      public ListGrid setRecordBaseStyleProperty(String recordBaseStyleProperty)
      This attribute allows custom base styles to be displayed on a per-record basis. To specify a custom base-style for some record set record[listGrid.recordBaseStyleProperty] to the desired base style name - for example if recordBaseStyleProperty is "_baseStyle", set record._baseStyle to the custom base style name.

      Note : This is an advanced setting

      Parameters:
      recordBaseStyleProperty - New recordBaseStyleProperty value. Default value is "_baseStyle"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRecordBaseStyleProperty

      public String getRecordBaseStyleProperty()
      This attribute allows custom base styles to be displayed on a per-record basis. To specify a custom base-style for some record set record[listGrid.recordBaseStyleProperty] to the desired base style name - for example if recordBaseStyleProperty is "_baseStyle", set record._baseStyle to the custom base style name.
      Returns:
      Current recordBaseStyleProperty value. Default value is "_baseStyle"
      See Also:
    • setRecordCanRemoveProperty

      public ListGrid setRecordCanRemoveProperty(String recordCanRemoveProperty) throws IllegalStateException
      If set to false on a record and canRemoveRecords is true, removal of that record is disallowed in the UI. The icon in the remove field is not shown.

      Note : This is an advanced setting

      Parameters:
      recordCanRemoveProperty - New recordCanRemoveProperty value. Default value is "_canRemove"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRecordCanRemoveProperty

      public String getRecordCanRemoveProperty()
      If set to false on a record and canRemoveRecords is true, removal of that record is disallowed in the UI. The icon in the remove field is not shown.
      Returns:
      Current recordCanRemoveProperty value. Default value is "_canRemove"
      See Also:
    • setRecordCanSelectProperty

      public ListGrid setRecordCanSelectProperty(String recordCanSelectProperty) throws IllegalStateException
      If set to false on a record, selection of that record is disallowed.

      Note : This is an advanced setting

      Parameters:
      recordCanSelectProperty - New recordCanSelectProperty value. Default value is "canSelect"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRecordCanSelectProperty

      public String getRecordCanSelectProperty()
      If set to false on a record, selection of that record is disallowed.
      Returns:
      Current recordCanSelectProperty value. Default value is "canSelect"
    • setRecordCellRoleProperty

      public ListGrid setRecordCellRoleProperty(String recordCellRoleProperty)
      If this property is set on a record it will designate the WAI ARIA role for cells within this records row

      Note : This is an advanced setting

      Parameters:
      recordCellRoleProperty - New recordCellRoleProperty value. Default value is "cellRole"
      Returns:
      ListGrid instance, for chaining setter calls
    • getRecordCellRoleProperty

      public String getRecordCellRoleProperty()
      If this property is set on a record it will designate the WAI ARIA role for cells within this records row
      Returns:
      Current recordCellRoleProperty value. Default value is "cellRole"
    • setRecordComponentHeight

      public ListGrid setRecordComponentHeight(Integer recordComponentHeight)
      If showRecordComponents is true, this attribute may be used to specify a standard height for record components. If specified every row in the grid will be sized tall enough to accommodate a recordComponent of this size.

      Note that if this property is unset, the grid will not be able to know row heights in advance, and frozen fields are not currently supported in this case. If you are putting a recordComponent in every row, and they all have a consistent height, set recordComponentHeight and you will then be able to use frozen fields and avoid the whitespace side-effect of virtual scrolling by setting virtualScrolling:false.

      Similarly, if your recordComponents are never tall enough that they will expand the row beyond the cellHeight, set virtualScrolling:false to avoid the whitespace side-effect of virtual scrolling and to allow frozen fields to be used. In this mode, you can have recordComponents on some rows but not others, and recordComponents of different heights, so long as no recordComponent ever causes a row to grow beyond cellHeight (which would happen if the recordComponents height + 2*cellPadding is larger than cellHeight).

      If this method is called after the component has been drawn/initialized: Setter for the recordComponentHeight

      Note : This is an advanced setting

      Parameters:
      recordComponentHeight - recordComponent height. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRecordComponentHeight

      public Integer getRecordComponentHeight()
      If showRecordComponents is true, this attribute may be used to specify a standard height for record components. If specified every row in the grid will be sized tall enough to accommodate a recordComponent of this size.

      Note that if this property is unset, the grid will not be able to know row heights in advance, and frozen fields are not currently supported in this case. If you are putting a recordComponent in every row, and they all have a consistent height, set recordComponentHeight and you will then be able to use frozen fields and avoid the whitespace side-effect of virtual scrolling by setting virtualScrolling:false.

      Similarly, if your recordComponents are never tall enough that they will expand the row beyond the cellHeight, set virtualScrolling:false to avoid the whitespace side-effect of virtual scrolling and to allow frozen fields to be used. In this mode, you can have recordComponents on some rows but not others, and recordComponents of different heights, so long as no recordComponent ever causes a row to grow beyond cellHeight (which would happen if the recordComponents height + 2*cellPadding is larger than cellHeight).

      Returns:
      Current recordComponentHeight value. Default value is null
      See Also:
    • setRecordComponentPoolingMode

      public ListGrid setRecordComponentPoolingMode(RecordComponentPoolingMode recordComponentPoolingMode)
      The method of component-pooling to employ for recordComponents.

      The default mode is "viewport", which means that recordComponents are destroyed as soon their record is no longer being rendered (scrolled out of the viewport, eliminated by search criteria, etc).

      For a large or dynamic data set where the components shown on different rows are similar, switch to "recycle" mode, which pools recordComponents by detaching them from records that are not visible and re-using them in other records. In this mode, you should implement updateRecordComponent() to apply any changes to make reused components applicable to the new record they appear in, if necessary. For example, if you have several controls in your recordComponents, and not all of the controls apply to every record, your updateRecordComponent() implementation could simply hide or disable inapplicable controls, and this would be much faster than creating a whole new set of controls every time a given record is scrolled into view.

      If you are using per-cell recordComponents, and you have components of different types in different columns and still want to take advantage of component recycling, you can set poolComponentsPerColumn to ensure that components intended for one column are not recycled for use in another column that should have a different component.

      Note that, if different records have distinctly different components embedded in them, or multiple columns in each record embed different components, you should leave the recordComponentPoolingMode at "viewport" if your dataset is very large or use "data" otherwise.

      Note : This is an advanced setting

      Parameters:
      recordComponentPoolingMode - New recordComponentPoolingMode value. Default value is "viewport"
      Returns:
      ListGrid instance, for chaining setter calls
    • getRecordComponentPoolingMode

      public RecordComponentPoolingMode getRecordComponentPoolingMode()
      The method of component-pooling to employ for recordComponents.

      The default mode is "viewport", which means that recordComponents are destroyed as soon their record is no longer being rendered (scrolled out of the viewport, eliminated by search criteria, etc).

      For a large or dynamic data set where the components shown on different rows are similar, switch to "recycle" mode, which pools recordComponents by detaching them from records that are not visible and re-using them in other records. In this mode, you should implement updateRecordComponent() to apply any changes to make reused components applicable to the new record they appear in, if necessary. For example, if you have several controls in your recordComponents, and not all of the controls apply to every record, your updateRecordComponent() implementation could simply hide or disable inapplicable controls, and this would be much faster than creating a whole new set of controls every time a given record is scrolled into view.

      If you are using per-cell recordComponents, and you have components of different types in different columns and still want to take advantage of component recycling, you can set poolComponentsPerColumn to ensure that components intended for one column are not recycled for use in another column that should have a different component.

      Note that, if different records have distinctly different components embedded in them, or multiple columns in each record embed different components, you should leave the recordComponentPoolingMode at "viewport" if your dataset is very large or use "data" otherwise.

      Returns:
      Current recordComponentPoolingMode value. Default value is "viewport"
    • setRecordComponentPosition

      public ListGrid setRecordComponentPosition(EmbeddedPosition recordComponentPosition)
      if showRecordComponents is true, how should the component appear within the cell. Valid options are
      • "within": the component will be rendered inside the record / cell. Canvas.snapTo may be set to specify where the component should render within the row or cell, and Canvas.snapOffsetTop / Canvas.snapOffsetLeft may be set to indent recordComponents within their parent cells. Note that if unset, the component will show up at the top/left edge for components embedded within an entire row, or for per-cell components, cell align and valign will be respected. Note also that, when rendering components "within" cells, specified component heights will be respected and will change the height of the row. However, if you want components to completely fill a cell at it's default height, set height: "100%" or rows will render at the default height of the component.
      • "expand": the component will be written into the cell below the normal cell content, causing the cell to expand vertically to accommodate it.
      • null: If this attribute is unset, we will default to showing recordComponents with position "within" if showRecordComponentsByCell is true, otherwise using "expand" logic.
      Parameters:
      recordComponentPosition - New recordComponentPosition value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRecordComponentPosition

      public EmbeddedPosition getRecordComponentPosition()
      if showRecordComponents is true, how should the component appear within the cell. Valid options are
      • "within": the component will be rendered inside the record / cell. Canvas.snapTo may be set to specify where the component should render within the row or cell, and Canvas.snapOffsetTop / Canvas.snapOffsetLeft may be set to indent recordComponents within their parent cells. Note that if unset, the component will show up at the top/left edge for components embedded within an entire row, or for per-cell components, cell align and valign will be respected. Note also that, when rendering components "within" cells, specified component heights will be respected and will change the height of the row. However, if you want components to completely fill a cell at it's default height, set height: "100%" or rows will render at the default height of the component.
      • "expand": the component will be written into the cell below the normal cell content, causing the cell to expand vertically to accommodate it.
      • null: If this attribute is unset, we will default to showing recordComponents with position "within" if showRecordComponentsByCell is true, otherwise using "expand" logic.
      Returns:
      Current recordComponentPosition value. Default value is null
      See Also:
    • setRecordDetailDSProperty

      public ListGrid setRecordDetailDSProperty(String recordDetailDSProperty)
      The name of the ListGridRecord property that specifies the DataSource to use when listGrid.expansionMode is "related". The default is ListGridRecord.detailDS. Note that you can set the detailDS at the grid level instead if the same dataSource is to be used for all records.

      Note : This is an advanced setting

      Parameters:
      recordDetailDSProperty - New recordDetailDSProperty value. Default value is "detailDS"
      Returns:
      ListGrid instance, for chaining setter calls
    • getRecordDetailDSProperty

      public String getRecordDetailDSProperty()
      The name of the ListGridRecord property that specifies the DataSource to use when listGrid.expansionMode is "related". The default is ListGridRecord.detailDS. Note that you can set the detailDS at the grid level instead if the same dataSource is to be used for all records.
      Returns:
      Current recordDetailDSProperty value. Default value is "detailDS"
    • setRecordDropAppearance

      public ListGrid setRecordDropAppearance(RecordDropAppearance recordDropAppearance)
      If canAcceptDroppedRecords is true for this listGrid, this property governs whether the user can drop between, or over records within the grid. This controls what RecordDropPosition is passed to the recordDrop() event handler.
      Parameters:
      recordDropAppearance - New recordDropAppearance value. Default value is ListGrid.BETWEEN
      Returns:
      ListGrid instance, for chaining setter calls
    • getRecordDropAppearance

      public RecordDropAppearance getRecordDropAppearance()
      If canAcceptDroppedRecords is true for this listGrid, this property governs whether the user can drop between, or over records within the grid. This controls what RecordDropPosition is passed to the recordDrop() event handler.
      Returns:
      Current recordDropAppearance value. Default value is ListGrid.BETWEEN
    • setRecordEditProperty

      public ListGrid setRecordEditProperty(String recordEditProperty)
      Property name on a record that should be checked to determine whether the record may be edited.
      This property is configurable to avoid possible collision with data values in record. With the default setting of "_canEdit", a record can be set non-editable by ensuring record._canEdit == false.
      For controlling editability for the entire grid or for a field, set grid.canEdit or field.canEdit.

      Note : This is an advanced setting

      Parameters:
      recordEditProperty - New recordEditProperty value. Default value is "_canEdit"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRecordEditProperty

      public String getRecordEditProperty()
      Property name on a record that should be checked to determine whether the record may be edited.
      This property is configurable to avoid possible collision with data values in record. With the default setting of "_canEdit", a record can be set non-editable by ensuring record._canEdit == false.
      For controlling editability for the entire grid or for a field, set grid.canEdit or field.canEdit.
      Returns:
      Current recordEditProperty value. Default value is "_canEdit"
      See Also:
    • setRecordEnabledProperty

      public ListGrid setRecordEnabledProperty(String recordEnabledProperty) throws IllegalStateException
      Property name on a record that will be checked to determine whether a record is enabled.

      Setting this property on a record will effect the visual style and interactivity of the record. If set to false the record (row in a ListGrid or TreeGrid) will not highlight when the mouse moves over it, nor will it respond to mouse clicks.

      Parameters:
      recordEnabledProperty - New recordEnabledProperty value. Default value is "enabled"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRecordEnabledProperty

      public String getRecordEnabledProperty()
      Property name on a record that will be checked to determine whether a record is enabled.

      Setting this property on a record will effect the visual style and interactivity of the record. If set to false the record (row in a ListGrid or TreeGrid) will not highlight when the mouse moves over it, nor will it respond to mouse clicks.

      Returns:
      Current recordEnabledProperty value. Default value is "enabled"
      See Also:
    • setRecordRadius

      public ListGrid setRecordRadius(String recordRadius)
      When set to any valid CSS border-radius string, allows for rounded records in this grid by having getCellCSSText() apply a corner-radius to the first and last cells in each record. This styling is applied on top of the regular cell styles, so will work with any design, and is also applied correctly with or without frozen fields.

      If you need to apply more than just a radius to the ends of each record, you can set styledRowEnds to true and provide firstCellStyle and lastCellStyle classes that achieve the design you need. Note that these two classes should not modify settings which may affect sizing, such as padding or font-sizes.

      Note that you can also provide your own implementation of getCellCSSText() or getCellStyle(), if you want to do something more complex, like a gradient fade that spans the end two cells on each side of a record.

      If this method is called after the component has been drawn/initialized: Setter for recordRadius, which provides rounded corners for rows in this grid.

      Parameters:
      recordRadius - any CSS border-radius string, with 1 to 4 space-separated sizes. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getRecordRadius

      public String getRecordRadius()
      When set to any valid CSS border-radius string, allows for rounded records in this grid by having getCellCSSText() apply a corner-radius to the first and last cells in each record. This styling is applied on top of the regular cell styles, so will work with any design, and is also applied correctly with or without frozen fields.

      If you need to apply more than just a radius to the ends of each record, you can set styledRowEnds to true and provide firstCellStyle and lastCellStyle classes that achieve the design you need. Note that these two classes should not modify settings which may affect sizing, such as padding or font-sizes.

      Note that you can also provide your own implementation of getCellCSSText() or getCellStyle(), if you want to do something more complex, like a gradient fade that spans the end two cells on each side of a record.

      Returns:
      Current recordRadius value. Default value is null
    • setRecordRadiusTargets

      public ListGrid setRecordRadiusTargets(RecordType... recordRadiusTargets)
      Array of RecordTypes that should be rounded when recordRadius is set to a valid CSS border-radius string.

      By default, group-headers and records showing group or grid summaries are not rounded, because these records typically have a separator line to distinguish them from surrounding records.

      Parameters:
      recordRadiusTargets - New recordRadiusTargets value. Default value is []
      Returns:
      ListGrid instance, for chaining setter calls
    • getRecordRadiusTargets

      public RecordType[] getRecordRadiusTargets()
      Array of RecordTypes that should be rounded when recordRadius is set to a valid CSS border-radius string.

      By default, group-headers and records showing group or grid summaries are not rounded, because these records typically have a separator line to distinguish them from surrounding records.

      Returns:
      Current recordRadiusTargets value. Default value is []
    • setRecordRowAriaStateProperty

      public ListGrid setRecordRowAriaStateProperty(String recordRowAriaStateProperty)
      If this property is set on a record it will designate a mapping of WAI ARIA attribute names and values for this record's row.

      Note : This is an advanced setting

      Parameters:
      recordRowAriaStateProperty - New recordRowAriaStateProperty value. Default value is "rowAriaState"
      Returns:
      ListGrid instance, for chaining setter calls
    • getRecordRowAriaStateProperty

      public String getRecordRowAriaStateProperty()
      If this property is set on a record it will designate a mapping of WAI ARIA attribute names and values for this record's row.
      Returns:
      Current recordRowAriaStateProperty value. Default value is "rowAriaState"
    • setRecordRowRoleProperty

      public ListGrid setRecordRowRoleProperty(String recordRowRoleProperty)
      If this property is set on a record it will designate the WAI ARIA role for this record's row.

      Note : This is an advanced setting

      Parameters:
      recordRowRoleProperty - New recordRowRoleProperty value. Default value is "rowRole"
      Returns:
      ListGrid instance, for chaining setter calls
    • getRecordRowRoleProperty

      public String getRecordRowRoleProperty()
      If this property is set on a record it will designate the WAI ARIA role for this record's row.
      Returns:
      Current recordRowRoleProperty value. Default value is "rowRole"
    • setRecordScreen

      public ListGrid setRecordScreen(String recordScreen) throws IllegalStateException
      Screen to create (via createScreen()) in lieu of calling getRecordComponent().

      If this grid has a dataSource, the created screen is provided with a Canvas.dataContext that includes the record being shown at the row. Be sure the record screen meets these requirements to utilize the dataContext.

      Parameters:
      recordScreen - New recordScreen value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRecordScreen

      public String getRecordScreen()
      Screen to create (via createScreen()) in lieu of calling getRecordComponent().

      If this grid has a dataSource, the created screen is provided with a Canvas.dataContext that includes the record being shown at the row. Be sure the record screen meets these requirements to utilize the dataContext.

      Returns:
      Current recordScreen value. Default value is null
    • setRecordShowRollOverProperty

      public ListGrid setRecordShowRollOverProperty(String recordShowRollOverProperty) throws IllegalStateException
      Name of the property that can be set on a per-record basis to disabled rollover for an individual record when showRollOver is true.
      Parameters:
      recordShowRollOverProperty - New recordShowRollOverProperty value. Default value is "showRollOver"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRecordShowRollOverProperty

      public String getRecordShowRollOverProperty()
      Name of the property that can be set on a per-record basis to disabled rollover for an individual record when showRollOver is true.
      Returns:
      Current recordShowRollOverProperty value. Default value is "showRollOver"
      See Also:
    • setRecordSummaryAttributePrefix

      public ListGrid setRecordSummaryAttributePrefix(String recordSummaryAttributePrefix) throws IllegalStateException
      Prefix prepended to the name of a "summary" type field when accessing its value as record metadata. The Framework may write out this value to make rendering the cell values or calculating a grid summary row or group summary rows more efficient.

      Note : This is an advanced setting

      Parameters:
      recordSummaryAttributePrefix - New recordSummaryAttributePrefix value. Default value is "_"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRecordSummaryAttributePrefix

      public String getRecordSummaryAttributePrefix()
      Prefix prepended to the name of a "summary" type field when accessing its value as record metadata. The Framework may write out this value to make rendering the cell values or calculating a grid summary row or group summary rows more efficient.
      Returns:
      Current recordSummaryAttributePrefix value. Default value is "_"
      See Also:
    • setRecordSummaryBaseStyle

      public ListGrid setRecordSummaryBaseStyle(String recordSummaryBaseStyle)
      If showing any record summary fields (IE: fields of type:"summary"), this attribute specifies a custom base style to apply to cells in the summary field

      Note : This is an advanced setting

      Parameters:
      recordSummaryBaseStyle - New recordSummaryBaseStyle value. Default value is "recordSummaryCell"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRecordSummaryBaseStyle

      public String getRecordSummaryBaseStyle()
      If showing any record summary fields (IE: fields of type:"summary"), this attribute specifies a custom base style to apply to cells in the summary field
      Returns:
      Current recordSummaryBaseStyle value. Default value is "recordSummaryCell"
      See Also:
    • setRemovedCSSText

      public ListGrid setRemovedCSSText(String removedCSSText)
      Custom CSS text to be applied to records that have been marked for removal.

      This CSS text will be applied on top of standard disabled styling for the cell.

      Note : This is an advanced setting

      Parameters:
      removedCSSText - New removedCSSText value. Default value is "text-decoration:line-through;"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRemovedCSSText

      public String getRemovedCSSText()
      Custom CSS text to be applied to records that have been marked for removal.

      This CSS text will be applied on top of standard disabled styling for the cell.

      Returns:
      Current removedCSSText value. Default value is "text-decoration:line-through;"
      See Also:
    • setRemoveFieldProperties

      public ListGrid setRemoveFieldProperties(ListGridField removeFieldProperties) throws IllegalStateException
      Configuration properties for the "remove field" displayed when canRemoveRecords is enabled.
      Parameters:
      removeFieldProperties - New removeFieldProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRemoveFieldProperties

      public ListGridField getRemoveFieldProperties()
      Configuration properties for the "remove field" displayed when canRemoveRecords is enabled.
      Returns:
      Current removeFieldProperties value. Default value is null
    • setRemoveFieldTitle

      public ListGrid setRemoveFieldTitle(String removeFieldTitle)
      The title to use for the remove field.

      By default this title is not displayed in the remove column header button as the removeFieldDefaults sets ListGridField.showTitle to false.

      Note : This is an advanced setting

      Parameters:
      removeFieldTitle - New removeFieldTitle value. Default value is "&nbsp;"
      Returns:
      ListGrid instance, for chaining setter calls
    • getRemoveFieldTitle

      public String getRemoveFieldTitle()
      The title to use for the remove field.

      By default this title is not displayed in the remove column header button as the removeFieldDefaults sets ListGridField.showTitle to false.

      Returns:
      Current removeFieldTitle value. Default value is "&nbsp;"
    • setRemoveIcon

      public ListGrid setRemoveIcon(String removeIcon) throws IllegalStateException
      When canRemoveRecords is enabled, default icon to show in the auto-generated field that allows removing records.
      Parameters:
      removeIcon - New removeIcon value. Default value is "[SKIN]/actions/remove.png"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRemoveIcon

      public String getRemoveIcon()
      When canRemoveRecords is enabled, default icon to show in the auto-generated field that allows removing records.
      Returns:
      Current removeIcon value. Default value is "[SKIN]/actions/remove.png"
      See Also:
    • setRemoveIconSize

      public ListGrid setRemoveIconSize(int removeIconSize)
      Default width and height of remove icons for this ListGrid.
      Parameters:
      removeIconSize - New removeIconSize value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
    • getRemoveIconSize

      public int getRemoveIconSize()
      Default width and height of remove icons for this ListGrid.
      Returns:
      Current removeIconSize value. Default value is 16
    • setRemoveIconStyle

      public ListGrid setRemoveIconStyle(String removeIconStyle)
      Custom style to apply to the image in the removeField displayed in rows when canRemoveRecords is true. Affects the icons provided by removeIcon and unremoveIcon.
      Parameters:
      removeIconStyle - New removeIconStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRemoveIconStyle

      public String getRemoveIconStyle()
      Custom style to apply to the image in the removeField displayed in rows when canRemoveRecords is true. Affects the icons provided by removeIcon and unremoveIcon.
      Returns:
      Current removeIconStyle value. Default value is null
      See Also:
    • setReselectOnUpdate

      public ListGrid setReselectOnUpdate(boolean reselectOnUpdate) throws IllegalStateException
      If true, when an update operation occurs on a selected record in a databound listGrid, ensure the updated record is re-selected when the operation completes. The reselectOnUpdateNotifications attributes governs whether ListGrid.selectionUpdated() and ListGrid.selectionChanged() will fire when this occurs.

      Note : This is an advanced setting

      Parameters:
      reselectOnUpdate - New reselectOnUpdate value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getReselectOnUpdate

      public boolean getReselectOnUpdate()
      If true, when an update operation occurs on a selected record in a databound listGrid, ensure the updated record is re-selected when the operation completes. The reselectOnUpdateNotifications attributes governs whether ListGrid.selectionUpdated() and ListGrid.selectionChanged() will fire when this occurs.
      Returns:
      Current reselectOnUpdate value. Default value is true
    • setReselectOnUpdateNotifications

      public ListGrid setReselectOnUpdateNotifications(SelectionNotificationType reselectOnUpdateNotifications)
      if reselectOnUpdate is true, this property governs what selection changed notifications should be triggered when a selected record is edited then automatically reselected when the edited data is merged into the data set.

      Note : This is an advanced setting

      Parameters:
      reselectOnUpdateNotifications - New reselectOnUpdateNotifications value. Default value is "selectionChanged"
      Returns:
      ListGrid instance, for chaining setter calls
    • getReselectOnUpdateNotifications

      public SelectionNotificationType getReselectOnUpdateNotifications()
      if reselectOnUpdate is true, this property governs what selection changed notifications should be triggered when a selected record is edited then automatically reselected when the edited data is merged into the data set.
      Returns:
      Current reselectOnUpdateNotifications value. Default value is "selectionChanged"
    • setResizeFieldsInRealTime

      public ListGrid setResizeFieldsInRealTime(boolean resizeFieldsInRealTime)
      If true, the grid contents are redrawn in real time as fields are resized. This can be slow with a large grid and/or on some platforms. By default, this is enabled in modern desktop browsers. This is automatically switched off in mobile browsers.

      Note : This is an advanced setting

      Parameters:
      resizeFieldsInRealTime - New resizeFieldsInRealTime value. Default value is see below
      Returns:
      ListGrid instance, for chaining setter calls
    • getResizeFieldsInRealTime

      public boolean getResizeFieldsInRealTime()
      If true, the grid contents are redrawn in real time as fields are resized. This can be slow with a large grid and/or on some platforms. By default, this is enabled in modern desktop browsers. This is automatically switched off in mobile browsers.
      Returns:
      Current resizeFieldsInRealTime value. Default value is see below
    • setReverseRTLAlign

      public ListGrid setReverseRTLAlign(Boolean reverseRTLAlign)
      If a page is rendered in RTL mode, should cell alignments specified ListGridField.cellAlign be reversed (so an align:"right" field will have content aligned on the left and vice versa)?

      This is true by default to match user expectation that text flows from start-to end and is aligned with the start of text flow (left in LTR mode, right in RTL mode) by default. May be set to false to have the specified alignments be taken literally in RTL mode.

      Parameters:
      reverseRTLAlign - New reverseRTLAlign value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getReverseRTLAlign

      public Boolean getReverseRTLAlign()
      If a page is rendered in RTL mode, should cell alignments specified ListGridField.cellAlign be reversed (so an align:"right" field will have content aligned on the left and vice versa)?

      This is true by default to match user expectation that text flows from start-to end and is aligned with the start of text flow (left in LTR mode, right in RTL mode) by default. May be set to false to have the specified alignments be taken literally in RTL mode.

      Returns:
      Current reverseRTLAlign value. Default value is true
    • setRotatedHeaderMenuButtonHeight

      public ListGrid setRotatedHeaderMenuButtonHeight(int rotatedHeaderMenuButtonHeight) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the height of the auto-generated headerMenuButton over a rotated header button.

      Note : This is an advanced setting

      Parameters:
      rotatedHeaderMenuButtonHeight - New rotatedHeaderMenuButtonHeight value. Default value is "100%"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRotatedHeaderMenuButtonHeight

      public int getRotatedHeaderMenuButtonHeight()
      If showHeaderMenuButton is true, this property governs the height of the auto-generated headerMenuButton over a rotated header button.
      Returns:
      Current rotatedHeaderMenuButtonHeight value. Default value is "100%"
      See Also:
    • setRotatedHeaderMenuButtonHeight

      public ListGrid setRotatedHeaderMenuButtonHeight(String rotatedHeaderMenuButtonHeight) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the height of the auto-generated headerMenuButton over a rotated header button.

      Note : This is an advanced setting

      Parameters:
      rotatedHeaderMenuButtonHeight - New rotatedHeaderMenuButtonHeight value. Default value is "100%"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRotatedHeaderMenuButtonHeightAsString

      public String getRotatedHeaderMenuButtonHeightAsString()
      If showHeaderMenuButton is true, this property governs the height of the auto-generated headerMenuButton over a rotated header button.
      Returns:
      Current rotatedHeaderMenuButtonHeight value. Default value is "100%"
      See Also:
    • setRotatedHeaderMenuButtonWidth

      public ListGrid setRotatedHeaderMenuButtonWidth(int rotatedHeaderMenuButtonWidth) throws IllegalStateException
      If showHeaderMenuButton is true, this property governs the width of the auto-generated headerMenuButton over a rotated header button.

      Note : This is an advanced setting

      Parameters:
      rotatedHeaderMenuButtonWidth - New rotatedHeaderMenuButtonWidth value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRotatedHeaderMenuButtonWidth

      public int getRotatedHeaderMenuButtonWidth()
      If showHeaderMenuButton is true, this property governs the width of the auto-generated headerMenuButton over a rotated header button.
      Returns:
      Current rotatedHeaderMenuButtonWidth value. Default value is 16
      See Also:
    • setRotateHeaderTitles

      public ListGrid setRotateHeaderTitles(Boolean rotateHeaderTitles) throws IllegalStateException
      Whether to rotate the field titles so they're rendered vertically from bottom to top. Can be overridden for individual fields by setting ListGridField.rotateTitle.

      Note that you can manually set the header height and field widths as you please when using this feature, but it's not compatible with autoFitHeaderHeights or autofitting of field widths in any AutoFitWidthApproach other than "value".

      You can use headerTitleVAlign or ListGridField.valign to control vertical positioning of the titles, and ListGridField.align to control the horizontal. You may also choose between clipping or wrapping, and set showHeaderMenuButton as you please (which reserves space in each header button for the header menu button).

      Note that this feature is incompatible with clipping via clipHeaderTitles:false, and may not work with older browsers, particular IE versions before IE10. The "TreeFrog" and "Basic" skins are not supported for this feature.

      Parameters:
      rotateHeaderTitles - New rotateHeaderTitles value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRotateHeaderTitles

      public Boolean getRotateHeaderTitles()
      Whether to rotate the field titles so they're rendered vertically from bottom to top. Can be overridden for individual fields by setting ListGridField.rotateTitle.

      Note that you can manually set the header height and field widths as you please when using this feature, but it's not compatible with autoFitHeaderHeights or autofitting of field widths in any AutoFitWidthApproach other than "value".

      You can use headerTitleVAlign or ListGridField.valign to control vertical positioning of the titles, and ListGridField.align to control the horizontal. You may also choose between clipping or wrapping, and set showHeaderMenuButton as you please (which reserves space in each header button for the header menu button).

      Note that this feature is incompatible with clipping via clipHeaderTitles:false, and may not work with older browsers, particular IE versions before IE10. The "TreeFrog" and "Basic" skins are not supported for this feature.

      Returns:
      Current rotateHeaderTitles value. Default value is null
      See Also:
    • setRowAriaState

      public ListGrid setRowAriaState(Map rowAriaState)
      Returns a mapping of default WAI ARIA attributes for rows within this listGrid. See getRowAriaState()

      Note : This is an advanced setting

      Parameters:
      rowAriaState - New rowAriaState value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getRowAriaState

      public Map getRowAriaState()
      Returns a mapping of default WAI ARIA attributes for rows within this listGrid. See getRowAriaState()
      Returns:
      Returns a map of WAI ARIA state attribute values to be written into rows within this grid.

      Default implementation returns an object with combined properties from any specified row aria state default object, overlaid with any recordRowAriaStateProperty properties specified on the record itself, plus the following attributes:

      . Default value is null
    • setRowCountDisplayPrecision

      public ListGrid setRowCountDisplayPrecision(Integer rowCountDisplayPrecision)
      When an exact row count is not known due to progressive loading, this attribute allows the formatted row count returned by getFormattedRowCount() and ultimately displayed in the rowRangeDisplay label to be rounded to a multiple of the specified value. If not explicitly set, this value defaults to the page size for the data.

      For example if the server reports a DSResponse.totalRows of 320 while progressive loading is active (meaning this is not an exact row count), and rowCountDisplayPrecision is set to 150, the formatted rowCount may display 300+

      The precision will round either up or down depending on the row count status.

      • rowCountStatus:"exact" - this setting has no effect
      • rowCountStatus:"minimum" - the reported row count will be rounded down to the previous multiple of this value.
      • rowCountStatus:"maximum" - the reported row count will be rounded up to the next multiple of this value.
      • rowCountStatus:"approximate" - the reported row count will be rounded either up or down to the nearest multiple of this value.
      • rowCountStatus:"range" - the reported minimum row count will be rounded down to the next multiple of this value, and the reported maximum will be rounded up to the next multiple of this value.
      Note the formatted row count will never be rounded down to zero - if the row count is less than the rowCountDisplayPrecision, the exact reported row count value will be displayed. This could typically only occur if rowCountDisplayPrecision is more than the page size for the data.

      This value may be set to 1 to effectively disable the rounding behavior altogether (the row count will not be displayed exactly as reported).

      Note that this is purely a formatting setting for the formatted row count string. It has no impact on the behavior of the grid in terms of the reported data length, totalRows or scrollable area.

      Parameters:
      rowCountDisplayPrecision - New rowCountDisplayPrecision value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRowCountDisplayPrecision

      public Integer getRowCountDisplayPrecision()
      When an exact row count is not known due to progressive loading, this attribute allows the formatted row count returned by getFormattedRowCount() and ultimately displayed in the rowRangeDisplay label to be rounded to a multiple of the specified value. If not explicitly set, this value defaults to the page size for the data.

      For example if the server reports a DSResponse.totalRows of 320 while progressive loading is active (meaning this is not an exact row count), and rowCountDisplayPrecision is set to 150, the formatted rowCount may display 300+

      The precision will round either up or down depending on the row count status.

      • rowCountStatus:"exact" - this setting has no effect
      • rowCountStatus:"minimum" - the reported row count will be rounded down to the previous multiple of this value.
      • rowCountStatus:"maximum" - the reported row count will be rounded up to the next multiple of this value.
      • rowCountStatus:"approximate" - the reported row count will be rounded either up or down to the nearest multiple of this value.
      • rowCountStatus:"range" - the reported minimum row count will be rounded down to the next multiple of this value, and the reported maximum will be rounded up to the next multiple of this value.
      Note the formatted row count will never be rounded down to zero - if the row count is less than the rowCountDisplayPrecision, the exact reported row count value will be displayed. This could typically only occur if rowCountDisplayPrecision is more than the page size for the data.

      This value may be set to 1 to effectively disable the rounding behavior altogether (the row count will not be displayed exactly as reported).

      Note that this is purely a formatting setting for the formatted row count string. It has no impact on the behavior of the grid in terms of the reported data length, totalRows or scrollable area.

      Returns:
      Current rowCountDisplayPrecision value. Default value is null
      See Also:
    • setRowEndEditAction

      public ListGrid setRowEndEditAction(RowEndEditAction rowEndEditAction)
      If the user is editing a record in this listGrid, and attempts to navigate to a field beyond the end of the row, via tab (or shift-tab off the first editable field), this property determines what action to take:
      • "next": start editing the next (or previous) record in the list
      • "same": put focus back into the first editable field of the same record.
      • "done": hide the editor
      • "stop": leave focus in the cell being edited
      • "none": no action
      Parameters:
      rowEndEditAction - New rowEndEditAction value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRowEndEditAction

      public RowEndEditAction getRowEndEditAction()
      If the user is editing a record in this listGrid, and attempts to navigate to a field beyond the end of the row, via tab (or shift-tab off the first editable field), this property determines what action to take:
      • "next": start editing the next (or previous) record in the list
      • "same": put focus back into the first editable field of the same record.
      • "done": hide the editor
      • "stop": leave focus in the cell being edited
      • "none": no action
      Returns:
      Current rowEndEditAction value. Default value is null
      See Also:
    • setRowLocatorField

      public ListGrid setRowLocatorField(String rowLocatorField)
      If locateRowsBy has been set to "cellValue", this property may be used to specify which field's cell value to use.

      If set to an array, cell values from each field will be recorded as part of the locator and used to identify the record.

      Parameters:
      rowLocatorField - New rowLocatorField value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRowLocatorField

      public String getRowLocatorField()
      If locateRowsBy has been set to "cellValue", this property may be used to specify which field's cell value to use.

      If set to an array, cell values from each field will be recorded as part of the locator and used to identify the record.

      Returns:
      Current rowLocatorField value. Default value is null
      See Also:
    • setRowLocatorField

      public ListGrid setRowLocatorField(String... rowLocatorField)
      If locateRowsBy has been set to "cellValue", this property may be used to specify which field's cell value to use.

      If set to an array, cell values from each field will be recorded as part of the locator and used to identify the record.

      Parameters:
      rowLocatorField - New rowLocatorField value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRowLocatorFieldAsStringArray

      public String[] getRowLocatorFieldAsStringArray()
      If locateRowsBy has been set to "cellValue", this property may be used to specify which field's cell value to use.

      If set to an array, cell values from each field will be recorded as part of the locator and used to identify the record.

      Returns:
      Current rowLocatorField value. Default value is null
      See Also:
    • getRowNumberField

      public ListGridField getRowNumberField() throws IllegalStateException
      An automatically generated field that displays the current row number when showRowNumbers is true.

      This component is an AutoChild named "rowNumberField". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current rowNumberField value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setRowNumberStart

      public ListGrid setRowNumberStart(int rowNumberStart)
      The number to start the row-count from - default value is 1.

      Note : This is an advanced setting

      Parameters:
      rowNumberStart - New rowNumberStart value. Default value is 1
      Returns:
      ListGrid instance, for chaining setter calls
    • getRowNumberStart

      public int getRowNumberStart()
      The number to start the row-count from - default value is 1.
      Returns:
      Current rowNumberStart value. Default value is 1
    • setRowNumberStyle

      public ListGrid setRowNumberStyle(String rowNumberStyle)
      The CSS Style name for the rowNumberField.

      Note : This is an advanced setting

      Parameters:
      rowNumberStyle - New rowNumberStyle value. Default value is "specialCol"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRowNumberStyle

      public String getRowNumberStyle()
      The CSS Style name for the rowNumberField.
      Returns:
      Current rowNumberStyle value. Default value is "specialCol"
      See Also:
    • getRowRangeDisplay

      public RowRangeDisplay getRowRangeDisplay() throws IllegalStateException
      RowRangeDisplay autoChild, which may be retrieved by calling getRowRangeDisplay().

      This component is an AutoChild named "rowRangeDisplay". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      This method will create and return a RowRangeDisplay autoChild with RowRangeDisplay.sourceGrid set to this listGrid.

      Note that this method will only create one rowRangeDisplay instance. Calling it repeatedly will return the same canvas. Default value is null

      Throws:
      IllegalStateException - if this widget has not yet been rendered.
      See Also:
    • setRowRangeDisplayStyle

      public ListGrid setRowRangeDisplayStyle(RowRangeDisplayStyle rowRangeDisplayStyle)
      How should the getFormattedRowRange() format the row range and row count for display to the user?
      Parameters:
      rowRangeDisplayStyle - New rowRangeDisplayStyle value. Default value is "full"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getRowRangeDisplayStyle

      public RowRangeDisplayStyle getRowRangeDisplayStyle()
      How should the getFormattedRowRange() format the row range and row count for display to the user?
      Returns:
      Current rowRangeDisplayStyle value. Default value is "full"
      See Also:
    • setRowRangeFormat

      public ListGrid setRowRangeFormat(String rowRangeFormat)
      Dynamic String specifying the format for the visible row range.

      The following variables are available for evaluation within this string:

      • startRow: first visible row in the viewport as a formatted string
      • endRow: last visible row in the viewport as a formatted string
      Parameters:
      rowRangeFormat - New rowRangeFormat value. Default value is "${startRow}-${endRow}"
      Returns:
      ListGrid instance, for chaining setter calls
    • getRowRangeFormat

      public String getRowRangeFormat()
      Dynamic String specifying the format for the visible row range.

      The following variables are available for evaluation within this string:

      • startRow: first visible row in the viewport as a formatted string
      • endRow: last visible row in the viewport as a formatted string
      Returns:
      Current rowRangeFormat value. Default value is "${startRow}-${endRow}"
    • setRowRole

      public ListGrid setRowRole(String rowRole)
      Returns the default WAI ARIA role for rows within this listGrid. See getRowRole()

      Note : This is an advanced setting

      Parameters:
      rowRole - New rowRole value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getRowRole

      public String getRowRole()
      Returns the default WAI ARIA role for rows within this listGrid. See getRowRole()
      Returns:
      Returns the WAI ARIA role for rows within this listGrid.

      If the record has a value for the recordRowRoleProperty, this will be respected.
      Otherwise if rowRole is specified, it will be used.

      If the property is not explicitly set, default implementation will return "separator" for separator rows, "listitem" for data rows if this listGrid has role:"list", or "row" for data rows if this listGrid has ariaRole:"grid". Default value is null

    • setRowSpanEditMode

      public ListGrid setRowSpanEditMode(RowSpanEditMode rowSpanEditMode)
      If allowRowSpanning is enabled, this property may be used to specify editing behavior for cells that span multiple rows.

      Note : This is an advanced setting

      Parameters:
      rowSpanEditMode - New rowSpanEditMode value. Default value is "first"
      Returns:
      ListGrid instance, for chaining setter calls
    • getRowSpanEditMode

      public RowSpanEditMode getRowSpanEditMode()
      If allowRowSpanning is enabled, this property may be used to specify editing behavior for cells that span multiple rows.
      Returns:
      Current rowSpanEditMode value. Default value is "first"
    • setRowSpanSelectionMode

      public ListGrid setRowSpanSelectionMode(RowSpanSelectionMode rowSpanSelectionMode) throws IllegalStateException
      Chooses the selection mode when useRowSpanStyling is enabled. See RowSpanSelectionMode.
      Parameters:
      rowSpanSelectionMode - New rowSpanSelectionMode value. Default value is "forward"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRowSpanSelectionMode

      public RowSpanSelectionMode getRowSpanSelectionMode()
      Chooses the selection mode when useRowSpanStyling is enabled. See RowSpanSelectionMode.
      Returns:
      Current rowSpanSelectionMode value. Default value is "forward"
    • setSaveByCell

      public ListGrid setSaveByCell(Boolean saveByCell)
      Whether edits should be saved whenever the user moves between cells in the current edit row.

      If unset, defaults to this.editByCell.

      To avoid automatic saving entirely, set autoSaveEdits:false.

      Parameters:
      saveByCell - New saveByCell value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSaveByCell

      public Boolean getSaveByCell()
      Whether edits should be saved whenever the user moves between cells in the current edit row.

      If unset, defaults to this.editByCell.

      To avoid automatic saving entirely, set autoSaveEdits:false.

      Returns:
      Current saveByCell value. Default value is null
      See Also:
    • setSaveCriteriaInViewState

      public ListGrid setSaveCriteriaInViewState(Boolean saveCriteriaInViewState)
      Should the current filter-criteria be included along with other details when saving this grid's view-state?

      If true, the current criteria will be saved when calling getViewState() and will be applied to the grid via a filter when calling setViewState().

      Notes

      • If this grid has never actually fetched data, criteria will not be included
      • If this flag is set to false, setViewState() will not modify the grid's filter even if criteria were included when viewState was stored.
      Parameters:
      saveCriteriaInViewState - New saveCriteriaInViewState value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSaveCriteriaInViewState

      public Boolean getSaveCriteriaInViewState()
      Should the current filter-criteria be included along with other details when saving this grid's view-state?

      If true, the current criteria will be saved when calling getViewState() and will be applied to the grid via a filter when calling setViewState().

      Notes

      • If this grid has never actually fetched data, criteria will not be included
      • If this flag is set to false, setViewState() will not modify the grid's filter even if criteria were included when viewState was stored.
      Returns:
      Current saveCriteriaInViewState value. Default value is true
      See Also:
    • setSaveDefaultSearch

      public ListGrid setSaveDefaultSearch(boolean saveDefaultSearch) throws IllegalStateException
      Saves the name of the default search to localStorage, under the key "sc_defaultSearch:" + minimal locator.

      See SavedSearches "Default Searches" for why this is stored separately from the search itself if there is no saved default search, but there is a SavedSearches.defaultField, the first user-specfic search marked default will be used, otherwise the first admn search marked default

      If autoFetchData is enabled, the autoFetch will be postponed as needed until a default search can be looked up and applied. If anything fails in the default search lookup, an autoFetch will still be performed (without any saved search information)

      Parameters:
      saveDefaultSearch - New saveDefaultSearch value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSaveDefaultSearch

      public boolean getSaveDefaultSearch()
      Saves the name of the default search to localStorage, under the key "sc_defaultSearch:" + minimal locator.

      See SavedSearches "Default Searches" for why this is stored separately from the search itself if there is no saved default search, but there is a SavedSearches.defaultField, the first user-specfic search marked default will be used, otherwise the first admn search marked default

      If autoFetchData is enabled, the autoFetch will be postponed as needed until a default search can be looked up and applied. If anything fails in the default search lookup, an autoFetch will still be performed (without any saved search information)

      Returns:
      Current saveDefaultSearch value. Default value is true
    • setSavedSearchAdminRole

      public ListGrid setSavedSearchAdminRole(String savedSearchAdminRole) throws IllegalStateException
      Override of SavedSearches.adminRole for this component.
      Parameters:
      savedSearchAdminRole - New savedSearchAdminRole value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSavedSearchAdminRole

      public String getSavedSearchAdminRole()
      Override of SavedSearches.adminRole for this component.
      Returns:
      Current savedSearchAdminRole value. Default value is null
    • getSavedSearchAdminSeparator

      public ListGridRecord getSavedSearchAdminSeparator() throws IllegalStateException
      Properties for the separator record between locally saved and admin searches.

      This component is an AutoChild named "savedSearchAdminSeparator". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current savedSearchAdminSeparator value. Default value is {isSeparator:true}
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setSavedSearchDS

      public ListGrid setSavedSearchDS(String savedSearchDS) throws IllegalStateException
      Override of SavedSearches.defaultDataSource for this component.
      Parameters:
      savedSearchDS - New savedSearchDS value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSavedSearchDS

      public String getSavedSearchDS()
      Override of SavedSearches.defaultDataSource for this component.
      Returns:
      Current savedSearchDS value. Default value is null
    • setSavedSearchStoredState

      public ListGrid setSavedSearchStoredState(SavedSearchStoredState savedSearchStoredState) throws IllegalStateException
      Set to "criteria" if you want only criteria to be stored for ListGrids and TreeGrids instead of the full viewState of the component.
      Parameters:
      savedSearchStoredState - New savedSearchStoredState value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSavedSearchStoredState

      public SavedSearchStoredState getSavedSearchStoredState()
      Set to "criteria" if you want only criteria to be stored for ListGrids and TreeGrids instead of the full viewState of the component.
      Returns:
      Current savedSearchStoredState value. Default value is null
      See Also:
    • setSavedSearchText

      public ListGrid setSavedSearchText(String savedSearchText) throws IllegalStateException
      Text to show for the saved searches submenu.
      Parameters:
      savedSearchText - New savedSearchText value. Default value is "Saved views"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSavedSearchText

      public String getSavedSearchText()
      Text to show for the saved searches submenu.
      Returns:
      Current savedSearchText value. Default value is "Saved views"
      See Also:
    • setSaveLocally

      public ListGrid setSaveLocally(Boolean saveLocally) throws IllegalStateException
      For grids with a specified dataSource, this property can be set to true to cause the grid directly update its local data set instead of performing an operation against it's configured DataSource.

      When using this mode, data must be provided to the grid via setData(), and must be provided as a RecordList. Setting saveLocally is invalid if either fetchData() is called or if a ResultSet is provided as the data model.

      saveLocally mode includes changes made via inline editing, record removal via canRemoveRecords, as well as programmatic calls to updateData(), addData() and removeData(). This also causes saves to be performed synchronously (unlike normal DataSource operations).

      Note that using this mode also disables the automatic cache synchronization provided by the DataSource system - changes made to this grid are saved only to this grid's data set.

      See also filterLocalData to allow filtering, such as filtering performed by the filterEditor, to also work only with the local data set.

      If saveLocally is unset, and filterLocalData is true, the saveLocally behavior is enabled by default

      Note : This is an advanced setting

      Parameters:
      saveLocally - New saveLocally value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSaveLocally

      public Boolean getSaveLocally()
      For grids with a specified dataSource, this property can be set to true to cause the grid directly update its local data set instead of performing an operation against it's configured DataSource.

      When using this mode, data must be provided to the grid via setData(), and must be provided as a RecordList. Setting saveLocally is invalid if either fetchData() is called or if a ResultSet is provided as the data model.

      saveLocally mode includes changes made via inline editing, record removal via canRemoveRecords, as well as programmatic calls to updateData(), addData() and removeData(). This also causes saves to be performed synchronously (unlike normal DataSource operations).

      Note that using this mode also disables the automatic cache synchronization provided by the DataSource system - changes made to this grid are saved only to this grid's data set.

      See also filterLocalData to allow filtering, such as filtering performed by the filterEditor, to also work only with the local data set.

      If saveLocally is unset, and filterLocalData is true, the saveLocally behavior is enabled by default

      Returns:
      Current saveLocally value. Default value is null
      See Also:
    • setSaveRequestProperties

      public ListGrid setSaveRequestProperties(DSRequest saveRequestProperties)
      For editable grids with a specified dataSource, where saveLocally is false, this attribute may be used to specify standard DSRequest properties to apply to all save operations performed by this grid (whether triggered by user interaction, or explicit saveEdits or saveAllEdits call).

      An example usage would be to customize the prompt displayed while saving is in progress if waitForSave is true.

      Note that for more advanced customization of save operations, DataBoundComponent.addOperation and DataBoundComponent.updateOperation are available to developers, allowing specification of an explicit OperationBinding for the add / update operation performed on save.

      Note : This is an advanced setting

      Parameters:
      saveRequestProperties - New saveRequestProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSaveRequestProperties

      public DSRequest getSaveRequestProperties()
      For editable grids with a specified dataSource, where saveLocally is false, this attribute may be used to specify standard DSRequest properties to apply to all save operations performed by this grid (whether triggered by user interaction, or explicit saveEdits or saveAllEdits call).

      An example usage would be to customize the prompt displayed while saving is in progress if waitForSave is true.

      Note that for more advanced customization of save operations, DataBoundComponent.addOperation and DataBoundComponent.updateOperation are available to developers, allowing specification of an explicit OperationBinding for the add / update operation performed on save.

      Returns:
      Current saveRequestProperties value. Default value is null
      See Also:
    • setScreenReaderCellSeparator

      public ListGrid setScreenReaderCellSeparator(String screenReaderCellSeparator) throws IllegalStateException
      Special cell-separator that may be inserted between cell values when screen-readers are reading the content of a row. Only applies when screen-reader mode is enabled, and for ListGrids with ariaRole:"list".

      When screen reader mode is enabled, for ListGrids with ariaRole set to "list", each row in the grid will be rendered as HTML with role "listItem".
      In this mode, the screenReaderCellSeparator property, (along with screenReaderIncludeFieldTitles and screenReaderRowSeparator), gives developers a way to customize how screen readers read the row's text value in a way that may be helpful for grids with multiple columns.
      Instead of just picking up the value of each cell in the row strung together, readers will instead pick up the field title, the cell value and then the cellSeparator for each cell, and then the rowSeparator to mark the end of the row. Most screenreaders will also read the row index and total row count - something like "3 of 20".

      Note that screen readers vary widely on which punctuation symbols are read aloud, and sometimes it depends on the context of the punctuation. However, the widely-used JAWS, NVDA, and VoiceOver screen readers all read the forward slash '/' as "slash". See Why Don?t Screen Readers Always Read What?s on the Screen? Part 1: Punctuation and Typographic Symbols for a table of findings on which punctuation symbols are read aloud by JAWS, NVDA, and VoiceOver.

      Implementation notes: the generated row HTML makes use of the aria-labelledby property to achieve this - pointing the screenReader to the title button for the column, the cell content, and a special hidden element containing the cellSeparator.
      Note that this aria-labelledby setting is applied in addition to other aria state specified by getRowAriaState().

      To entirely disable this feature, developers may set screenReaderWriteRowLabelledBy to false. In this case other row aria attributes will still be picked up from getRowAriaState(), including the setsize and posinset attributes that tell the screen reader where they currently are in the list.

      See ariaRole for more information on the ARIA attributes generated by ListGrids.

      Note : This is an advanced setting

      Parameters:
      screenReaderCellSeparator - New screenReaderCellSeparator value. Default value is "/"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getScreenReaderCellSeparator

      public String getScreenReaderCellSeparator()
      Special cell-separator that may be inserted between cell values when screen-readers are reading the content of a row. Only applies when screen-reader mode is enabled, and for ListGrids with ariaRole:"list".

      When screen reader mode is enabled, for ListGrids with ariaRole set to "list", each row in the grid will be rendered as HTML with role "listItem".
      In this mode, the screenReaderCellSeparator property, (along with screenReaderIncludeFieldTitles and screenReaderRowSeparator), gives developers a way to customize how screen readers read the row's text value in a way that may be helpful for grids with multiple columns.
      Instead of just picking up the value of each cell in the row strung together, readers will instead pick up the field title, the cell value and then the cellSeparator for each cell, and then the rowSeparator to mark the end of the row. Most screenreaders will also read the row index and total row count - something like "3 of 20".

      Note that screen readers vary widely on which punctuation symbols are read aloud, and sometimes it depends on the context of the punctuation. However, the widely-used JAWS, NVDA, and VoiceOver screen readers all read the forward slash '/' as "slash". See Why Don?t Screen Readers Always Read What?s on the Screen? Part 1: Punctuation and Typographic Symbols for a table of findings on which punctuation symbols are read aloud by JAWS, NVDA, and VoiceOver.

      Implementation notes: the generated row HTML makes use of the aria-labelledby property to achieve this - pointing the screenReader to the title button for the column, the cell content, and a special hidden element containing the cellSeparator.
      Note that this aria-labelledby setting is applied in addition to other aria state specified by getRowAriaState().

      To entirely disable this feature, developers may set screenReaderWriteRowLabelledBy to false. In this case other row aria attributes will still be picked up from getRowAriaState(), including the setsize and posinset attributes that tell the screen reader where they currently are in the list.

      See ariaRole for more information on the ARIA attributes generated by ListGrids.

      Returns:
      Current screenReaderCellSeparator value. Default value is "/"
      See Also:
    • setScreenReaderIncludeFieldTitles

      public ListGrid setScreenReaderIncludeFieldTitles(Boolean screenReaderIncludeFieldTitles) throws IllegalStateException
      Should column titles be read along with cell values when screen-readers are reading the content of a row? Only applies when screen-reader mode is enabled, and for ListGrids with ariaRole:"list".

      Has no effect if showHeader is false.

      See the documentation for screenReaderCellSeparator for implementation details on how the header values, cell separators and row separators are picked up by screenreaders in this mode.

      For more information on the ARIA attributes generated by ListGrids, see ariaRole.

      Note : This is an advanced setting

      Parameters:
      screenReaderIncludeFieldTitles - New screenReaderIncludeFieldTitles value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getScreenReaderIncludeFieldTitles

      public Boolean getScreenReaderIncludeFieldTitles()
      Should column titles be read along with cell values when screen-readers are reading the content of a row? Only applies when screen-reader mode is enabled, and for ListGrids with ariaRole:"list".

      Has no effect if showHeader is false.

      See the documentation for screenReaderCellSeparator for implementation details on how the header values, cell separators and row separators are picked up by screenreaders in this mode.

      For more information on the ARIA attributes generated by ListGrids, see ariaRole.

      Returns:
      Current screenReaderIncludeFieldTitles value. Default value is true
      See Also:
    • setScreenReaderNavigateByCell

      public ListGrid setScreenReaderNavigateByCell(boolean screenReaderNavigateByCell)
      If screen reader mode is enabled, and canSelectCells is true should the user be able to navigate the grid cell-by-cell, highlighting and focusing on individual cells within the selected row via left and right arrow keypresses?

      If canSelectCells is true, this property will have no effect as all navigation is by cell.

      Parameters:
      screenReaderNavigateByCell - New screenReaderNavigateByCell value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getScreenReaderNavigateByCell

      public boolean getScreenReaderNavigateByCell()
      If screen reader mode is enabled, and canSelectCells is true should the user be able to navigate the grid cell-by-cell, highlighting and focusing on individual cells within the selected row via left and right arrow keypresses?

      If canSelectCells is true, this property will have no effect as all navigation is by cell.

      Returns:
      Current screenReaderNavigateByCell value. Default value is false
    • setScreenReaderRowSeparator

      public ListGrid setScreenReaderRowSeparator(String screenReaderRowSeparator) throws IllegalStateException
      Special row-separator that may be inserted at the end of the row value when screen-readers are reading the content of a row. Only applies when screen-reader mode is enabled, and for ListGrids with ariaRole:"list".

      See the documentation for screenReaderCellSeparator for details on how the header values, cell separators and row separators are picked up by screenreaders in this mode.

      For more information on the ARIA attributes generated by ListGrids, see ariaRole.

      Note : This is an advanced setting

      Parameters:
      screenReaderRowSeparator - New screenReaderRowSeparator value. Default value is ","
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getScreenReaderRowSeparator

      public String getScreenReaderRowSeparator()
      Special row-separator that may be inserted at the end of the row value when screen-readers are reading the content of a row. Only applies when screen-reader mode is enabled, and for ListGrids with ariaRole:"list".

      See the documentation for screenReaderCellSeparator for details on how the header values, cell separators and row separators are picked up by screenreaders in this mode.

      For more information on the ARIA attributes generated by ListGrids, see ariaRole.

      Returns:
      Current screenReaderRowSeparator value. Default value is ","
      See Also:
    • setScreenReaderWriteRowLabelledBy

      public ListGrid setScreenReaderWriteRowLabelledBy(Boolean screenReaderWriteRowLabelledBy) throws IllegalStateException
      When screen reader mode is enabled, for grids with ariaRole set to "list", should a custom aria-labelledby attribute be written out in addition to any other row aria properties to ensure the column titles, screenReaderCellSeparator and screenReaderRowSeparator are read out along with cell content when reading rows?

      Setting this property to false will disable the writing out of this labelled-by attribute. See the documentation for screenReaderCellSeparator for more on how the header values, cell separators and row separators are picked up by screenreaders in this mode.

      For more information on the ARIA attributes generated by ListGrids, see ariaRole.

      Note : This is an advanced setting

      Parameters:
      screenReaderWriteRowLabelledBy - New screenReaderWriteRowLabelledBy value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getScreenReaderWriteRowLabelledBy

      public Boolean getScreenReaderWriteRowLabelledBy()
      When screen reader mode is enabled, for grids with ariaRole set to "list", should a custom aria-labelledby attribute be written out in addition to any other row aria properties to ensure the column titles, screenReaderCellSeparator and screenReaderRowSeparator are read out along with cell content when reading rows?

      Setting this property to false will disable the writing out of this labelled-by attribute. See the documentation for screenReaderCellSeparator for more on how the header values, cell separators and row separators are picked up by screenreaders in this mode.

      For more information on the ARIA attributes generated by ListGrids, see ariaRole.

      Returns:
      Current screenReaderWriteRowLabelledBy value. Default value is true
      See Also:
    • setScrollRedrawDelay

      public ListGrid setScrollRedrawDelay(int scrollRedrawDelay)
      While drag scrolling in an incrementally rendered grid, time in milliseconds to wait before redrawing, after the last mouse movement by the user. This delay may be separately customized for mouse-wheel scrolling via scrollWheelRedrawDelay.

      See also GridRenderer.instantScrollTrackRedraw for cases where this delay is skipped.

      NOTE: In touch browsers, touchScrollRedrawDelay is used instead.

      Parameters:
      scrollRedrawDelay - New scrollRedrawDelay value. Default value is 0
      Returns:
      ListGrid instance, for chaining setter calls
    • getScrollRedrawDelay

      public int getScrollRedrawDelay()
      While drag scrolling in an incrementally rendered grid, time in milliseconds to wait before redrawing, after the last mouse movement by the user. This delay may be separately customized for mouse-wheel scrolling via scrollWheelRedrawDelay.

      See also GridRenderer.instantScrollTrackRedraw for cases where this delay is skipped.

      NOTE: In touch browsers, touchScrollRedrawDelay is used instead.

      Returns:
      Current scrollRedrawDelay value. Default value is 0
    • setScrollToCellXPosition

      public ListGrid setScrollToCellXPosition(Alignment scrollToCellXPosition)
      When scrollToCell is called, this is used as defaults if xPosition weren't explicitly passed into the method.
      Parameters:
      scrollToCellXPosition - New scrollToCellXPosition value. Default value is "center"
      Returns:
      ListGrid instance, for chaining setter calls
    • getScrollToCellXPosition

      public Alignment getScrollToCellXPosition()
      When scrollToCell is called, this is used as defaults if xPosition weren't explicitly passed into the method.
      Returns:
      Current scrollToCellXPosition value. Default value is "center"
    • setScrollToCellYPosition

      public ListGrid setScrollToCellYPosition(VerticalAlignment scrollToCellYPosition)
      When scrollToCell is called, this is used as defaults if yPosition weren't explicitly passed into the method.
      Parameters:
      scrollToCellYPosition - New scrollToCellYPosition value. Default value is "center"
      Returns:
      ListGrid instance, for chaining setter calls
    • getScrollToCellYPosition

      public VerticalAlignment getScrollToCellYPosition()
      When scrollToCell is called, this is used as defaults if yPosition weren't explicitly passed into the method.
      Returns:
      Current scrollToCellYPosition value. Default value is "center"
    • setScrollWheelRedrawDelay

      public ListGrid setScrollWheelRedrawDelay(Integer scrollWheelRedrawDelay)
      While scrolling an incrementally rendered grid, using the mouseWheel, time in milliseconds to wait before redrawing, after the last mouseWheel movement by the user. If not specified scrollRedrawDelay will be used as a default for both drag scrolling and mouseWheel scrolling.

      Note that if specified, this value will typically be larger than scrollRedrawDelay. From experimentation, the default setting of 250 is typically enough time for a user to rapidly scroll through a grid (rotating the scroll wheel with repeated flicks), without redrawing between rotations, but this will differ depending on how long the redraw takes. A larger delay may be warranted for grids with large numbers of columns, heavy custom formatting, etc.

      See also GridRenderer.instantScrollTrackRedraw for cases where this delay is skipped.

      Parameters:
      scrollWheelRedrawDelay - New scrollWheelRedrawDelay value. Default value is 0
      Returns:
      ListGrid instance, for chaining setter calls
    • getScrollWheelRedrawDelay

      public Integer getScrollWheelRedrawDelay()
      While scrolling an incrementally rendered grid, using the mouseWheel, time in milliseconds to wait before redrawing, after the last mouseWheel movement by the user. If not specified scrollRedrawDelay will be used as a default for both drag scrolling and mouseWheel scrolling.

      Note that if specified, this value will typically be larger than scrollRedrawDelay. From experimentation, the default setting of 250 is typically enough time for a user to rapidly scroll through a grid (rotating the scroll wheel with repeated flicks), without redrawing between rotations, but this will differ depending on how long the redraw takes. A larger delay may be warranted for grids with large numbers of columns, heavy custom formatting, etc.

      See also GridRenderer.instantScrollTrackRedraw for cases where this delay is skipped.

      Returns:
      Current scrollWheelRedrawDelay value. Default value is 0
    • setSearchForm

      public ListGrid setSearchForm(DynamicForm searchForm)
      When declared, the specified form is automatically used as a search form for this grid, that is, form.getValuesAsCriteria() is called and the criteria returned are additive with any criteria present in the FilterEditor or Filter Window.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      This is similar to the effect of adding a ListGrid.filterEditorSubmit() override that pulls in criteria from the external form, and having the external form call filterByEditor() instead of fetchData(), as shown in the +exampleLink{additiveFilter} example.

      In particular, the grid will automatically filter when the search() or submit() events fire on the form (happens if a SubmitItem is present and is pressed), and will automatically trigger filtering if Enter is pressed in the form, as though searchOnEnter or saveOnEnter had been set.

      If the FilterEditor is enabled and listGrid.filterOnKeypress is set, the grid will automatically watch for SearchForm.criteriaChanged(), and filter whenever that method fires. For the purposes of this behavior, the FilterEditor is considered to be enabled even if it is not currently visible but canShowFilterEditor is true (as otherwise filtering behavior in the form would change when the FilterEditor appears).

      The criteria from the specified searchForm will only be shown and edited in the external form; they will neither be shown nor editable in the FilterEditor, even if the FilterEditor also allows criteria on the same fields. That is, they are treated much like implicitCriteria.

      Note: when using listGrid.searchForm don't add your own logic to call fetchData() or the criteria you specify will appear in the FilterEditor and be editable there, potentially creating user confusion, especially if some of the criteria in your form cannot be displayed and edited in the FilterEditor.

      Parameters:
      searchForm - New searchForm value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getSearchForm

      public DynamicForm getSearchForm()
      When declared, the specified form is automatically used as a search form for this grid, that is, form.getValuesAsCriteria() is called and the criteria returned are additive with any criteria present in the FilterEditor or Filter Window.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      This is similar to the effect of adding a ListGrid.filterEditorSubmit() override that pulls in criteria from the external form, and having the external form call filterByEditor() instead of fetchData(), as shown in the +exampleLink{additiveFilter} example.

      In particular, the grid will automatically filter when the search() or submit() events fire on the form (happens if a SubmitItem is present and is pressed), and will automatically trigger filtering if Enter is pressed in the form, as though searchOnEnter or saveOnEnter had been set.

      If the FilterEditor is enabled and listGrid.filterOnKeypress is set, the grid will automatically watch for SearchForm.criteriaChanged(), and filter whenever that method fires. For the purposes of this behavior, the FilterEditor is considered to be enabled even if it is not currently visible but canShowFilterEditor is true (as otherwise filtering behavior in the form would change when the FilterEditor appears).

      The criteria from the specified searchForm will only be shown and edited in the external form; they will neither be shown nor editable in the FilterEditor, even if the FilterEditor also allows criteria on the same fields. That is, they are treated much like implicitCriteria.

      Note: when using listGrid.searchForm don't add your own logic to call fetchData() or the criteria you specify will appear in the FilterEditor and be editable there, potentially creating user confusion, especially if some of the criteria in your form cannot be displayed and edited in the FilterEditor.

      Returns:
      Current searchForm value. Default value is null
    • setSearchForm

      public ListGrid setSearchForm(ValuesManager searchForm)
      When declared, the specified form is automatically used as a search form for this grid, that is, form.getValuesAsCriteria() is called and the criteria returned are additive with any criteria present in the FilterEditor or Filter Window.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      This is similar to the effect of adding a ListGrid.filterEditorSubmit() override that pulls in criteria from the external form, and having the external form call filterByEditor() instead of fetchData(), as shown in the +exampleLink{additiveFilter} example.

      In particular, the grid will automatically filter when the search() or submit() events fire on the form (happens if a SubmitItem is present and is pressed), and will automatically trigger filtering if Enter is pressed in the form, as though searchOnEnter or saveOnEnter had been set.

      If the FilterEditor is enabled and listGrid.filterOnKeypress is set, the grid will automatically watch for SearchForm.criteriaChanged(), and filter whenever that method fires. For the purposes of this behavior, the FilterEditor is considered to be enabled even if it is not currently visible but canShowFilterEditor is true (as otherwise filtering behavior in the form would change when the FilterEditor appears).

      The criteria from the specified searchForm will only be shown and edited in the external form; they will neither be shown nor editable in the FilterEditor, even if the FilterEditor also allows criteria on the same fields. That is, they are treated much like implicitCriteria.

      Note: when using listGrid.searchForm don't add your own logic to call fetchData() or the criteria you specify will appear in the FilterEditor and be editable there, potentially creating user confusion, especially if some of the criteria in your form cannot be displayed and edited in the FilterEditor.

      Parameters:
      searchForm - New searchForm value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getSearchFormAsValuesManager

      public ValuesManager getSearchFormAsValuesManager()
      When declared, the specified form is automatically used as a search form for this grid, that is, form.getValuesAsCriteria() is called and the criteria returned are additive with any criteria present in the FilterEditor or Filter Window.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      This is similar to the effect of adding a ListGrid.filterEditorSubmit() override that pulls in criteria from the external form, and having the external form call filterByEditor() instead of fetchData(), as shown in the +exampleLink{additiveFilter} example.

      In particular, the grid will automatically filter when the search() or submit() events fire on the form (happens if a SubmitItem is present and is pressed), and will automatically trigger filtering if Enter is pressed in the form, as though searchOnEnter or saveOnEnter had been set.

      If the FilterEditor is enabled and listGrid.filterOnKeypress is set, the grid will automatically watch for SearchForm.criteriaChanged(), and filter whenever that method fires. For the purposes of this behavior, the FilterEditor is considered to be enabled even if it is not currently visible but canShowFilterEditor is true (as otherwise filtering behavior in the form would change when the FilterEditor appears).

      The criteria from the specified searchForm will only be shown and edited in the external form; they will neither be shown nor editable in the FilterEditor, even if the FilterEditor also allows criteria on the same fields. That is, they are treated much like implicitCriteria.

      Note: when using listGrid.searchForm don't add your own logic to call fetchData() or the criteria you specify will appear in the FilterEditor and be editable there, potentially creating user confusion, especially if some of the criteria in your form cannot be displayed and edited in the FilterEditor.

      Returns:
      Current searchForm value. Default value is null
    • setSelectCellTextOnClick

      public ListGrid setSelectCellTextOnClick(Boolean selectCellTextOnClick)
      If this property is set to true, clicking on a cell will natively select the cell's content, ready to be copied to the browser clipboard.

      For control of this behavior at the field level, ListGridField.selectCellTextOnClick may be used. These properties interact as follows:

      listGrid.selectCellTextOnClick value listGridField.selectCellTextOnClick value Behavior
      true unset or true Cell contents will be natively selected on click.
      false Cell contents will not be natively selected on click.
      unset true Cell contents will be natively selected on click.
      unset or false Cell contents will not be natively selected on click.
      false true, false or unset Cell contents will not be natively selected on click.

      This is related to the canDragSelectText attribute which enables native text selection of grid content by standard browser interactions (drag selecting or double-click selecting).

      Note that developers may also be interested in the related formItem properties FormItem.selectOnClick and FormItem.selectOnFocus.

      Parameters:
      selectCellTextOnClick - New selectCellTextOnClick value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getSelectCellTextOnClick

      public Boolean getSelectCellTextOnClick()
      If this property is set to true, clicking on a cell will natively select the cell's content, ready to be copied to the browser clipboard.

      For control of this behavior at the field level, ListGridField.selectCellTextOnClick may be used. These properties interact as follows:

      listGrid.selectCellTextOnClick value listGridField.selectCellTextOnClick value Behavior
      true unset or true Cell contents will be natively selected on click.
      false Cell contents will not be natively selected on click.
      unset true Cell contents will be natively selected on click.
      unset or false Cell contents will not be natively selected on click.
      false true, false or unset Cell contents will not be natively selected on click.

      This is related to the canDragSelectText attribute which enables native text selection of grid content by standard browser interactions (drag selecting or double-click selecting).

      Note that developers may also be interested in the related formItem properties FormItem.selectOnClick and FormItem.selectOnFocus.

      Returns:
      Current selectCellTextOnClick value. Default value is null
    • setSelectedState

      public ListGrid setSelectedState(String selectedState)
      Returns a snapshot of the current selection within this listGrid as a ListGridSelectedState object.
      This object can be passed to setSelectedState() to reset this grid's selection the current state (assuming the same data is present in the grid).


      If this method is called after the component has been drawn/initialized: Reset this grid's selection to match the ListGridSelectedState object passed in.
      Used to restore previous state retrieved from the grid by a call to getSelectedState().
      Parameters:
      selectedState - Object describing the desired selection state of the grid. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSelectedState

      public String getSelectedState()
      Returns a snapshot of the current selection within this listGrid as a ListGridSelectedState object.
      This object can be passed to setSelectedState() to reset this grid's selection the current state (assuming the same data is present in the grid).
      Returns:
      For components bound to a dataSource with records identified by unique primaryKeys, this method returns a snapshot of the component's current selection, as a ListGridSelectedState object.
      This object can be passed to setSelectedState() to reset this grid's current selection state (assuming the same data is present in the grid).
      Selected state is not supported if the component has no dataSource, or the dataSource has no primaryKey fields. Default value is null
      See Also:
    • setSelectHeaderOnSort

      public ListGrid setSelectHeaderOnSort(Boolean selectHeaderOnSort)
      If true, show the field-header for the sorted field (or the first field in a multi-sort grid) in the selected state.
      Parameters:
      selectHeaderOnSort - New selectHeaderOnSort value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getSelectHeaderOnSort

      public Boolean getSelectHeaderOnSort()
      If true, show the field-header for the sorted field (or the first field in a multi-sort grid) in the selected state.
      Returns:
      Current selectHeaderOnSort value. Default value is true
    • setSelectionAppearance

      public ListGrid setSelectionAppearance(SelectionAppearance selectionAppearance)
      How selection of rows should be presented to the user.

      For selectionAppearance:"checkbox" with multiple selection allowed, you would typically use selectionType:"simple" (the default). Because selectionType and selectionAppearance are unrelated, the combination of selectionAppearance:"checkbox" and selectionType:"multiple" results in a grid where multiple selection can only be achieved via shift-click or ctrl-click.

      If using "checkbox" for a ListGrid, see also checkboxField for customization APIs.

      If using "checkbox" for a TreeGrid, an extra icon, TreeGrid.getExtraIcon() is not supported. Additionally only selectionType:"simple" and "single" are supported. You can also toggle the display of a disabled checkbox on a treeGrid, displayed when the node can't be selected, via TreeGrid.showDisabledSelectionCheckbox.

      Note that the default behavior when you enable checkbox selection is to continue to show the selected style. This can be changed by setting showSelectedStyle to false.

      If this method is called after the component has been drawn/initialized: Changes selectionAppearance on the fly.

      Parameters:
      selectionAppearance - new selection appearance. Default value is "rowStyle"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSelectionAppearance

      public SelectionAppearance getSelectionAppearance()
      How selection of rows should be presented to the user.

      For selectionAppearance:"checkbox" with multiple selection allowed, you would typically use selectionType:"simple" (the default). Because selectionType and selectionAppearance are unrelated, the combination of selectionAppearance:"checkbox" and selectionType:"multiple" results in a grid where multiple selection can only be achieved via shift-click or ctrl-click.

      If using "checkbox" for a ListGrid, see also checkboxField for customization APIs.

      If using "checkbox" for a TreeGrid, an extra icon, TreeGrid.getExtraIcon() is not supported. Additionally only selectionType:"simple" and "single" are supported. You can also toggle the display of a disabled checkbox on a treeGrid, displayed when the node can't be selected, via TreeGrid.showDisabledSelectionCheckbox.

      Note that the default behavior when you enable checkbox selection is to continue to show the selected style. This can be changed by setting showSelectedStyle to false.

      Returns:
      Current selectionAppearance value. Default value is "rowStyle"
      See Also:
    • setSelectionProperty

      public ListGrid setSelectionProperty(String selectionProperty) throws IllegalStateException
      If specified, the selection object for this list will use this property to mark records as selected. In other words, if this attribute were set to "isSelected" any records in the listGrid data where "isSelected" is true will show up as selected in the grid. Similarly if records are selected within the grid after the grid has been created, this property will be set to true on the selected records.

      Note : This is an advanced setting

      Parameters:
      selectionProperty - New selectionProperty value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSelectionProperty

      public String getSelectionProperty()
      If specified, the selection object for this list will use this property to mark records as selected. In other words, if this attribute were set to "isSelected" any records in the listGrid data where "isSelected" is true will show up as selected in the grid. Similarly if records are selected within the grid after the grid has been created, this property will be set to true on the selected records.
      Returns:
      Current selectionProperty value. Default value is null
      See Also:
    • setSelectionType

      public ListGrid setSelectionType(SelectionStyle selectionType)
      Defines a listGrid's clickable-selection behavior.

      The default selection appearance is governed by selectionAppearance: if selectionAppearance is "checkbox", this will be "simple", otherwise, this will be "multiple".

      If this method is called after the component has been drawn/initialized: Changes selectionType on the fly.

      Parameters:
      selectionType - New selection style. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSelectionType

      public SelectionStyle getSelectionType()
      Defines a listGrid's clickable-selection behavior.

      The default selection appearance is governed by selectionAppearance: if selectionAppearance is "checkbox", this will be "simple", otherwise, this will be "multiple".

      Returns:
      Current selectionType value. Default value is null
      See Also:
    • setSelectOnEdit

      public ListGrid setSelectOnEdit(Boolean selectOnEdit)
      When the user starts editing a row, should the row also be selected?

      See editSelectionType for how edit-selection behaves.

      Note : This is an advanced setting

      Parameters:
      selectOnEdit - New selectOnEdit value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSelectOnEdit

      public Boolean getSelectOnEdit()
      When the user starts editing a row, should the row also be selected?

      See editSelectionType for how edit-selection behaves.

      Returns:
      Current selectOnEdit value. Default value is true
      See Also:
    • setSelectOnExpandRecord

      public ListGrid setSelectOnExpandRecord(boolean selectOnExpandRecord)
      When set to false, clicking a record's expansion field will not add the record to the current selection.
      Parameters:
      selectOnExpandRecord - New selectOnExpandRecord value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getSelectOnExpandRecord

      public boolean getSelectOnExpandRecord()
      When set to false, clicking a record's expansion field will not add the record to the current selection.
      Returns:
      Current selectOnExpandRecord value. Default value is true
    • setSeparatorRowStyle

      public ListGrid setSeparatorRowStyle(String separatorRowStyle)
      CSS class to apply to rows marked as separators in this grid. The default behavior is to draw a line by rendering an <HR> tag, and the class applied to this attribute may be used to style that tag, for example by applying a border-top setting.
      Parameters:
      separatorRowStyle - New separatorRowStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSeparatorRowStyle

      public String getSeparatorRowStyle()
      CSS class to apply to rows marked as separators in this grid. The default behavior is to draw a line by rendering an <HR> tag, and the class applied to this attribute may be used to style that tag, for example by applying a border-top setting.
      Returns:
      Current separatorRowStyle value. Default value is null
      See Also:
    • setShowAllColumns

      public ListGrid setShowAllColumns(Boolean showAllColumns) throws IllegalStateException
      Whether all columns should be drawn all at once, or only columns visible in the viewport.

      Drawing all columns causes longer initial rendering time, but allows smoother horizontal scrolling. With a very large number of columns, showAllColumns will become too slow.

      Parameters:
      showAllColumns - New showAllColumns value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowAllColumns

      public Boolean getShowAllColumns()
      Whether all columns should be drawn all at once, or only columns visible in the viewport.

      Drawing all columns causes longer initial rendering time, but allows smoother horizontal scrolling. With a very large number of columns, showAllColumns will become too slow.

      Returns:
      Current showAllColumns value. Default value is false
    • setShowAllRecords

      public ListGrid setShowAllRecords(Boolean showAllRecords)
      Whether all records should be drawn all at once, or only records visible in the viewport.

      Drawing all records causes longer initial rendering time, but allows smoother vertical scrolling. With a very large number of records, showAllRecords will become too slow.

      This setting is incompatible with dataFetchMode: "paged" as it requires all records matching the criteria to be fetched from the server at once.

      Parameters:
      showAllRecords - New showAllRecords value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowAllRecords

      public Boolean getShowAllRecords()
      Whether all records should be drawn all at once, or only records visible in the viewport.

      Drawing all records causes longer initial rendering time, but allows smoother vertical scrolling. With a very large number of records, showAllRecords will become too slow.

      This setting is incompatible with dataFetchMode: "paged" as it requires all records matching the criteria to be fetched from the server at once.

      Returns:
      Current showAllRecords value. Default value is false
      See Also:
    • setShowAsynchGroupingPrompt

      public ListGrid setShowAsynchGroupingPrompt(Boolean showAsynchGroupingPrompt) throws IllegalStateException
      If set to false, do not show the asynchGroupingPrompt dialog during asynchronous grouping.
      Parameters:
      showAsynchGroupingPrompt - New showAsynchGroupingPrompt value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowAsynchGroupingPrompt

      public Boolean getShowAsynchGroupingPrompt()
      If set to false, do not show the asynchGroupingPrompt dialog during asynchronous grouping.
      Returns:
      Current showAsynchGroupingPrompt value. Default value is null
    • setShowBackgroundComponents

      public ListGrid setShowBackgroundComponents(Boolean showBackgroundComponents)
      If true this grid will create and show per-row backgroundComponents as detailed here.
      Parameters:
      showBackgroundComponents - New showBackgroundComponents value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowBackgroundComponents

      public Boolean getShowBackgroundComponents()
      If true this grid will create and show per-row backgroundComponents as detailed here.
      Returns:
      Current showBackgroundComponents value. Default value is false
    • setShowCellContextMenus

      public ListGrid setShowCellContextMenus(Boolean showCellContextMenus)
      Whether to show a context menu with standard items for all context clicks on rows in the body.
      Parameters:
      showCellContextMenus - New showCellContextMenus value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowCellContextMenus

      public Boolean getShowCellContextMenus()
      Whether to show a context menu with standard items for all context clicks on rows in the body.
      Returns:
      Current showCellContextMenus value. Default value is false
    • setShowClippedHeaderTitlesOnHover

      public ListGrid setShowClippedHeaderTitlesOnHover(boolean showClippedHeaderTitlesOnHover) throws IllegalStateException
      If true and a header button's title is clipped, then a hover containing the full field title is enabled.

      Note : This is an advanced setting

      Parameters:
      showClippedHeaderTitlesOnHover - New showClippedHeaderTitlesOnHover value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowClippedHeaderTitlesOnHover

      public boolean getShowClippedHeaderTitlesOnHover()
      If true and a header button's title is clipped, then a hover containing the full field title is enabled.
      Returns:
      Current showClippedHeaderTitlesOnHover value. Default value is true
      See Also:
    • setShowClippedValuesOnHover

      public ListGrid setShowClippedValuesOnHover(Boolean showClippedValuesOnHover) throws IllegalStateException
      If true and a cell's value is clipped, then a hover containing the full cell value is enabled.

      Note that standard cell hovers override clipped value hovers. Thus, to enable clipped value hovers, canHover must be unset or null and the corresponding field must have showHover unset or null as well.

      Note : This is an advanced setting

      Parameters:
      showClippedValuesOnHover - New showClippedValuesOnHover value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowClippedValuesOnHover

      public Boolean getShowClippedValuesOnHover()
      If true and a cell's value is clipped, then a hover containing the full cell value is enabled.

      Note that standard cell hovers override clipped value hovers. Thus, to enable clipped value hovers, canHover must be unset or null and the corresponding field must have showHover unset or null as well.

      Returns:
      Current showClippedValuesOnHover value. Default value is null
      See Also:
    • setShowCollapsedGroupSummary

      public ListGrid setShowCollapsedGroupSummary(Boolean showCollapsedGroupSummary)
      Should group summaries be visible when the group is collapsed?

      This property only applies to grouped grids showing group summary rows. When set to true, the group summary row(s) for each group will show up under the group header nodes when the group is collapsed, or at then end of the grouped set of data if the group is expanded.

      This property has no effect if showGroupSummaryInHeader is true.

      If this method is called after the component has been drawn/initialized: Setter for showCollapsedGroupSummary

      Parameters:
      showCollapsedGroupSummary - new showCollapsedGroupSummary value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowCollapsedGroupSummary

      public Boolean getShowCollapsedGroupSummary()
      Should group summaries be visible when the group is collapsed?

      This property only applies to grouped grids showing group summary rows. When set to true, the group summary row(s) for each group will show up under the group header nodes when the group is collapsed, or at then end of the grouped set of data if the group is expanded.

      This property has no effect if showGroupSummaryInHeader is true.

      Returns:
      Current showCollapsedGroupSummary value. Default value is false
      See Also:
    • setShowDetailFields

      public ListGrid setShowDetailFields(Boolean showDetailFields) throws IllegalStateException
      Whether to include fields marked detail:true from this component's DataSource.

      When this property is true, the ListGrid will include all detail fields unless fields have been specifically declared using the fields array.

      Any field which has been included directly in the fields array will be included regardless of the fields detail attribute.

      Detail fields included will initially be hidden but the user may show these fields via the default header context menu (showHeaderContextMenu).

      The field's visibility can also be overridden programatically using the standard showField(), hideField() and ListGridField.showIf() APIs, for example, set showIf:"true" to show a detail field initially.

      Setting this property to false will completely exclude all detail fields from the list grid's fields array, such that they cannot be shown by the user or programmatically.

      Specified by:
      setShowDetailFields in interface DataBoundComponent
      Parameters:
      showDetailFields - New showDetailFields value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowDetailFields

      public Boolean getShowDetailFields()
      Whether to include fields marked detail:true from this component's DataSource.

      When this property is true, the ListGrid will include all detail fields unless fields have been specifically declared using the fields array.

      Any field which has been included directly in the fields array will be included regardless of the fields detail attribute.

      Detail fields included will initially be hidden but the user may show these fields via the default header context menu (showHeaderContextMenu).

      The field's visibility can also be overridden programatically using the standard showField(), hideField() and ListGridField.showIf() APIs, for example, set showIf:"true" to show a detail field initially.

      Setting this property to false will completely exclude all detail fields from the list grid's fields array, such that they cannot be shown by the user or programmatically.

      Specified by:
      getShowDetailFields in interface DataBoundComponent
      Returns:
      Current showDetailFields value. Default value is true
      See Also:
    • setShowDropLines

      public ListGrid setShowDropLines(Boolean showDropLines)
      Controls whether to show a drop-indicator during a drag and drop operation.
      Overrides:
      setShowDropLines in class Layout
      Parameters:
      showDropLines - New showDropLines value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowDropLines

      public Boolean getShowDropLines()
      Controls whether to show a drop-indicator during a drag and drop operation.
      Overrides:
      getShowDropLines in class Layout
      Returns:
      Current showDropLines value. Default value is true
      See Also:
    • setShowEllipsisWhenClipped

      public ListGrid setShowEllipsisWhenClipped(boolean showEllipsisWhenClipped)
      Should ellipses be displayed when cell content is clipped? May be overridden at the field level via ListGridField.showEllipsisWhenClipped
      Parameters:
      showEllipsisWhenClipped - New showEllipsisWhenClipped value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowEllipsisWhenClipped

      public boolean getShowEllipsisWhenClipped()
      Should ellipses be displayed when cell content is clipped? May be overridden at the field level via ListGridField.showEllipsisWhenClipped
      Returns:
      Current showEllipsisWhenClipped value. Default value is true
    • setShowEmptyMessage

      public ListGrid setShowEmptyMessage(Boolean showEmptyMessage)
      Indicates whether the text of the emptyMessage property should be displayed if no data is available.
      Parameters:
      showEmptyMessage - New showEmptyMessage value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowEmptyMessage

      public Boolean getShowEmptyMessage()
      Indicates whether the text of the emptyMessage property should be displayed if no data is available.
      Returns:
      Current showEmptyMessage value. Default value is true
      See Also:
    • setShowErrorIcons

      public ListGrid setShowErrorIcons(boolean showErrorIcons)
      If this grid is editable, and an edit has caused validation failure for some cell, should we show an icon to indicate validation failure?
      Parameters:
      showErrorIcons - New showErrorIcons value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowErrorIcons

      public boolean getShowErrorIcons()
      If this grid is editable, and an edit has caused validation failure for some cell, should we show an icon to indicate validation failure?
      Returns:
      Current showErrorIcons value. Default value is true
    • getShowExpansionEditorSaveButton

      public Boolean getShowExpansionEditorSaveButton() throws IllegalStateException
      When ExpansionMode is editor, should a Save button be shown below the the expanded editor?

      Note that if an expanded-row containing an editor is collapsed while changes are outstanding, changes will be either be automatically updated to the grid, or will first show a confirmation dialog, according to the value of expansionEditorShowSaveDialog.

      Note : This method should be called only after the widget has been rendered.

      Returns:
      Current showExpansionEditorSaveButton value. Default value is true
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setShowFilterEditor

      public ListGrid setShowFilterEditor(boolean showFilterEditor)
      Should this listGrid display a filter row. If true, this ListGrid will be drawn with a single editable row, (separate from the body) with a filter button.

      Values entered into this row are used as filter criteria to filter this List's data. The filterByCell and filterOnKeypress attributes allow developers to configure whether filtering occurs automatically on change or requires an enter-keypress or filter button click.
      autoFetchTextMatchStyle determines the textMatchStyle for the request passed to fetchData().

      The default search operator for an item in the filterEditor can be set via ListGridField.filterOperator. When field.filterOperator has been set calls to retrieve the criteria from the grid return AdvancedCriteria. See also allowFilterOperators for a UI that allows end users to change the search operator on the fly

      Note that if filterData() or fetchData() is called directly while the filter editor is showing, the filter editor values will be updated to reflect the new set of criteria. If you wish to retain the user entered filter criteria and modify a subset of field values programmatically, this can be achieved by copying the existing set of criteria and adding other changes - something like this:

      
          Criteria newCriteria = myListGrid.getFilterEditorCriteria();
          newCriteria = DataSource.combineCriteria(newCriteria,
             new Criteria("field1", "new value1")
          );
          myListGrid.setCriteria(newCriteria);
        
      In this example code we're using getFilterEditorCriteria() rather than getCriteria() - this ensures that if the user has typed a new value into the filter editor, but not yet clicked the filter button, we pick up the value the user entered. This sample code uses DataSource.combineCriteria() to combine the existing filterEditorCriteria with some new custom criteria. This technique is applicable to both simple and advanced criteria.

      If you call filterData() and pass in criteria for dataSource fields that are not present in the ListGrid, these criteria will continue to be applied along with the user-visible criteria.

      filterEditor and advanced criteria: If a developer calls filterData() on a ListGrid and passes in AdvancedCriteria, expected behavior of the filter editor becomes ambiguous, since AdvancedCriteria has far more complex filter expression support than the ordinary filterEditor can represent.

      Default behavior for AdvancedCriteria will combine the AdvancedCriteria with the values in the filter editor as follows:

      • If the top level criteria has operator of type "and":
        Each field in the top level criteria array for which a 'canFilter' true field is shown in the listGrid will show up if the specified operator matches the default filter behavior (based on the autoFetchTextMatchStyle).
        If the user enters values in the filter editor, these will be combined with the existing AdvancedCriteria by either replacing or adding field level criteria at the top level.
      • If the top level criteria is a single field-criteria:
        If the field shows up in the listGrid and is canFilter:true, it will be displayed to the user (if the operator matches the default filter behavior for the field).
        If the user enters new filter criteria in the filterEditor, they will be combined with this existing criterion via a top level "and" operator, or if the user modifies the field for which the criterion already existed, it will be replaced.
      • Otherwise, if there are multiple top level criteria combined with an "or" operator, these will not be shown in the filter editor. Any filter parameters the user enters will be added to the existing criteria via an additional top level "and" operator, meaning the user will essentially filter a subset of the existing criteria


      If this method is called after the component has been drawn/initialized: Setter for the showFilterEditor property. Allows the filter editor to be shown or hidden at runtime.

      By default, hiding the filterEditor will also clear any user-criteria it specified and refetch the data. To prevent this behavior, you can set clearCriteriaOnFilterEditorHide to false.

      Parameters:
      showFilterEditor - true if the filter editor should be shown, false if it should be hidden. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowFilterEditor

      public boolean getShowFilterEditor()
      Should this listGrid display a filter row. If true, this ListGrid will be drawn with a single editable row, (separate from the body) with a filter button.

      Values entered into this row are used as filter criteria to filter this List's data. The filterByCell and filterOnKeypress attributes allow developers to configure whether filtering occurs automatically on change or requires an enter-keypress or filter button click.
      autoFetchTextMatchStyle determines the textMatchStyle for the request passed to fetchData().

      The default search operator for an item in the filterEditor can be set via ListGridField.filterOperator. When field.filterOperator has been set calls to retrieve the criteria from the grid return AdvancedCriteria. See also allowFilterOperators for a UI that allows end users to change the search operator on the fly

      Note that if filterData() or fetchData() is called directly while the filter editor is showing, the filter editor values will be updated to reflect the new set of criteria. If you wish to retain the user entered filter criteria and modify a subset of field values programmatically, this can be achieved by copying the existing set of criteria and adding other changes - something like this:

      
          Criteria newCriteria = myListGrid.getFilterEditorCriteria();
          newCriteria = DataSource.combineCriteria(newCriteria,
             new Criteria("field1", "new value1")
          );
          myListGrid.setCriteria(newCriteria);
        
      In this example code we're using getFilterEditorCriteria() rather than getCriteria() - this ensures that if the user has typed a new value into the filter editor, but not yet clicked the filter button, we pick up the value the user entered. This sample code uses DataSource.combineCriteria() to combine the existing filterEditorCriteria with some new custom criteria. This technique is applicable to both simple and advanced criteria.

      If you call filterData() and pass in criteria for dataSource fields that are not present in the ListGrid, these criteria will continue to be applied along with the user-visible criteria.

      filterEditor and advanced criteria: If a developer calls filterData() on a ListGrid and passes in AdvancedCriteria, expected behavior of the filter editor becomes ambiguous, since AdvancedCriteria has far more complex filter expression support than the ordinary filterEditor can represent.

      Default behavior for AdvancedCriteria will combine the AdvancedCriteria with the values in the filter editor as follows:

      • If the top level criteria has operator of type "and":
        Each field in the top level criteria array for which a 'canFilter' true field is shown in the listGrid will show up if the specified operator matches the default filter behavior (based on the autoFetchTextMatchStyle).
        If the user enters values in the filter editor, these will be combined with the existing AdvancedCriteria by either replacing or adding field level criteria at the top level.
      • If the top level criteria is a single field-criteria:
        If the field shows up in the listGrid and is canFilter:true, it will be displayed to the user (if the operator matches the default filter behavior for the field).
        If the user enters new filter criteria in the filterEditor, they will be combined with this existing criterion via a top level "and" operator, or if the user modifies the field for which the criterion already existed, it will be replaced.
      • Otherwise, if there are multiple top level criteria combined with an "or" operator, these will not be shown in the filter editor. Any filter parameters the user enters will be added to the existing criteria via an additional top level "and" operator, meaning the user will essentially filter a subset of the existing criteria
      Returns:
      Current showFilterEditor value. Default value is false
      See Also:
    • setShowFilterEditorHovers

      public ListGrid setShowFilterEditorHovers(Boolean showFilterEditorHovers) throws IllegalStateException
      When set to false, no hover is shown for the filter editor fields. Otherwise, a hover shows the current field's criteria description along with the filterWindowCriteria description if configured.

      Hovers can also be disabled for individual fields using ListGridField.showFilterEditorHovers.

      The descriptive text for criteria is formatted by DataSource.getAdvancedCriteriaDescription().

      Parameters:
      showFilterEditorHovers - New showFilterEditorHovers value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowFilterEditorHovers

      public Boolean getShowFilterEditorHovers()
      When set to false, no hover is shown for the filter editor fields. Otherwise, a hover shows the current field's criteria description along with the filterWindowCriteria description if configured.

      Hovers can also be disabled for individual fields using ListGridField.showFilterEditorHovers.

      The descriptive text for criteria is formatted by DataSource.getAdvancedCriteriaDescription().

      Returns:
      Current showFilterEditorHovers value. Default value is null
      See Also:
    • setShowFilterEditorTitle

      public ListGrid setShowFilterEditorTitle(String showFilterEditorTitle)
      When canShowFilterEditor is true, this is the title for the filterEditor show/hide menu-item, in the headerContextmenu, when the filterEditor is hidden.

      hideFilterEditorTitle affects the same menu-item when the filterEditor is visible.

      Parameters:
      showFilterEditorTitle - New showFilterEditorTitle value. Default value is "Show Filter Row"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowFilterEditorTitle

      public String getShowFilterEditorTitle()
      When canShowFilterEditor is true, this is the title for the filterEditor show/hide menu-item, in the headerContextmenu, when the filterEditor is hidden.

      hideFilterEditorTitle affects the same menu-item when the filterEditor is visible.

      Returns:
      Current showFilterEditorTitle value. Default value is "Show Filter Row"
      See Also:
    • setShowFilterWindowCriteriaIndicator

      public ListGrid setShowFilterWindowCriteriaIndicator(Boolean showFilterWindowCriteriaIndicator) throws IllegalStateException
      Should an indicator be shown to indicate that filterWindowCriteria is configured? The indicator is a small triangle shown in the top-right of the grid header or filter.
      Parameters:
      showFilterWindowCriteriaIndicator - New showFilterWindowCriteriaIndicator value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowFilterWindowCriteriaIndicator

      public Boolean getShowFilterWindowCriteriaIndicator()
      Should an indicator be shown to indicate that filterWindowCriteria is configured? The indicator is a small triangle shown in the top-right of the grid header or filter.
      Returns:
      Current showFilterWindowCriteriaIndicator value. Default value is true
    • setShowGridSummary

      public ListGrid setShowGridSummary(Boolean showGridSummary)
      Should this ListGrid show a summary row beneath the last record of the grid. This summary row will contain per-field summary information. See ListGridField.showGridSummary and getGridSummaryFunction() for details on how the summary value to be displayed for each column will be calculated.

      Note that the summaryRow autoChild will be created to actually display the summary row.

      If this method is called after the component has been drawn/initialized: Setter for the showGridSummary attribute

      Parameters:
      showGridSummary - new value for this.showGridSummary. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowGridSummary

      public Boolean getShowGridSummary()
      Should this ListGrid show a summary row beneath the last record of the grid. This summary row will contain per-field summary information. See ListGridField.showGridSummary and getGridSummaryFunction() for details on how the summary value to be displayed for each column will be calculated.

      Note that the summaryRow autoChild will be created to actually display the summary row.

      Returns:
      Current showGridSummary value. Default value is false
    • setShowGroupSummary

      public ListGrid setShowGroupSummary(Boolean showGroupSummary)
      If this listGrid supports grouping, setting this property will cause the grid to render an extra row at the end of each group when grouped, containing summary information for the fields. Summary information will be calculated by the ListGridField.getGroupSummary() method if specified, otherwise via the specified ListGridField.summaryFunction.

      If this method is called after the component has been drawn/initialized: Setter for the showGroupSummary attribute
      Parameters:
      showGroupSummary - new value for this.showGroupSummary. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowGroupSummary

      public Boolean getShowGroupSummary()
      If this listGrid supports grouping, setting this property will cause the grid to render an extra row at the end of each group when grouped, containing summary information for the fields. Summary information will be calculated by the ListGridField.getGroupSummary() method if specified, otherwise via the specified ListGridField.summaryFunction.
      Returns:
      Current showGroupSummary value. Default value is false
      See Also:
    • setShowGroupSummaryInHeader

      public ListGrid setShowGroupSummaryInHeader(Boolean showGroupSummaryInHeader)
      If this grid is grouped, and showGroupSummary is true, setting this property causes field summary values for each group to be displayed directly in the group header node, rather than showing up at the bottom of each expanded group.

      Note that this means the group header node will be showing multiple field values rather than the default display of a single cell spanning all columns containing the group title. Developers may specify an explicit groupTitleField, or rely on the automatically generated groupTitleColumn to have group titles be visible as well as the summary values.

      Also note that multi-line group summaries are not supported when showing the group summary in the group header. If multiple field summary functions are defined for some field only the first will be displayed when this property is set to true.

      If this method is called after the component has been drawn/initialized: Setter for showGroupSummaryInHeader

      Parameters:
      showGroupSummaryInHeader - new showGroupSummaryInHeader state. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowGroupSummaryInHeader

      public Boolean getShowGroupSummaryInHeader()
      If this grid is grouped, and showGroupSummary is true, setting this property causes field summary values for each group to be displayed directly in the group header node, rather than showing up at the bottom of each expanded group.

      Note that this means the group header node will be showing multiple field values rather than the default display of a single cell spanning all columns containing the group title. Developers may specify an explicit groupTitleField, or rely on the automatically generated groupTitleColumn to have group titles be visible as well as the summary values.

      Also note that multi-line group summaries are not supported when showing the group summary in the group header. If multiple field summary functions are defined for some field only the first will be displayed when this property is set to true.

      Returns:
      Current showGroupSummaryInHeader value. Default value is false
      See Also:
    • setShowGroupTitleColumn

      public ListGrid setShowGroupTitleColumn(Boolean showGroupTitleColumn) throws IllegalStateException
      If this grid is grouped and showGroupSummaryInHeader is true, instead of group header nodes showing up with a single cell value spanning the full set of columns, summaries for each field will show up in the appropriate columns of the header node.

      In this case there are 2 options for where the group title will show up. Developers may specify an existing field to put the title values into via groupTitleField. If no groupTitleField is specified, this property may be set to true which causes a groupTitleColumn to be automatically generated. Each group header will show the group title in this column (records within the group will not show a value for this column). The column appears in the leftmost position within the grid (unless showRowNumbers is true, in which case this column shows up in the second-leftmost position), and by default will auto-fit to its data.

      To customize this field, developers may modify groupTitleColumnProperties

      Parameters:
      showGroupTitleColumn - New showGroupTitleColumn value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowGroupTitleColumn

      public Boolean getShowGroupTitleColumn()
      If this grid is grouped and showGroupSummaryInHeader is true, instead of group header nodes showing up with a single cell value spanning the full set of columns, summaries for each field will show up in the appropriate columns of the header node.

      In this case there are 2 options for where the group title will show up. Developers may specify an existing field to put the title values into via groupTitleField. If no groupTitleField is specified, this property may be set to true which causes a groupTitleColumn to be automatically generated. Each group header will show the group title in this column (records within the group will not show a value for this column). The column appears in the leftmost position within the grid (unless showRowNumbers is true, in which case this column shows up in the second-leftmost position), and by default will auto-fit to its data.

      To customize this field, developers may modify groupTitleColumnProperties

      Returns:
      Current showGroupTitleColumn value. Default value is true
    • setShowGroupTitleInFrozenBody

      public ListGrid setShowGroupTitleInFrozenBody(boolean showGroupTitleInFrozenBody)
      If this is grouped and has frozen fields, should the group title show in the frozen or unfrozen body?

      Setting this property to false will cause the group title to show in the unfrozen body in this case, meaning it will appear to the right of the frozen fields, and scroll horizontally as the user scrolls the unfrozen fields. This can be useful for grids where there isn't enough available space to show the group title text in the frozen body.

      Note that if groupTitleField is explicitly set, or showGroupSummaryInHeader is true, this property has no effect. In this case rather than the group title showing in a single cell spanning multiple other fields, it will be rendered into a specific column.

      Note : This is an advanced setting

      Parameters:
      showGroupTitleInFrozenBody - New showGroupTitleInFrozenBody value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowGroupTitleInFrozenBody

      public boolean getShowGroupTitleInFrozenBody()
      If this is grouped and has frozen fields, should the group title show in the frozen or unfrozen body?

      Setting this property to false will cause the group title to show in the unfrozen body in this case, meaning it will appear to the right of the frozen fields, and scroll horizontally as the user scrolls the unfrozen fields. This can be useful for grids where there isn't enough available space to show the group title text in the frozen body.

      Note that if groupTitleField is explicitly set, or showGroupSummaryInHeader is true, this property has no effect. In this case rather than the group title showing in a single cell spanning multiple other fields, it will be rendered into a specific column.

      Returns:
      Current showGroupTitleInFrozenBody value. Default value is true
    • setShowHeader

      public ListGrid setShowHeader(Boolean showHeader)
      Should we show the header for this ListGrid?

      If this method is called after the component has been drawn/initialized: Show or hide the ListGrid header.
      Parameters:
      showHeader - true to show the header, false to hide it. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowHeader

      public Boolean getShowHeader()
      Should we show the header for this ListGrid?
      Returns:
      Current showHeader value. Default value is true
      See Also:
    • setShowHeaderContextMenu

      public ListGrid setShowHeaderContextMenu(Boolean showHeaderContextMenu) throws IllegalStateException
      Whether to show a context menu on the header with standard items for showing and hiding fields. Not supported for CubeGrid.
      Parameters:
      showHeaderContextMenu - New showHeaderContextMenu value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowHeaderContextMenu

      public Boolean getShowHeaderContextMenu()
      Whether to show a context menu on the header with standard items for showing and hiding fields. Not supported for CubeGrid.
      Returns:
      Current showHeaderContextMenu value. Default value is true
      See Also:
    • setShowHeaderMenuButton

      public ListGrid setShowHeaderMenuButton(Boolean showHeaderMenuButton) throws IllegalStateException
      If set to true and showHeaderContextMenu is true, the headerMenuButton will be displayed when the user rolls over the header buttons in this grid. Not supported for CubeGrid.
      Parameters:
      showHeaderMenuButton - New showHeaderMenuButton value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowHeaderMenuButton

      public Boolean getShowHeaderMenuButton()
      If set to true and showHeaderContextMenu is true, the headerMenuButton will be displayed when the user rolls over the header buttons in this grid. Not supported for CubeGrid.
      Returns:
      Current showHeaderMenuButton value. Default value is true
    • setShowHeaderPartialSelection

      public ListGrid setShowHeaderPartialSelection(Boolean showHeaderPartialSelection)
      Should partial selection of all records be shown in header with a special icon? The partial icon will show in the header when canSelectAll is enabled and at least one record is selected but all records are not selected. To only show all selected and none selected states, set this attribute to false.
      Parameters:
      showHeaderPartialSelection - New showHeaderPartialSelection value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowHeaderPartialSelection

      public Boolean getShowHeaderPartialSelection()
      Should partial selection of all records be shown in header with a special icon? The partial icon will show in the header when canSelectAll is enabled and at least one record is selected but all records are not selected. To only show all selected and none selected states, set this attribute to false.
      Returns:
      Current showHeaderPartialSelection value. Default value is null
      See Also:
    • setShowHeaderShadow

      public ListGrid setShowHeaderShadow(Boolean showHeaderShadow)
      Should the header show a drop-shadow? Shadow will be applied to the header, or for a grid with frozen columns, the header layout.

      Header shadow will only be displayed if css shadows are being used.

      Parameters:
      showHeaderShadow - New showHeaderShadow value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowHeaderShadow

      public Boolean getShowHeaderShadow()
      Should the header show a drop-shadow? Shadow will be applied to the header, or for a grid with frozen columns, the header layout.

      Header shadow will only be displayed if css shadows are being used.

      Returns:
      Current showHeaderShadow value. Default value is false
      See Also:
    • setShowHeaderSpanContextMenu

      public ListGrid setShowHeaderSpanContextMenu(Boolean showHeaderSpanContextMenu) throws IllegalStateException
      Whether to show a context menu on the header span with standard items for showing and hiding fields. Not supported for CubeGrid.
      Parameters:
      showHeaderSpanContextMenu - New showHeaderSpanContextMenu value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowHeaderSpanContextMenu

      public Boolean getShowHeaderSpanContextMenu()
      Whether to show a context menu on the header span with standard items for showing and hiding fields. Not supported for CubeGrid.
      Returns:
      Current showHeaderSpanContextMenu value. Default value is true
      See Also:
    • setShowHeaderSpanTitlesInFormulaBuilder

      public ListGrid setShowHeaderSpanTitlesInFormulaBuilder(Boolean showHeaderSpanTitlesInFormulaBuilder)
      If this grid has specified headerSpans, should field titles be prefixed with the titles of the headerSpans in which they are contained when using the FormulaBuilder or SummaryBuilder.
      Parameters:
      showHeaderSpanTitlesInFormulaBuilder - New showHeaderSpanTitlesInFormulaBuilder value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowHeaderSpanTitlesInFormulaBuilder

      public Boolean getShowHeaderSpanTitlesInFormulaBuilder()
      If this grid has specified headerSpans, should field titles be prefixed with the titles of the headerSpans in which they are contained when using the FormulaBuilder or SummaryBuilder.
      Returns:
      Current showHeaderSpanTitlesInFormulaBuilder value. Default value is true
      See Also:
    • setShowHeaderSpanTitlesInHiliteEditor

      public ListGrid setShowHeaderSpanTitlesInHiliteEditor(Boolean showHeaderSpanTitlesInHiliteEditor)
      If this grid has specified headerSpans, should field titles be prefixed with the titles of the headerSpans in which they are contained when using the hilite editor.
      Parameters:
      showHeaderSpanTitlesInHiliteEditor - New showHeaderSpanTitlesInHiliteEditor value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowHeaderSpanTitlesInHiliteEditor

      public Boolean getShowHeaderSpanTitlesInHiliteEditor()
      If this grid has specified headerSpans, should field titles be prefixed with the titles of the headerSpans in which they are contained when using the hilite editor.
      Returns:
      Current showHeaderSpanTitlesInHiliteEditor value. Default value is true
      See Also:
    • setShowHeaderSpanTitlesInSortEditor

      public ListGrid setShowHeaderSpanTitlesInSortEditor(Boolean showHeaderSpanTitlesInSortEditor)
      If this grid has specified headerSpans, should field titles be prefixed with the titles of the headerSpans in which they are contained when using the multi-sort editor.
      Parameters:
      showHeaderSpanTitlesInSortEditor - New showHeaderSpanTitlesInSortEditor value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowHeaderSpanTitlesInSortEditor

      public Boolean getShowHeaderSpanTitlesInSortEditor()
      If this grid has specified headerSpans, should field titles be prefixed with the titles of the headerSpans in which they are contained when using the multi-sort editor.
      Returns:
      Current showHeaderSpanTitlesInSortEditor value. Default value is true
      See Also:
    • setShowHilitesInGroupSummary

      public ListGrid setShowHilitesInGroupSummary(boolean showHilitesInGroupSummary)
      Determines whether hiliting for any field in this grid is shown in a group summary. This setting affects all fields of the grid.

      To suppress hilites for a specific field see ListGridField.showHilitesInGroupSummary.

      Hiliting in summary fields (columns) can be enabled by setting includeHiliteInSummaryField to true.

      Parameters:
      showHilitesInGroupSummary - New showHilitesInGroupSummary value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowHilitesInGroupSummary

      public boolean getShowHilitesInGroupSummary()
      Determines whether hiliting for any field in this grid is shown in a group summary. This setting affects all fields of the grid.

      To suppress hilites for a specific field see ListGridField.showHilitesInGroupSummary.

      Hiliting in summary fields (columns) can be enabled by setting includeHiliteInSummaryField to true.

      Returns:
      Current showHilitesInGroupSummary value. Default value is true
    • setShowHover

      public ListGrid setShowHover(Boolean showHover)
      If true, and canHover is also true, shows popup hover text next to the mouse when the user hovers over a cell. The content of the hover is determined by cellHoverHTML().

      This is the default setting for the grid and can be overridden on a per-field basis.

      Overrides:
      setShowHover in class Canvas
      Parameters:
      showHover - New showHover value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowHover

      public Boolean getShowHover()
      If true, and canHover is also true, shows popup hover text next to the mouse when the user hovers over a cell. The content of the hover is determined by cellHoverHTML().

      This is the default setting for the grid and can be overridden on a per-field basis.

      Overrides:
      getShowHover in class Canvas
      Returns:
      Current showHover value. Default value is true
      See Also:
      • getCanHover()
      • com.smartgwt.client.widgets.grid.ListGrid#cellHoverHTML
    • setShowHoverComponents

      public ListGrid setShowHoverComponents(Boolean showHoverComponents)
      When set to true and canHover is also true, shows a widget hovering at the mouse point.

      A number of builtin modes are provided - see hoverMode. Note, if a hoverMode is set but showHoverComponents is left null, it will default to true.

      Also supported at the field-level.

      Overrides:
      setShowHoverComponents in class Canvas
      Parameters:
      showHoverComponents - New showHoverComponents value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowHoverComponents

      public Boolean getShowHoverComponents()
      When set to true and canHover is also true, shows a widget hovering at the mouse point.

      A number of builtin modes are provided - see hoverMode. Note, if a hoverMode is set but showHoverComponents is left null, it will default to true.

      Also supported at the field-level.

      Overrides:
      getShowHoverComponents in class Canvas
      Returns:
      Current showHoverComponents value. Default value is null
    • setShowHoverOnDisabledCells

      public ListGrid setShowHoverOnDisabledCells(boolean showHoverOnDisabledCells)
      If showHover is true, should cell hover HTML be displayed on disabled cells?
      Parameters:
      showHoverOnDisabledCells - New showHoverOnDisabledCells value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowHoverOnDisabledCells

      public boolean getShowHoverOnDisabledCells()
      If showHover is true, should cell hover HTML be displayed on disabled cells?
      Returns:
      Current showHoverOnDisabledCells value. Default value is false
    • setShowInitialDragHandles

      public ListGrid setShowInitialDragHandles(Boolean showInitialDragHandles) throws IllegalStateException
      When set to true, shows the drag handle field on initial draw.

      Note : This is an advanced setting

      Parameters:
      showInitialDragHandles - New showInitialDragHandles value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowInitialDragHandles

      public Boolean getShowInitialDragHandles()
      When set to true, shows the drag handle field on initial draw.
      Returns:
      Current showInitialDragHandles value. Default value is null
      See Also:
    • setShowNewRecordRow

      public ListGrid setShowNewRecordRow(Boolean showNewRecordRow)
      If this is an editable ListGrid, setting this property to true causes an extra row with the newRecordRowMessage to be displayed below the last record.

      Clicking this row will start editing a new record at the end of the data set, as if startEditingNew() had been called.

      Note that for databound grids, the new record row will be suppressed if the grid has not fetched data, unless saveLocally has been set.

      Parameters:
      showNewRecordRow - New showNewRecordRow value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowNewRecordRow

      public Boolean getShowNewRecordRow()
      If this is an editable ListGrid, setting this property to true causes an extra row with the newRecordRowMessage to be displayed below the last record.

      Clicking this row will start editing a new record at the end of the data set, as if startEditingNew() had been called.

      Note that for databound grids, the new record row will be suppressed if the grid has not fetched data, unless saveLocally has been set.

      Returns:
      Current showNewRecordRow value. Default value is null
    • setShowPartialSelection

      public ListGrid setShowPartialSelection(Boolean showPartialSelection)
      Should partially selected parents (in a Tree data set) be shown with special icon? This has an impact in grouped grids where canSelectGroups is true. The partial icon will show up for the group header node when a group is partially selected.
      Parameters:
      showPartialSelection - New showPartialSelection value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowPartialSelection

      public Boolean getShowPartialSelection()
      Should partially selected parents (in a Tree data set) be shown with special icon? This has an impact in grouped grids where canSelectGroups is true. The partial icon will show up for the group header node when a group is partially selected.
      Returns:
      Current showPartialSelection value. Default value is false
      See Also:
    • setShowRecordComponents

      public ListGrid setShowRecordComponents(Boolean showRecordComponents)
      When enabled, createRecordComponent() will be called when saved rows are being rendered, and any returned component will be displayed embedded within the row or cell.

      recordComponents are not created for newly added rows which have not yet been saved. See the Handling Unsaved Records overview for more information.

      Depending on the showRecordComponentsByCell setting, createRecordComponent() will be called either once per row, or once for every cell.

      Depending on recordComponentPosition, components can either be placed underneath normal record or cell content ("expand" setting) or placed so that they overlap normal cell content ("within" setting). For the "within" setting, the default is to fill the row or cell, but the component can specify percent size or even use snapTo-positioning to place itself within the row or cell.

      The "expand" setting is incompatible with frozen columns unless all recordComponents are the same height and they are present in every row, in which case the fixed height of all recordComponents can be set via recordComponentHeight to re-enable frozen fields.

      Using recordComponents potentially means creating one component for every visible grid row or cell and so can impact performance. Before using this subsystem:

      • consider using ListGridField.valueIcons (possibly with a specified ListGridField.valueIconClick() handler) for icons based on field values which may be displayed alone in the cell or alongside standard content (see ListGridField.showValueIconOnly);
      • for clickable icons representing actions that can be taken on a record, also consider using a field of type "icon", or multiple such fields
      • for controls that only need to appear on rollover, consider rollOver controls
      • if you are trying to customize the editor for a field, you can provide a custom control via ListGridField.editorType, and FormItem.icons are a common way to add clickable buttons. You can also provide different controls per record. These options are usually better that using recordComponents as custom editors, since you won't have to manage issues like making the recordComponent appear only when editing, having changes affect editValues, triggering saves and handling validation errors, etc.

      See RecordComponentPoolingMode for an overview of how best to optimize use of recordComponents for different data sets.

      Regardless of the pooling mode, you can explicitly refresh record components via invalidateRecordComponents() and refreshRecordComponent().

      Interaction with column auto-fit: per-cell record components are not taken into account when determining the size for column auto fit. The default getDefaultFieldWidth() implementation looks at cell content only. We typically recommend that, for fields showing record-components, ListGridField.autoFitWidth and ListGridField.canAutoFitWidth be disabled, or if the record components are of a predictable size, a ListGridField.defaultWidth be specified.
      This is particularly pertinent where recordComponentPosition is set to "within", in which case cells' content is often empty or completely covered by record-components.

      If this method is called after the component has been drawn/initialized: Setter for the showRecordComponents attribute

      Parameters:
      showRecordComponents - new value for this.showRecordComponents. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowRecordComponents

      public Boolean getShowRecordComponents()
      When enabled, createRecordComponent() will be called when saved rows are being rendered, and any returned component will be displayed embedded within the row or cell.

      recordComponents are not created for newly added rows which have not yet been saved. See the Handling Unsaved Records overview for more information.

      Depending on the showRecordComponentsByCell setting, createRecordComponent() will be called either once per row, or once for every cell.

      Depending on recordComponentPosition, components can either be placed underneath normal record or cell content ("expand" setting) or placed so that they overlap normal cell content ("within" setting). For the "within" setting, the default is to fill the row or cell, but the component can specify percent size or even use snapTo-positioning to place itself within the row or cell.

      The "expand" setting is incompatible with frozen columns unless all recordComponents are the same height and they are present in every row, in which case the fixed height of all recordComponents can be set via recordComponentHeight to re-enable frozen fields.

      Using recordComponents potentially means creating one component for every visible grid row or cell and so can impact performance. Before using this subsystem:

      • consider using ListGridField.valueIcons (possibly with a specified ListGridField.valueIconClick() handler) for icons based on field values which may be displayed alone in the cell or alongside standard content (see ListGridField.showValueIconOnly);
      • for clickable icons representing actions that can be taken on a record, also consider using a field of type "icon", or multiple such fields
      • for controls that only need to appear on rollover, consider rollOver controls
      • if you are trying to customize the editor for a field, you can provide a custom control via ListGridField.editorType, and FormItem.icons are a common way to add clickable buttons. You can also provide different controls per record. These options are usually better that using recordComponents as custom editors, since you won't have to manage issues like making the recordComponent appear only when editing, having changes affect editValues, triggering saves and handling validation errors, etc.

      See RecordComponentPoolingMode for an overview of how best to optimize use of recordComponents for different data sets.

      Regardless of the pooling mode, you can explicitly refresh record components via invalidateRecordComponents() and refreshRecordComponent().

      Interaction with column auto-fit: per-cell record components are not taken into account when determining the size for column auto fit. The default getDefaultFieldWidth() implementation looks at cell content only. We typically recommend that, for fields showing record-components, ListGridField.autoFitWidth and ListGridField.canAutoFitWidth be disabled, or if the record components are of a predictable size, a ListGridField.defaultWidth be specified.
      This is particularly pertinent where recordComponentPosition is set to "within", in which case cells' content is often empty or completely covered by record-components.

      Returns:
      Current showRecordComponents value. Default value is null
      See Also:
    • setShowRecordComponentsByCell

      public ListGrid setShowRecordComponentsByCell(Boolean showRecordComponentsByCell)
      If true, shows recordComponents in cells, rather than just in records.

      Note : This is an advanced setting

      Parameters:
      showRecordComponentsByCell - New showRecordComponentsByCell value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowRecordComponentsByCell

      public Boolean getShowRecordComponentsByCell()
      If true, shows recordComponents in cells, rather than just in records.
      Returns:
      Current showRecordComponentsByCell value. Default value is null
    • setShowRollOver

      public ListGrid setShowRollOver(Boolean showRollOver)
      Should we show different styling for the cell the mouse is over?

      If true, the cell style will have the suffix "Over" appended.

      Can be overridden on a per-record basis via ListGridRecord.showRollOver.

      Parameters:
      showRollOver - New showRollOver value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowRollOver

      public Boolean getShowRollOver()
      Should we show different styling for the cell the mouse is over?

      If true, the cell style will have the suffix "Over" appended.

      Can be overridden on a per-record basis via ListGridRecord.showRollOver.

      Returns:
      Current showRollOver value. Default value is true
      See Also:
    • setShowRollOverCanvas

      public ListGrid setShowRollOverCanvas(Boolean showRollOverCanvas)
      When enabled, when the mouse moves over a row or cell (depending on useCellRollOvers), an arbitrary Canvas can be shown layered on top of the row or cell (the rollOverCanvas), layered underneath the row or cell (the rollUnderCanvas), or both.

      This can be used to dynamically show controls or informational displays only on rollover. For example, controls to delete a row might appear only on rollover so they do not clutter the static display, or a "rollUnder" Canvas could be used to display additional information that can appear behind normal cell values (like displaying percent complete via as a bar of color that appears behind text values).

      snapTo positioning can be used to place the rollOver/rollUnderCanvas. With useCellRollOvers, positioning is relative to the cell, for row-level rollOver, position is relative to the portion of the row that is scrolled into view (this implies a row-level rollOver/UnderCanvas can never be placed horizontally scrolled out of view, but this is possible for a cell-level rollOver).

      snapTo positioning makes it easy to do something like place a button at the right edge of the grid, next to the scrollbar: just set snapTo:"R" on the rollOverCanvas.

      The rollOver/rollUnder Canvas can be a single static component (the same for all cells/rows) configured via the com.smartgwt.client.types.AutoChild system, or can instead be provided dynamically by implementing getRollOverCanvas() and/or getRollUnderCanvas().

      The rollOver/rollUnder canvas will be automatically added to the grid's body as an embedded component.
      For grids with frozen fields, the behavior is as follows:

      • If useCellRollOvers is false (the default), embedded components will be added to both the body and the frozen body
      • Otherwise the component will be added to whichever body contains the cell the user is currently over
      The rollOver/rollUnder canvas added to the frozen body will be created by calling the getFrozenRollOverCanvas() or getFrozenRollUnderCanvas() methods. The default implementation for these methods matches their equivalents for non-frozen rollOver / rollUnder canvases - it will use the autoChild subsystem to create a canvas from the rollOverCanvas autoChild configuration.

      showRollOverCanvas has no effect if showRollOver is false.

      See also showSelectedRollOverCanvas.

      Note : This is an advanced setting

      Parameters:
      showRollOverCanvas - New showRollOverCanvas value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowRollOverCanvas

      public Boolean getShowRollOverCanvas()
      When enabled, when the mouse moves over a row or cell (depending on useCellRollOvers), an arbitrary Canvas can be shown layered on top of the row or cell (the rollOverCanvas), layered underneath the row or cell (the rollUnderCanvas), or both.

      This can be used to dynamically show controls or informational displays only on rollover. For example, controls to delete a row might appear only on rollover so they do not clutter the static display, or a "rollUnder" Canvas could be used to display additional information that can appear behind normal cell values (like displaying percent complete via as a bar of color that appears behind text values).

      snapTo positioning can be used to place the rollOver/rollUnderCanvas. With useCellRollOvers, positioning is relative to the cell, for row-level rollOver, position is relative to the portion of the row that is scrolled into view (this implies a row-level rollOver/UnderCanvas can never be placed horizontally scrolled out of view, but this is possible for a cell-level rollOver).

      snapTo positioning makes it easy to do something like place a button at the right edge of the grid, next to the scrollbar: just set snapTo:"R" on the rollOverCanvas.

      The rollOver/rollUnder Canvas can be a single static component (the same for all cells/rows) configured via the com.smartgwt.client.types.AutoChild system, or can instead be provided dynamically by implementing getRollOverCanvas() and/or getRollUnderCanvas().

      The rollOver/rollUnder canvas will be automatically added to the grid's body as an embedded component.
      For grids with frozen fields, the behavior is as follows:

      • If useCellRollOvers is false (the default), embedded components will be added to both the body and the frozen body
      • Otherwise the component will be added to whichever body contains the cell the user is currently over
      The rollOver/rollUnder canvas added to the frozen body will be created by calling the getFrozenRollOverCanvas() or getFrozenRollUnderCanvas() methods. The default implementation for these methods matches their equivalents for non-frozen rollOver / rollUnder canvases - it will use the autoChild subsystem to create a canvas from the rollOverCanvas autoChild configuration.

      showRollOverCanvas has no effect if showRollOver is false.

      See also showSelectedRollOverCanvas.

      Returns:
      Current showRollOverCanvas value. Default value is null
      See Also:
    • setShowRollOverInExpansion

      public ListGrid setShowRollOverInExpansion(Boolean showRollOverInExpansion)
      This setting causes the roll over canvas to be sized to cover the normal row and the expansion layout. Otherwise the rollOverCanvas is only shown for the un-expanded part of the row.

      Note : This is an advanced setting

      Parameters:
      showRollOverInExpansion - New showRollOverInExpansion value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowRollOverInExpansion

      public Boolean getShowRollOverInExpansion()
      This setting causes the roll over canvas to be sized to cover the normal row and the expansion layout. Otherwise the rollOverCanvas is only shown for the un-expanded part of the row.
      Returns:
      Current showRollOverInExpansion value. Default value is null
    • setShowRollUnderCanvas

      public ListGrid setShowRollUnderCanvas(Boolean showRollUnderCanvas)
      If roll overs are enabled, should the rollUnderCanvas be displayed?

      Use of the showRollUnderCanvas is enabled if showRollOver is true, and either showRollOverCanvas is true and showRollUnderCanvas is unset, or showRollUnderCanvas is explicitly set to true.

      See also showSelectedRollUnderCanvas.

      Note : This is an advanced setting

      Parameters:
      showRollUnderCanvas - New showRollUnderCanvas value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowRollUnderCanvas

      public Boolean getShowRollUnderCanvas()
      If roll overs are enabled, should the rollUnderCanvas be displayed?

      Use of the showRollUnderCanvas is enabled if showRollOver is true, and either showRollOverCanvas is true and showRollUnderCanvas is unset, or showRollUnderCanvas is explicitly set to true.

      See also showSelectedRollUnderCanvas.

      Returns:
      Current showRollUnderCanvas value. Default value is null
      See Also:
    • setShowRowNumbers

      public ListGrid setShowRowNumbers(Boolean showRowNumbers)
      When set to true, shows an additional field at the beginning of the field-list (respecting RTL) that displays the current rowNum for each record.

      Note : This is an advanced setting

      Parameters:
      showRowNumbers - New showRowNumbers value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowRowNumbers

      public Boolean getShowRowNumbers()
      When set to true, shows an additional field at the beginning of the field-list (respecting RTL) that displays the current rowNum for each record.
      Returns:
      Current showRowNumbers value. Default value is null
    • setShowSelectedRollOverCanvas

      public ListGrid setShowSelectedRollOverCanvas(Boolean showSelectedRollOverCanvas)
      This setting causes the roll over canvas to be displayed when the user rolls over selected records in the grid (but not when rolling over other records). This can be useful to display a "Selected Over" appearance which can't be easily achieved via standard cell styling.

      Note : This is an advanced setting

      Parameters:
      showSelectedRollOverCanvas - New showSelectedRollOverCanvas value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowSelectedRollOverCanvas

      public Boolean getShowSelectedRollOverCanvas()
      This setting causes the roll over canvas to be displayed when the user rolls over selected records in the grid (but not when rolling over other records). This can be useful to display a "Selected Over" appearance which can't be easily achieved via standard cell styling.
      Returns:
      Current showSelectedRollOverCanvas value. Default value is false
    • setShowSelectedRollUnderCanvas

      public ListGrid setShowSelectedRollUnderCanvas(Boolean showSelectedRollUnderCanvas)
      This setting causes the roll under canvas to be displayed when the user rolls over selected records in the grid (but not when rolling over other records). This can be useful to display a "Selected Over" appearance which can't be easily achieved via standard cell styling.

      As with showRollUnderCanvas, if this property is unset, but the related showSelectedRollOverCanvas property is true, both the the roll under and roll under canvases will be displayed as the user rolls over selected records.

      Note : This is an advanced setting

      Parameters:
      showSelectedRollUnderCanvas - New showSelectedRollUnderCanvas value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowSelectedRollUnderCanvas

      public Boolean getShowSelectedRollUnderCanvas()
      This setting causes the roll under canvas to be displayed when the user rolls over selected records in the grid (but not when rolling over other records). This can be useful to display a "Selected Over" appearance which can't be easily achieved via standard cell styling.

      As with showRollUnderCanvas, if this property is unset, but the related showSelectedRollOverCanvas property is true, both the the roll under and roll under canvases will be displayed as the user rolls over selected records.

      Returns:
      Current showSelectedRollUnderCanvas value. Default value is false
    • setShowSelectedStyle

      public ListGrid setShowSelectedStyle(Boolean showSelectedStyle)
      Should the "Selected" style be applied to selected records?
      Parameters:
      showSelectedStyle - New showSelectedStyle value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowSelectedStyle

      public Boolean getShowSelectedStyle()
      Should the "Selected" style be applied to selected records?
      Returns:
      Current showSelectedStyle value. Default value is true
    • setShowSelectionCanvas

      public ListGrid setShowSelectionCanvas(Boolean showSelectionCanvas)
      If selectionType is set to SelectionStyle.SINGLE, setting this property to true means selection will be displayed to the user with the selectionCanvas and/or selectionUnderCanvas rather than with CSS styling.

      If showSelectionCanvas is set to true, then the selectionUnderCanvas will automatically be enabled unless showSelectionUnderCanvas is set to false.

      NOTE: It is recommended to use the selectionUnderCanvas rather than the selectionCanvas if possible because the selectionCanvas is stacked on top of the selected record and this may interfere with event handling in rare cases. If no interactive components are shown in the selectionCanvas and it simply provides custom styling, then the selectionUnderCanvas should be used instead.

      With frozen fields, the selectionCanvas is displayed only over the non-frozen fields of the selected row.

      Note : This is an advanced setting

      Parameters:
      showSelectionCanvas - New showSelectionCanvas value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowSelectionCanvas

      public Boolean getShowSelectionCanvas()
      If selectionType is set to SelectionStyle.SINGLE, setting this property to true means selection will be displayed to the user with the selectionCanvas and/or selectionUnderCanvas rather than with CSS styling.

      If showSelectionCanvas is set to true, then the selectionUnderCanvas will automatically be enabled unless showSelectionUnderCanvas is set to false.

      NOTE: It is recommended to use the selectionUnderCanvas rather than the selectionCanvas if possible because the selectionCanvas is stacked on top of the selected record and this may interfere with event handling in rare cases. If no interactive components are shown in the selectionCanvas and it simply provides custom styling, then the selectionUnderCanvas should be used instead.

      With frozen fields, the selectionCanvas is displayed only over the non-frozen fields of the selected row.

      Returns:
      Current showSelectionCanvas value. Default value is null
      See Also:
    • setShowSelectionUnderCanvas

      public ListGrid setShowSelectionUnderCanvas(Boolean showSelectionUnderCanvas)
      If selectionType is set to SelectionStyle.SINGLE, and either showSelectionCanvas is true and showSelectionUnderCanvas is unset, or showSelectionUnderCanvas is explicitly set to true, then selection will be displayed to the user with the selectionCanvas and/or selectionUnderCanvas rather than with CSS styling. Setting showSelectionUnderCanvas to false will disable the use of the selectionUnderCanvas.

      With frozen fields, the selectionUnderCanvas is displayed only behind the non-frozen fields of the selected row.

      Note : This is an advanced setting

      Parameters:
      showSelectionUnderCanvas - New showSelectionUnderCanvas value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowSelectionUnderCanvas

      public Boolean getShowSelectionUnderCanvas()
      If selectionType is set to SelectionStyle.SINGLE, and either showSelectionCanvas is true and showSelectionUnderCanvas is unset, or showSelectionUnderCanvas is explicitly set to true, then selection will be displayed to the user with the selectionCanvas and/or selectionUnderCanvas rather than with CSS styling. Setting showSelectionUnderCanvas to false will disable the use of the selectionUnderCanvas.

      With frozen fields, the selectionUnderCanvas is displayed only behind the non-frozen fields of the selected row.

      Returns:
      Current showSelectionUnderCanvas value. Default value is null
      See Also:
    • setShowSortArrow

      public ListGrid setShowSortArrow(SortArrow showSortArrow)
      Indicates whether a sorting arrow should appear for the listGrid, and its location. See SortArrow for details.

      Clicking the sort arrow reverses the direction of sorting for the current sort column (if any), or sorts the listGrid by its first sortable column. The arrow image on the button indicates the current direction of sorting. If undefined, the sort arrow will show up in the sorted field, and the corner sort button will be displayed if a vertical scrollbar is being displayed

      Parameters:
      showSortArrow - New showSortArrow value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShowSortArrow

      public SortArrow getShowSortArrow()
      Indicates whether a sorting arrow should appear for the listGrid, and its location. See SortArrow for details.

      Clicking the sort arrow reverses the direction of sorting for the current sort column (if any), or sorts the listGrid by its first sortable column. The arrow image on the button indicates the current direction of sorting. If undefined, the sort arrow will show up in the sorted field, and the corner sort button will be displayed if a vertical scrollbar is being displayed

      Returns:
      Current showSortArrow value. Default value is null
      See Also:
    • setShowSortNumerals

      public ListGrid setShowSortNumerals(Boolean showSortNumerals)
      When multiple fields are sorted, set this to false to hide the sort-numeral displayed by default after the sort-arrows in the header-buttons of sorted fields.

      Note : This is an advanced setting

      Parameters:
      showSortNumerals - New showSortNumerals value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getShowSortNumerals

      public Boolean getShowSortNumerals()
      When multiple fields are sorted, set this to false to hide the sort-numeral displayed by default after the sort-arrows in the header-buttons of sorted fields.
      Returns:
      Current showSortNumerals value. Default value is null
    • setShowTreeColumnPicker

      public ListGrid setShowTreeColumnPicker(Boolean showTreeColumnPicker) throws IllegalStateException
      When headerSpans are in use, whether to show a hierarchical column picker that includes both headerSpans and normal headers, with normal headers indented under headerSpans similarly to how a TreeGrid displays a Tree.

      If showTreeColumnPicker is false, no column picker will be shown on the headerSpan itself, and the column picker for a clicked on a normal field header will include only normal fields.

      Parameters:
      showTreeColumnPicker - New showTreeColumnPicker value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowTreeColumnPicker

      public Boolean getShowTreeColumnPicker()
      When headerSpans are in use, whether to show a hierarchical column picker that includes both headerSpans and normal headers, with normal headers indented under headerSpans similarly to how a TreeGrid displays a Tree.

      If showTreeColumnPicker is false, no column picker will be shown on the headerSpan itself, and the column picker for a clicked on a normal field header will include only normal fields.

      Returns:
      Current showTreeColumnPicker value. Default value is true
    • setShrinkForFreeze

      public ListGrid setShrinkForFreeze(Boolean shrinkForFreeze)
      If this list grid is showing any frozen fields, and a horizontal scrollbar is visible at the bottom of the liquid columns, should an equivalent scrollbar gap be left visible below the frozen columns?
      Note that if set to true any backgroundColor or border applied to the ListGrid will show up below the bottom row of the frozen column(s).

      Note : This is an advanced setting

      Parameters:
      shrinkForFreeze - New shrinkForFreeze value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getShrinkForFreeze

      public Boolean getShrinkForFreeze()
      If this list grid is showing any frozen fields, and a horizontal scrollbar is visible at the bottom of the liquid columns, should an equivalent scrollbar gap be left visible below the frozen columns?
      Note that if set to true any backgroundColor or border applied to the ListGrid will show up below the bottom row of the frozen column(s).
      Returns:
      Current shrinkForFreeze value. Default value is false
      See Also:
    • setSingleCellValueProperty

      public ListGrid setSingleCellValueProperty(String singleCellValueProperty)
      If record[this.singleCellValueProperty] is set for some record, the record will be displayed as a single cell spanning every column in the grid, with contents set to the value of record[this.singleCellValueProperty].
      Parameters:
      singleCellValueProperty - New singleCellValueProperty value. Default value is "singleCellValue"
      Returns:
      ListGrid instance, for chaining setter calls
    • getSingleCellValueProperty

      public String getSingleCellValueProperty()
      If record[this.singleCellValueProperty] is set for some record, the record will be displayed as a single cell spanning every column in the grid, with contents set to the value of record[this.singleCellValueProperty].
      Returns:
      Current singleCellValueProperty value. Default value is "singleCellValue"
    • setSkinImgDir

      public ListGrid setSkinImgDir(String skinImgDir)
      Where do 'skin' images (those provided with the class) live?

      Note : This is an advanced setting

      Overrides:
      setSkinImgDir in class Canvas
      Parameters:
      skinImgDir - New skinImgDir value. Default value is "images/ListGrid/"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSkinImgDir

      public String getSkinImgDir()
      Where do 'skin' images (those provided with the class) live?
      Overrides:
      getSkinImgDir in class Canvas
      Returns:
      Current skinImgDir value. Default value is "images/ListGrid/"
      See Also:
    • setSkipLineBreaks

      public ListGrid setSkipLineBreaks(Boolean skipLineBreaks)
      Whether to skip line breaks for all fields by default when escaping HTML. This property can be overridden at the field level by ListGridField.skipLineBreaks.
      Parameters:
      skipLineBreaks - New skipLineBreaks value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSkipLineBreaks

      public Boolean getSkipLineBreaks()
      Whether to skip line breaks for all fields by default when escaping HTML. This property can be overridden at the field level by ListGridField.skipLineBreaks.
      Returns:
      Current skipLineBreaks value. Default value is null
      See Also:
    • setSortArrowMenuButtonSpaceOffset

      public ListGrid setSortArrowMenuButtonSpaceOffset(int sortArrowMenuButtonSpaceOffset)
      When leaveHeaderMenuButtonSpace is true, configures the amount of space beyond the headerMenuButtonWidth on the right side of a ListGrid header button (left for RTL mode) to reserve for the sort arrow if sorting is active for that field and the arrow will be shown. May be increased for more separation between the sort arrow and the title text, at the expense of a reduced space for the title text.

      This value may need to be customized in your skin or if sortAscendingImage or sortDescendingImage are changed.

      Parameters:
      sortArrowMenuButtonSpaceOffset - New sortArrowMenuButtonSpaceOffset value. Default value is 7
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortArrowMenuButtonSpaceOffset

      public int getSortArrowMenuButtonSpaceOffset()
      When leaveHeaderMenuButtonSpace is true, configures the amount of space beyond the headerMenuButtonWidth on the right side of a ListGrid header button (left for RTL mode) to reserve for the sort arrow if sorting is active for that field and the arrow will be shown. May be increased for more separation between the sort arrow and the title text, at the expense of a reduced space for the title text.

      This value may need to be customized in your skin or if sortAscendingImage or sortDescendingImage are changed.

      Returns:
      Current sortArrowMenuButtonSpaceOffset value. Default value is 7
      See Also:
    • setSortAscendingImage

      public ListGrid setSortAscendingImage(String sortAscendingImage)
      Image to show when sorted in ascending order. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.

      Note : This is an advanced setting

      Parameters:
      sortAscendingImage - New sortAscendingImage value. Default value is {...}
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortAscendingImage

      public String getSortAscendingImage()
      Image to show when sorted in ascending order. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.
      Returns:
      Current sortAscendingImage value. Default value is {...}
      See Also:
    • setSortAscendingImage

      public ListGrid setSortAscendingImage(ImgHTMLProperties sortAscendingImage)
      Image to show when sorted in ascending order. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.

      Note : This is an advanced setting

      Parameters:
      sortAscendingImage - New sortAscendingImage value. Default value is {...}
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortAscendingImageAsImgHTMLProperties

      public ImgHTMLProperties getSortAscendingImageAsImgHTMLProperties()
      Image to show when sorted in ascending order. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.
      Returns:
      Current sortAscendingImage value. Default value is {...}
      See Also:
    • setSortBinaryByFileName

      public ListGrid setSortBinaryByFileName(boolean sortBinaryByFileName)
      For any fields of type "binary", should sorting be performed against the fileName of the value for the field? For Smart GWT server backed dataSources, this is applied to the record automatically as described in the BinaryFields overview.

      If set to false, binary fields will be sorted against the record value for the field in question. Client-side sorting does not support this, so developers who actually want to support a sort against the binary itself would typically set ResultSet.useClientSorting to false on the dataProperties block for this grid.

      Note that this setting will have no effect if DataSourceField.sortByField is specified

      Parameters:
      sortBinaryByFileName - New sortBinaryByFileName value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getSortBinaryByFileName

      public boolean getSortBinaryByFileName()
      For any fields of type "binary", should sorting be performed against the fileName of the value for the field? For Smart GWT server backed dataSources, this is applied to the record automatically as described in the BinaryFields overview.

      If set to false, binary fields will be sorted against the record value for the field in question. Client-side sorting does not support this, so developers who actually want to support a sort against the binary itself would typically set ResultSet.useClientSorting to false on the dataProperties block for this grid.

      Note that this setting will have no effect if DataSourceField.sortByField is specified

      Returns:
      Current sortBinaryByFileName value. Default value is true
    • setSortByGroupFirst

      public ListGrid setSortByGroupFirst(Boolean sortByGroupFirst)
      If set, whenever grouping is performed by an end user or by a programmatic call to groupBy(), data is implicitly sorted by all of the grouped columns, in the order they were passed to groupBy. Any user-configured sorting is applied after sorting by grouped columns.

      Sorting by grouped fields will be in ascending or descending order according to whether the grid is currently sorted (by any field) in ascending or descending order, defaulting to ascending if the grid is not sorted. Implicit sorting by group can be forced to be always ascending or always descending by setting groupSortDirection.

      The sorting is "implicit" in the sense that the sorting is not shown in the ListGrid headers, and not shown in the MultiSortDialog if enabled. An end user cannot currently remove the implicit sorting themselves (except by removing the grouping), though it is possible to override it by providing an explicit sort on the group's column. Clicking on the grouped field's header reveals the usual sort indicators with all the same semantics.

      The correct way to remove implicit sorting programmatically is to call setSortByGroupFirst(false).

      Programmatic calls to getSort() will not include the implicit sort in the list of return sort specifiers, and calls to setSort() will implicitly add the sorting by grouped columns before the specified sort.

      Note that directly calling ResultSet.getSort() will include the implicit sort information.

      Parameters:
      sortByGroupFirst - New sortByGroupFirst value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortByGroupFirst

      public Boolean getSortByGroupFirst()
      If set, whenever grouping is performed by an end user or by a programmatic call to groupBy(), data is implicitly sorted by all of the grouped columns, in the order they were passed to groupBy. Any user-configured sorting is applied after sorting by grouped columns.

      Sorting by grouped fields will be in ascending or descending order according to whether the grid is currently sorted (by any field) in ascending or descending order, defaulting to ascending if the grid is not sorted. Implicit sorting by group can be forced to be always ascending or always descending by setting groupSortDirection.

      The sorting is "implicit" in the sense that the sorting is not shown in the ListGrid headers, and not shown in the MultiSortDialog if enabled. An end user cannot currently remove the implicit sorting themselves (except by removing the grouping), though it is possible to override it by providing an explicit sort on the group's column. Clicking on the grouped field's header reveals the usual sort indicators with all the same semantics.

      The correct way to remove implicit sorting programmatically is to call setSortByGroupFirst(false).

      Programmatic calls to getSort() will not include the implicit sort in the list of return sort specifiers, and calls to setSort() will implicitly add the sorting by grouped columns before the specified sort.

      Note that directly calling ResultSet.getSort() will include the implicit sort information.

      Returns:
      Current sortByGroupFirst value. Default value is null
      See Also:
    • setSortDescendingImage

      public ListGrid setSortDescendingImage(String sortDescendingImage)
      Image to show when sorted in descending order. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.

      Note : This is an advanced setting

      Parameters:
      sortDescendingImage - New sortDescendingImage value. Default value is {...}
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortDescendingImage

      public String getSortDescendingImage()
      Image to show when sorted in descending order. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.
      Returns:
      Current sortDescendingImage value. Default value is {...}
      See Also:
    • setSortDescendingImage

      public ListGrid setSortDescendingImage(ImgHTMLProperties sortDescendingImage)
      Image to show when sorted in descending order. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.

      Note : This is an advanced setting

      Parameters:
      sortDescendingImage - New sortDescendingImage value. Default value is {...}
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortDescendingImageAsImgHTMLProperties

      public ImgHTMLProperties getSortDescendingImageAsImgHTMLProperties()
      Image to show when sorted in descending order. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.
      Returns:
      Current sortDescendingImage value. Default value is {...}
      See Also:
    • setSortDirection

      public ListGrid setSortDirection(SortDirection sortDirection)
      Sorting direction of this ListGrid. If specified when the ListGrid is initialized, this property will be the default sorting direction for the sortField. May be overridden by specifying ListGridField.sortDirection.

      After initialization, this property will be updated on sort() or setSort() to reflect the current sort direction of the grid. When this grid is sorted by multiple fields, the grid's sortDirection reflects the sort direction of the primary sort field.

      Note: A side effect of setSort() is that it updates the grid's sortDirection to the direction of the first sort. In particular, if there is an initialSort or sortField, then sortDirection will be updated during initialization to the direction of the first sort.

      If this method is called after the component has been drawn/initialized: Sort this grid's data, with the option to explicitly specify a single field to sort by and sort direction.

      If sortField is not provided and listGrid.sortField is undefined, the data will be sorted by the first sortable column according to ListGridField.sortDirection if specified, or sortDirection.

      ListGrids also support multiple-field sorting. See setSort() for details.

      Note that for editable grids, sorting is performed by underlying data values, not for unsaved pending edit values. When the user saves edits in a sorted grid, the grid will automatically be unsorted. See Editing for further details.

      Parameters:
      sortDirection - the field name or column number to sort by. Default value is "ascending"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortDirection

      public SortDirection getSortDirection()
      Sorting direction of this ListGrid. If specified when the ListGrid is initialized, this property will be the default sorting direction for the sortField. May be overridden by specifying ListGridField.sortDirection.

      After initialization, this property will be updated on sort() or setSort() to reflect the current sort direction of the grid. When this grid is sorted by multiple fields, the grid's sortDirection reflects the sort direction of the primary sort field.

      Note: A side effect of setSort() is that it updates the grid's sortDirection to the direction of the first sort. In particular, if there is an initialSort or sortField, then sortDirection will be updated during initialization to the direction of the first sort.

      Returns:
      Current sortDirection value. Default value is "ascending"
      See Also:
    • setSortEditorSpanTitleSeparator

      public ListGrid setSortEditorSpanTitleSeparator(String sortEditorSpanTitleSeparator)
      If this grid has specified headerSpans, and showHeaderSpanTitlesInSortEditor is true, this string will be inserted between the headerSpan title(s) and the field title in the field chooser grid on the multi-sort editor
      Parameters:
      sortEditorSpanTitleSeparator - New sortEditorSpanTitleSeparator value. Default value is " - "
      Returns:
      ListGrid instance, for chaining setter calls
    • getSortEditorSpanTitleSeparator

      public String getSortEditorSpanTitleSeparator()
      If this grid has specified headerSpans, and showHeaderSpanTitlesInSortEditor is true, this string will be inserted between the headerSpan title(s) and the field title in the field chooser grid on the multi-sort editor
      Returns:
      Current sortEditorSpanTitleSeparator value. Default value is " - "
    • setSorterButtonTitle

      public ListGrid setSorterButtonTitle(String sorterButtonTitle) throws IllegalStateException
      The title for the corner sort button. The title will only ListGrid.changeDefaults() rather than replacing with an entirely new object.
      Parameters:
      sorterButtonTitle - New sorterButtonTitle value. Default value is "corner menu"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSorterButtonTitle

      public String getSorterButtonTitle()
      The title for the corner sort button. The title will only ListGrid.changeDefaults() rather than replacing with an entirely new object.
      Returns:
      Current sorterButtonTitle value. Default value is "corner menu"
      See Also:
    • setSortField

      public ListGrid setSortField(String sortField) throws IllegalStateException
      Specifies the field by which this grid should be initially sorted. Can be set to either a field name or the index of the field in the fields Array.

      ListGrids also support being initialized with multiple-field sort via initialSort. If initialSort is specified, it will be used in preference to this property.

      To sort the grid after it has been initialized, use sort() or setSort(). Details about the current sort of a live grid can be retrieved by calling getSortField() or getSort()

      Parameters:
      sortField - New sortField value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSortField

      public String getSortField()
      Specifies the field by which this grid should be initially sorted. Can be set to either a field name or the index of the field in the fields Array.

      ListGrids also support being initialized with multiple-field sort via initialSort. If initialSort is specified, it will be used in preference to this property.

      To sort the grid after it has been initialized, use sort() or setSort(). Details about the current sort of a live grid can be retrieved by calling getSortField() or getSort()

      Returns:
      Returns the current sort field for this grid. Note that if setSort() has been used to sort by multiple fields, you can call getSort() to retrieve details about the complete sort applied to the grid. Default value is null
      See Also:
    • setSortField

      public ListGrid setSortField(Integer sortField) throws IllegalStateException
      Specifies the field by which this grid should be initially sorted. Can be set to either a field name or the index of the field in the fields Array.

      ListGrids also support being initialized with multiple-field sort via initialSort. If initialSort is specified, it will be used in preference to this property.

      To sort the grid after it has been initialized, use sort() or setSort(). Details about the current sort of a live grid can be retrieved by calling getSortField() or getSort()

      Parameters:
      sortField - New sortField value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setSortFieldAscendingText

      public ListGrid setSortFieldAscendingText(String sortFieldAscendingText)
      If we're showing a headerContextMenu for this grid, this attribute will be shown as the menu item title to sort a field in ascending order.
      Parameters:
      sortFieldAscendingText - New sortFieldAscendingText value. Default value is "Sort Ascending"
      Returns:
      ListGrid instance, for chaining setter calls
    • getSortFieldAscendingText

      public String getSortFieldAscendingText()
      If we're showing a headerContextMenu for this grid, this attribute will be shown as the menu item title to sort a field in ascending order.
      Returns:
      Current sortFieldAscendingText value. Default value is "Sort Ascending"
    • setSortFieldDescendingText

      public ListGrid setSortFieldDescendingText(String sortFieldDescendingText)
      If we're showing a headerContextMenu for this grid, this attribute will be shown as the menu item title to sort a field in descending order.
      Parameters:
      sortFieldDescendingText - New sortFieldDescendingText value. Default value is "Sort Descending"
      Returns:
      ListGrid instance, for chaining setter calls
    • getSortFieldDescendingText

      public String getSortFieldDescendingText()
      If we're showing a headerContextMenu for this grid, this attribute will be shown as the menu item title to sort a field in descending order.
      Returns:
      Current sortFieldDescendingText value. Default value is "Sort Descending"
    • setSortNumeralMenuButtonSpaceOffset

      public ListGrid setSortNumeralMenuButtonSpaceOffset(int sortNumeralMenuButtonSpaceOffset)
      When leaveHeaderMenuButtonSpace is true, configures the amount of space beyond the headerMenuButtonWidth on the right side of a ListGrid header button (left for RTL mode) to reserve for the sort numeral if multi-sorting is active for that field and the numeral will be shown. May be increased for more separation between the title text and the sort arrow when multi-sorting.

      Note that larger values may required if 10 or more fields are sorted at once, as the numeral will occupy more space. This value may need to be customized in your skin or if sortAscendingImage or sortDescendingImage are changed.

      Parameters:
      sortNumeralMenuButtonSpaceOffset - New sortNumeralMenuButtonSpaceOffset value. Default value is 9
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortNumeralMenuButtonSpaceOffset

      public int getSortNumeralMenuButtonSpaceOffset()
      When leaveHeaderMenuButtonSpace is true, configures the amount of space beyond the headerMenuButtonWidth on the right side of a ListGrid header button (left for RTL mode) to reserve for the sort numeral if multi-sorting is active for that field and the numeral will be shown. May be increased for more separation between the title text and the sort arrow when multi-sorting.

      Note that larger values may required if 10 or more fields are sorted at once, as the numeral will occupy more space. This value may need to be customized in your skin or if sortAscendingImage or sortDescendingImage are changed.

      Returns:
      Current sortNumeralMenuButtonSpaceOffset value. Default value is 9
      See Also:
    • setSortNumeralStyle

      public ListGrid setSortNumeralStyle(String sortNumeralStyle)
      When multiple fields are sorted, the Style to apply to the numeral that appears after the sort-arrows in the header-buttons of sorted fields.

      Note : This is an advanced setting

      Parameters:
      sortNumeralStyle - New sortNumeralStyle value. Default value is "sortNumeral"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortNumeralStyle

      public String getSortNumeralStyle()
      When multiple fields are sorted, the Style to apply to the numeral that appears after the sort-arrows in the header-buttons of sorted fields.
      Returns:
      Current sortNumeralStyle value. Default value is "sortNumeral"
      See Also:
    • setSortState

      public ListGrid setSortState(String sortState)
      Initial sort state for the grid.

      viewState can be used to initialize all view properties of the grid. When doing so, sortState is not needed because viewState includes it as well. If both are provided, sortState has priority for sort state.

      If this method is called after the component has been drawn/initialized: Reset this grid's sort state (sort field and direction or list of SortSpecifiers) to match the ListGridSortState object passed in.
      Used to restore previous state retrieved from the grid by a call to getSortState().

      Parameters:
      sortState - Object describing the desired sort state for the grid. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSortState

      public String getSortState()
      Initial sort state for the grid.

      viewState can be used to initialize all view properties of the grid. When doing so, sortState is not needed because viewState includes it as well. If both are provided, sortState has priority for sort state.

      Returns:
      Returns a snapshot of the current sort state within this listGrid as a ListGridSortState object.
      This object can be passed to setSortState() to reset this grid's sort to the current state (assuming the same fields are present in the grid).
      . Default value is null
      See Also:
    • getSpanContextMenu

      public Layout getSpanContextMenu() throws IllegalStateException
      The menu displayed when a cell is right clicked on.

      This component is an AutoChild named "spanContextMenu". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current spanContextMenu value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
      See Also:
    • setSpannedHeaderBaseStyle

      public ListGrid setSpannedHeaderBaseStyle(String spannedHeaderBaseStyle) throws IllegalStateException
      Button.baseStyle to apply to the field header buttons for this ListGrid when showing header spans. Note that, depending on the Class of the header buttons, you may also need to set headerTitleStyle.
      Parameters:
      spannedHeaderBaseStyle - New spannedHeaderBaseStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSpannedHeaderBaseStyle

      public String getSpannedHeaderBaseStyle()
      Button.baseStyle to apply to the field header buttons for this ListGrid when showing header spans. Note that, depending on the Class of the header buttons, you may also need to set headerTitleStyle.
      Returns:
      Current spannedHeaderBaseStyle value. Default value is null
      See Also:
    • setStopOnErrors

      public ListGrid setStopOnErrors(Boolean stopOnErrors)
      If this is an editable listGrid, this property determines how failure to save due to validation errors should be displayed to the user.

      If this property is true, when validation errors occur the errors will be displayed to the user in an alert, and focus will be returned to the first cell to fail validation.

      If false, the cells that failed validation will be silently styled with the editFailedBaseStyle.

      Note: stopOnErrors being set to true implies that 'waitForSave' is also true. We will not dismiss the editor until save has completed if stopOnErrors is true.

      Note : This is an advanced setting

      Parameters:
      stopOnErrors - New stopOnErrors value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getStopOnErrors

      public Boolean getStopOnErrors()
      If this is an editable listGrid, this property determines how failure to save due to validation errors should be displayed to the user.

      If this property is true, when validation errors occur the errors will be displayed to the user in an alert, and focus will be returned to the first cell to fail validation.

      If false, the cells that failed validation will be silently styled with the editFailedBaseStyle.

      Note: stopOnErrors being set to true implies that 'waitForSave' is also true. We will not dismiss the editor until save has completed if stopOnErrors is true.

      Returns:
      Current stopOnErrors value. Default value is false
      See Also:
    • setStyledRowEnds

      public ListGrid setStyledRowEnds(Boolean styledRowEnds)
      When set to true, the first and last cells in each row will be styled with an additional CSS class, via the firstCellStyle and lastCellStyle attributes. This styling is added as a second style, additional to the cell's regular stateful style, so works with any cell-design and in all states, and is also applied correctly with or without frozen fields.

      If all you want to do is provide rounded-corners for records in this grid, it may be simpler to set recordRadius to a CSS border-radius string that achieves the rounding you want.

      Note that you can also provide your own implementation of getCellStyle() or getCellCSSText(), if you want to do something more complex, like a gradient fade that spans the end two cells on each side of a record.

      Parameters:
      styledRowEnds - New styledRowEnds value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getStyledRowEnds

      public Boolean getStyledRowEnds()
      When set to true, the first and last cells in each row will be styled with an additional CSS class, via the firstCellStyle and lastCellStyle attributes. This styling is added as a second style, additional to the cell's regular stateful style, so works with any cell-design and in all states, and is also applied correctly with or without frozen fields.

      If all you want to do is provide rounded-corners for records in this grid, it may be simpler to set recordRadius to a CSS border-radius string that achieves the rounding you want.

      Note that you can also provide your own implementation of getCellStyle() or getCellCSSText(), if you want to do something more complex, like a gradient fade that spans the end two cells on each side of a record.

      Returns:
      Current styledRowEnds value. Default value is null
    • setStyleName

      public void setStyleName(String styleName)
      Default CSS class for the ListGrid as a whole.
      Overrides:
      setStyleName in class Canvas
      Parameters:
      styleName - New styleName value. Default value is "listGrid"
      See Also:
    • getStyleName

      public String getStyleName()
      Default CSS class for the ListGrid as a whole.
      Overrides:
      getStyleName in class Canvas
      Returns:
      Current styleName value. Default value is "listGrid"
      See Also:
    • getSummaryRow

      public ListGrid getSummaryRow() throws IllegalStateException
      Automatically generated ListGrid for displaying grid summary information (see showGridSummary).

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized by calling setAutoChildProperties("summaryRow", summaryRowProperties); where summaryRowProperties is a ListGrid instance with the desired customizations.

      This component is an AutoChild named "summaryRow". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current summaryRow value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setSummaryRowCriteria

      public ListGrid setSummaryRowCriteria(Criteria summaryRowCriteria)
      If showGridSummary is true, and a summaryRowDataSource is specified this property may be used to specify fetch criteria to apply when retrieving summary data to show in the summary row. If unset, and any filter criteria have been specified for the grid, they will be used.

      If this property is set, the textMatchStyle will default to "exact". Otherwise autoFetchTextMatchStyle will be used. This can be overridden via summaryRowFetchRequestProperties.

      Note : This is an advanced setting

      Parameters:
      summaryRowCriteria - New summaryRowCriteria value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getSummaryRowCriteria

      public Criteria getSummaryRowCriteria()
      If showGridSummary is true, and a summaryRowDataSource is specified this property may be used to specify fetch criteria to apply when retrieving summary data to show in the summary row. If unset, and any filter criteria have been specified for the grid, they will be used.

      If this property is set, the textMatchStyle will default to "exact". Otherwise autoFetchTextMatchStyle will be used. This can be overridden via summaryRowFetchRequestProperties.

      Returns:
      Current summaryRowCriteria value. Default value is null
    • setSummaryRowDataSource

      public ListGrid setSummaryRowDataSource(DataSource summaryRowDataSource) throws IllegalStateException
      If showGridSummary is true, by default summary values are calculated on the client based on the current data-set for the grid (see getGridSummary() and getGridSummaryFunction()).

      In some cases however it may make sense to calculate summary values on the server and retrieve them via a dataSource fetch. If set, this property specifies a dataSource to fetch against for the summary row.

      The fetch may be further customized via summaryRowCriteria and summaryRowFetchRequestProperties. Note that if maxSummaryRowRecords is specified this will be passed to the server as the DSRequest.endRow for the summaryRowFetchRequest. Developers may modify this property in order to display multiple summaryRowRecords from a summaryRowDataSource fetch

      Note that specifying a summaryRowDataSource completely bypasses the standard client-side grid summary calculation logic.

      Note : This is an advanced setting

      Parameters:
      summaryRowDataSource - New summaryRowDataSource value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSummaryRowDataSource

      public DataSource getSummaryRowDataSource()
      If showGridSummary is true, by default summary values are calculated on the client based on the current data-set for the grid (see getGridSummary() and getGridSummaryFunction()).

      In some cases however it may make sense to calculate summary values on the server and retrieve them via a dataSource fetch. If set, this property specifies a dataSource to fetch against for the summary row.

      The fetch may be further customized via summaryRowCriteria and summaryRowFetchRequestProperties. Note that if maxSummaryRowRecords is specified this will be passed to the server as the DSRequest.endRow for the summaryRowFetchRequest. Developers may modify this property in order to display multiple summaryRowRecords from a summaryRowDataSource fetch

      Note that specifying a summaryRowDataSource completely bypasses the standard client-side grid summary calculation logic.

      Returns:
      Current summaryRowDataSource value. Default value is null
    • setSummaryRowFetchRequestProperties

      public ListGrid setSummaryRowFetchRequestProperties(DSRequest summaryRowFetchRequestProperties)
      If showGridSummary is true, and a summaryRowDataSource is specified this property may be used to customize the fetch request used when retrieving summary data to show in the summary row. An example use case might be specifying a DSRequest.operationId to perform a custom fetch operation which retrieved only summary values based on criteria.

      Note that DSRequest.startRow and DSRequest.endRow will be configured to only request the first maxSummaryRowRecords matches if the criteria matches multiple records - though typically a properly configured summary fetch operation will only return a single record, or an expected fixed number of records if multiple row summary values per field are to be displayed.

      Note : This is an advanced setting

      Parameters:
      summaryRowFetchRequestProperties - New summaryRowFetchRequestProperties value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSummaryRowFetchRequestProperties

      public DSRequest getSummaryRowFetchRequestProperties()
      If showGridSummary is true, and a summaryRowDataSource is specified this property may be used to customize the fetch request used when retrieving summary data to show in the summary row. An example use case might be specifying a DSRequest.operationId to perform a custom fetch operation which retrieved only summary values based on criteria.

      Note that DSRequest.startRow and DSRequest.endRow will be configured to only request the first maxSummaryRowRecords matches if the criteria matches multiple records - though typically a properly configured summary fetch operation will only return a single record, or an expected fixed number of records if multiple row summary values per field are to be displayed.

      Returns:
      Current summaryRowFetchRequestProperties value. Default value is null
      See Also:
    • setSummaryRowHeight

      public ListGrid setSummaryRowHeight(int summaryRowHeight) throws IllegalStateException
      Default height for the summary row autoChild. Note that this height is a minimum - the summary row has autoFitData set to "vertical" so if multiple rows are visible in the grid summary, the summaryRow component will expand to accommodate them.
      Parameters:
      summaryRowHeight - New summaryRowHeight value. Default value is 20
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSummaryRowHeight

      public int getSummaryRowHeight()
      Default height for the summary row autoChild. Note that this height is a minimum - the summary row has autoFitData set to "vertical" so if multiple rows are visible in the grid summary, the summaryRow component will expand to accommodate them.
      Returns:
      Current summaryRowHeight value. Default value is 20
    • setSummaryRowStyle

      public ListGrid setSummaryRowStyle(String summaryRowStyle)
      baseStyle for the summaryRow

      Note : This is an advanced setting

      Parameters:
      summaryRowStyle - New summaryRowStyle value. Default value is "gridSummaryCell"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getSummaryRowStyle

      public String getSummaryRowStyle()
      Returns:
      Current summaryRowStyle value. Default value is "gridSummaryCell"
      See Also:
    • setTableRowStyle

      public ListGrid setTableRowStyle(String tableRowStyle)
      The style to apply to <TR> tags in this grid's table. Useful for applying spacing or a custom border between records in the grid.

      This is an advanced capability and care should be taken not to use CSS that applies sizes or other settings that could cause sizing/rendering issues when used in conjunction with certain other features, such as virtualScrolling. For example, the style should apply box-sizing: border-box; to ensure that settings like border and padding don't change the size of row elements. In some cases, the style will also need to apply display: inline-block; for CSS changes to take effect - this is because the default display setting for <TR> elements, table-row, has limited styling support.

      Note : This is an advanced setting

      Parameters:
      tableRowStyle - New tableRowStyle value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getTableRowStyle

      public String getTableRowStyle()
      The style to apply to <TR> tags in this grid's table. Useful for applying spacing or a custom border between records in the grid.

      This is an advanced capability and care should be taken not to use CSS that applies sizes or other settings that could cause sizing/rendering issues when used in conjunction with certain other features, such as virtualScrolling. For example, the style should apply box-sizing: border-box; to ensure that settings like border and padding don't change the size of row elements. In some cases, the style will also need to apply display: inline-block; for CSS changes to take effect - this is because the default display setting for <TR> elements, table-row, has limited styling support.

      Returns:
      Current tableRowStyle value. Default value is null
      See Also:
    • setTallBaseStyle

      public ListGrid setTallBaseStyle(String tallBaseStyle) throws IllegalStateException
      "Tall" baseStyle for this listGrid. Only applies if baseStyle is set to null.

      If baseStyle is unset, this property will be used as a base cell style unless the grid is showing fixed height rows with a specified cellHeight that matches normalCellHeight, in which case normalBaseStyle will be used. Note that in Internet Explorer if fastCellUpdates is true, tallBaseStyle will also be used even if the cellHeight matches the specified normalCellHeight for the grid.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Parameters:
      tallBaseStyle - New tallBaseStyle value. Default value is "cell"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getTallBaseStyle

      public String getTallBaseStyle()
      "Tall" baseStyle for this listGrid. Only applies if baseStyle is set to null.

      If baseStyle is unset, this property will be used as a base cell style unless the grid is showing fixed height rows with a specified cellHeight that matches normalCellHeight, in which case normalBaseStyle will be used. Note that in Internet Explorer if fastCellUpdates is true, tallBaseStyle will also be used even if the cellHeight matches the specified normalCellHeight for the grid.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Returns:
      Current tallBaseStyle value. Default value is "cell"
      See Also:
    • setTouchScrollRedrawDelay

      public ListGrid setTouchScrollRedrawDelay(Integer touchScrollRedrawDelay)
      While scrolling an incrementally rendered grid, using the inertial scrolling, time in milliseconds to wait before redrawing, after the last touchScroll by the user. If not specified scrollRedrawDelay will be used as a default for both drag scrolling and touch scrolling.

      Note that if specified, this value will typically be larger than scrollRedrawDelay.

      See also GridRenderer.instantScrollTrackRedraw for cases where this delay is skipped.

      Parameters:
      touchScrollRedrawDelay - New touchScrollRedrawDelay value. Default value is 0
      Returns:
      ListGrid instance, for chaining setter calls
    • getTouchScrollRedrawDelay

      public Integer getTouchScrollRedrawDelay()
      While scrolling an incrementally rendered grid, using the inertial scrolling, time in milliseconds to wait before redrawing, after the last touchScroll by the user. If not specified scrollRedrawDelay will be used as a default for both drag scrolling and touch scrolling.

      Note that if specified, this value will typically be larger than scrollRedrawDelay.

      See also GridRenderer.instantScrollTrackRedraw for cases where this delay is skipped.

      Returns:
      Current touchScrollRedrawDelay value. Default value is 0
    • setTrackerImage

      public ListGrid setTrackerImage(String trackerImage)
      Default image to use for the dragTracker when things are dragged within or out of this list. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.

      Note : This is an advanced setting

      Parameters:
      trackerImage - New trackerImage value. Default value is {...}
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getTrackerImage

      public String getTrackerImage()
      Default image to use for the dragTracker when things are dragged within or out of this list. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.
      Returns:
      Current trackerImage value. Default value is {...}
      See Also:
    • setTrackerImage

      public ListGrid setTrackerImage(ImgHTMLProperties trackerImage)
      Default image to use for the dragTracker when things are dragged within or out of this list. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.

      Note : This is an advanced setting

      Parameters:
      trackerImage - New trackerImage value. Default value is {...}
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getTrackerImageAsImgHTMLProperties

      public ImgHTMLProperties getTrackerImageAsImgHTMLProperties()
      Default image to use for the dragTracker when things are dragged within or out of this list. Can be either a regular SCImgURL src, or an ImgHTMLProperties object.
      Returns:
      Current trackerImage value. Default value is {...}
      See Also:
    • setUnfreezeFieldText

      public ListGrid setUnfreezeFieldText(String unfreezeFieldText)
      If we're showing a headerContextMenu for this grid and this.canFreezeFields is true, this string will be shown as the title for the menu item to unfreeze a currently frozen field.

      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed, with title available as a variable containing the field title.

      Default value returns "Unfreeze " + the field's summary title.

      Note : This is an advanced setting

      Parameters:
      unfreezeFieldText - New unfreezeFieldText value. Default value is "Unfreeze ${title}"
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getUnfreezeFieldText

      public String getUnfreezeFieldText()
      If we're showing a headerContextMenu for this grid and this.canFreezeFields is true, this string will be shown as the title for the menu item to unfreeze a currently frozen field.

      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed, with title available as a variable containing the field title.

      Default value returns "Unfreeze " + the field's summary title.

      Returns:
      Current unfreezeFieldText value. Default value is "Unfreeze ${title}"
      See Also:
    • setUngroupText

      public ListGrid setUngroupText(String ungroupText)
      If we're showing a headerContextMenu for this grid, and this.isGrouped is true, this attribute will be shown as the title for the menu item to ungroup the grid.
      Parameters:
      ungroupText - New ungroupText value. Default value is "Ungroup"
      Returns:
      ListGrid instance, for chaining setter calls
    • getUngroupText

      public String getUngroupText()
      If we're showing a headerContextMenu for this grid, and this.isGrouped is true, this attribute will be shown as the title for the menu item to ungroup the grid.
      Returns:
      Current ungroupText value. Default value is "Ungroup"
    • setUnknownRowCountDisplayValue

      public ListGrid setUnknownRowCountDisplayValue(String unknownRowCountDisplayValue)
      Value to return from getFormattedRowCount() when the row count is unknown
      Parameters:
      unknownRowCountDisplayValue - New unknownRowCountDisplayValue value. Default value is "many"
      Returns:
      ListGrid instance, for chaining setter calls
    • getUnknownRowCountDisplayValue

      public String getUnknownRowCountDisplayValue()
      Value to return from getFormattedRowCount() when the row count is unknown
      Returns:
      Current unknownRowCountDisplayValue value. Default value is "many"
    • setUnremoveIcon

      public ListGrid setUnremoveIcon(String unremoveIcon) throws IllegalStateException
      When canRemoveRecords is enabled, this icon will be shown in the auto generated field fro removing records if the record has been marked as removed via markRecordRemoved(). At this point, clicking on the icon will unmark the record as removed.
      Parameters:
      unremoveIcon - New unremoveIcon value. Default value is "[SKIN]/actions/undo.png"
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getUnremoveIcon

      public String getUnremoveIcon()
      When canRemoveRecords is enabled, this icon will be shown in the auto generated field fro removing records if the record has been marked as removed via markRecordRemoved(). At this point, clicking on the icon will unmark the record as removed.
      Returns:
      Current unremoveIcon value. Default value is "[SKIN]/actions/undo.png"
      See Also:
    • setUpdateSummariesDuringEditing

      public ListGrid setUpdateSummariesDuringEditing(boolean updateSummariesDuringEditing)
      Should the summary row or group summaries be updated during editing of grid records? This can be set false to improve performance when a large number of ListGridFields or DataSourceFields are present for the grid.

      Note that summaries will always be updated when the edits are saved, so to avoid recalculation overhead when a row or cell edit is completed, you must also set autoSaveEdits: false. Summaries will then be updated upon your manual save, such as saveAllEdits().

      Parameters:
      updateSummariesDuringEditing - New updateSummariesDuringEditing value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getUpdateSummariesDuringEditing

      public boolean getUpdateSummariesDuringEditing()
      Should the summary row or group summaries be updated during editing of grid records? This can be set false to improve performance when a large number of ListGridFields or DataSourceFields are present for the grid.

      Note that summaries will always be updated when the edits are saved, so to avoid recalculation overhead when a row or cell edit is completed, you must also set autoSaveEdits: false. Summaries will then be updated upon your manual save, such as saveAllEdits().

      Returns:
      Current updateSummariesDuringEditing value. Default value is true
      See Also:
    • setUseAdvancedCriteria

      public ListGrid setUseAdvancedCriteria(Boolean useAdvancedCriteria)
      Should the filter-editor in this grid always produce AdvancedCriteria?
      Parameters:
      useAdvancedCriteria - New useAdvancedCriteria value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getUseAdvancedCriteria

      public Boolean getUseAdvancedCriteria()
      Should the filter-editor in this grid always produce AdvancedCriteria?
      Returns:
      Current useAdvancedCriteria value. Default value is null
      See Also:
    • setUseAdvancedFieldPicker

      public ListGrid setUseAdvancedFieldPicker(Boolean useAdvancedFieldPicker) throws IllegalStateException
      If set to true, an advanced field picker based on the FieldPicker will be shown instead of the column picker submenu if there are more fields in the grid than advancedFieldPickerThreshold.

      When there are large numbers of available fields, the FieldPicker-based interface is more usable for both defining visible fields and defining field order.

      Parameters:
      useAdvancedFieldPicker - New useAdvancedFieldPicker value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseAdvancedFieldPicker

      public Boolean getUseAdvancedFieldPicker()
      If set to true, an advanced field picker based on the FieldPicker will be shown instead of the column picker submenu if there are more fields in the grid than advancedFieldPickerThreshold.

      When there are large numbers of available fields, the FieldPicker-based interface is more usable for both defining visible fields and defining field order.

      Returns:
      Current useAdvancedFieldPicker value. Default value is false
    • setUseCellRollOvers

      public ListGrid setUseCellRollOvers(Boolean useCellRollOvers)
      Are rollovers cell-level or row-level?
      Parameters:
      useCellRollOvers - New useCellRollOvers value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getUseCellRollOvers

      public Boolean getUseCellRollOvers()
      Are rollovers cell-level or row-level?
      Returns:
      Current useCellRollOvers value. Default value is null
    • setUseClientFiltering

      public ListGrid setUseClientFiltering(Boolean useClientFiltering)
      Causes this grid to filter its data on the client where possible, eliminating trips to the server when criteria becomes more restrictive, since the filter must apply to data which is already on the client.

      This attribute is a shortcut to setting useClientFiltering on the grid's dataProperties and overrides any value set there.

      While the default value is null, the effective default is true, since useClientFiltering is true on ResultSet.

      Note that using client-filtering can avoid up to 90% of the most expensive database requests, so it's critical in most cases to leave it switched on. See the sample here.

      In cases where client-filtering alone is not sufficient, note the following:

      • You can easily prevent client-side filtering for a given field by setting filterOn:"serverOnly", if you can't replicate the filtering on the client.
      • an override of ResultSet.compareCriteria() can be used to handle any other, more complicated differences in client- vs server-side filtering that may arise for a single grid
      • a custom search operator can be used if you want to create custom filtering behavior which applies to a variety of different grids & DataSources
      Parameters:
      useClientFiltering - New useClientFiltering value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getUseClientFiltering

      public Boolean getUseClientFiltering()
      Causes this grid to filter its data on the client where possible, eliminating trips to the server when criteria becomes more restrictive, since the filter must apply to data which is already on the client.

      This attribute is a shortcut to setting useClientFiltering on the grid's dataProperties and overrides any value set there.

      While the default value is null, the effective default is true, since useClientFiltering is true on ResultSet.

      Note that using client-filtering can avoid up to 90% of the most expensive database requests, so it's critical in most cases to leave it switched on. See the sample here.

      In cases where client-filtering alone is not sufficient, note the following:

      • You can easily prevent client-side filtering for a given field by setting filterOn:"serverOnly", if you can't replicate the filtering on the client.
      • an override of ResultSet.compareCriteria() can be used to handle any other, more complicated differences in client- vs server-side filtering that may arise for a single grid
      • a custom search operator can be used if you want to create custom filtering behavior which applies to a variety of different grids & DataSources
      Returns:
      Current useClientFiltering value. Default value is null
    • setUseCopyPasteShortcuts

      public ListGrid setUseCopyPasteShortcuts(Boolean useCopyPasteShortcuts)
      For ListGrids with canSelectCells:true, enabling this property will cause the listGrid to intercept standard browser copy/paste shortcut keys and perform the following behavior.
      • ctrl+c: retrieve selected cell data via a call to getSelectedCellData(), and temporarily store it in memory in a "clipboard" variable.
      • ctrl+v: apply any previously copied data stored in the "clipboard" variable into the current grid selection via applyCellData().
      • ctrl+d: copy cell values from top row of selected cells down to all rows
      • ctrl+r: copy cell values from left column of selected cells right to all columns
      Note: setting this property to true will disable standard copy and paste behavior to the native Browser or OS-level clipboard. To copy data to and from applications outside of the browser, use the technique shown in the @see Grid to Excel and @see Excel to Grid samples.

      If this property is unset, default behavior will enable these shortcuts if canSelectCells is true, and canDragSelectText and selectCellTextOnClick are both false, so as to minimize the chances of interfering with native copy and paste of cell content.

      Parameters:
      useCopyPasteShortcuts - New useCopyPasteShortcuts value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
    • getUseCopyPasteShortcuts

      public Boolean getUseCopyPasteShortcuts()
      For ListGrids with canSelectCells:true, enabling this property will cause the listGrid to intercept standard browser copy/paste shortcut keys and perform the following behavior.
      • ctrl+c: retrieve selected cell data via a call to getSelectedCellData(), and temporarily store it in memory in a "clipboard" variable.
      • ctrl+v: apply any previously copied data stored in the "clipboard" variable into the current grid selection via applyCellData().
      • ctrl+d: copy cell values from top row of selected cells down to all rows
      • ctrl+r: copy cell values from left column of selected cells right to all columns
      Note: setting this property to true will disable standard copy and paste behavior to the native Browser or OS-level clipboard. To copy data to and from applications outside of the browser, use the technique shown in the @see Grid to Excel and @see Excel to Grid samples.

      If this property is unset, default behavior will enable these shortcuts if canSelectCells is true, and canDragSelectText and selectCellTextOnClick are both false, so as to minimize the chances of interfering with native copy and paste of cell content.

      Returns:
      Current useCopyPasteShortcuts value. Default value is null
    • setUseMultiSelectForFilterValueMaps

      public ListGrid setUseMultiSelectForFilterValueMaps(boolean useMultiSelectForFilterValueMaps)
      If showFilterEditor is true, when creating a SelectItem for editing criteria for a field with a ValueMap, should the SelectItem default to multiple:true?

      This overrides SearchForm.useMultiSelectForValueMaps on the filterEditor's edit form.

      Note : This is an advanced setting

      Parameters:
      useMultiSelectForFilterValueMaps - New useMultiSelectForFilterValueMaps value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getUseMultiSelectForFilterValueMaps

      public boolean getUseMultiSelectForFilterValueMaps()
      If showFilterEditor is true, when creating a SelectItem for editing criteria for a field with a ValueMap, should the SelectItem default to multiple:true?

      This overrides SearchForm.useMultiSelectForValueMaps on the filterEditor's edit form.

      Returns:
      Current useMultiSelectForFilterValueMaps value. Default value is true
    • setUseRemoteValidators

      public ListGrid setUseRemoteValidators(Boolean useRemoteValidators)
      If saveLocally is specified, but this grid is bound to a DataSource which includes remote field validators, by default edits will be saved synchronously and these validators will not be executed.
      Set this property to true to ensure these remote validators are called when saving edits in saveLocally mode. Note that since these remote validators need to run on the server, saving with this property set is asynchronous, even though the data that ultimately gets updated is already present on the client.

      Note : This is an advanced setting

      Parameters:
      useRemoteValidators - New useRemoteValidators value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getUseRemoteValidators

      public Boolean getUseRemoteValidators()
      If saveLocally is specified, but this grid is bound to a DataSource which includes remote field validators, by default edits will be saved synchronously and these validators will not be executed.
      Set this property to true to ensure these remote validators are called when saving edits in saveLocally mode. Note that since these remote validators need to run on the server, saving with this property set is asynchronous, even though the data that ultimately gets updated is already present on the client.
      Returns:
      Current useRemoteValidators value. Default value is null
      See Also:
    • setUseRowSpanStyling

      public ListGrid setUseRowSpanStyling(Boolean useRowSpanStyling) throws IllegalStateException
      Enables various styling behaviors that potentially make sense when getRowSpan() has been overridden to introduce spanning cells, and spanning is largest on the left and smaller as cells go to the right. Specifically:

      Because this setting enables canSelectCells, it is incompatible with any APIs that expect a record-oriented data model.

      Because this setting only makes sense when row spanning decreases from the first column to the last, it has unspecified behavior with canReorderFields.

      Parameters:
      useRowSpanStyling - New useRowSpanStyling value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseRowSpanStyling

      public Boolean getUseRowSpanStyling()
      Enables various styling behaviors that potentially make sense when getRowSpan() has been overridden to introduce spanning cells, and spanning is largest on the left and smaller as cells go to the right. Specifically:

      Because this setting enables canSelectCells, it is incompatible with any APIs that expect a record-oriented data model.

      Because this setting only makes sense when row spanning decreases from the first column to the last, it has unspecified behavior with canReorderFields.

      Returns:
      Current useRowSpanStyling value. Default value is null
    • setValidateByCell

      public ListGrid setValidateByCell(Boolean validateByCell)
      Whether client-side validation checks should be performed when the user moves between cells in the current edit row. If unset, defaults to editByCell.

      Note that validation always occurs when a row is to be saved, so setting saveByCell:true forces validation on cell transitions. To completely disable automatic validation, set neverValidate:true.

      Parameters:
      validateByCell - New validateByCell value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getValidateByCell

      public Boolean getValidateByCell()
      Whether client-side validation checks should be performed when the user moves between cells in the current edit row. If unset, defaults to editByCell.

      Note that validation always occurs when a row is to be saved, so setting saveByCell:true forces validation on cell transitions. To completely disable automatic validation, set neverValidate:true.

      Returns:
      Current validateByCell value. Default value is null
      See Also:
    • setValidateOnChange

      public ListGrid setValidateOnChange(Boolean validateOnChange)
      If true, validation will be performed on each edited cell when each editor's "change" handler is fired.
      Parameters:
      validateOnChange - New validateOnChange value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getValidateOnChange

      public Boolean getValidateOnChange()
      If true, validation will be performed on each edited cell when each editor's "change" handler is fired.
      Returns:
      Current validateOnChange value. Default value is null
      See Also:
    • setValueIconHeight

      public ListGrid setValueIconHeight(Integer valueIconHeight)
      Height for value icons for this listGrid. Overrides valueIconSize. Can be overridden at the field level
      Parameters:
      valueIconHeight - New valueIconHeight value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getValueIconHeight

      public Integer getValueIconHeight()
      Height for value icons for this listGrid. Overrides valueIconSize. Can be overridden at the field level
      Returns:
      Current valueIconHeight value. Default value is null
      See Also:
    • setValueIconLeftPadding

      public ListGrid setValueIconLeftPadding(int valueIconLeftPadding)
      How much padding should there be on the left of valueIcons by default Can be overridden at the field level
      Parameters:
      valueIconLeftPadding - New valueIconLeftPadding value. Default value is 2
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getValueIconLeftPadding

      public int getValueIconLeftPadding()
      How much padding should there be on the left of valueIcons by default Can be overridden at the field level
      Returns:
      Current valueIconLeftPadding value. Default value is 2
      See Also:
    • setValueIconRightPadding

      public ListGrid setValueIconRightPadding(int valueIconRightPadding)
      How much padding should there be on the right of valueIcons by default
      Parameters:
      valueIconRightPadding - New valueIconRightPadding value. Default value is 2
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getValueIconRightPadding

      public int getValueIconRightPadding()
      How much padding should there be on the right of valueIcons by default
      Returns:
      Current valueIconRightPadding value. Default value is 2
      See Also:
    • setValueIconSize

      public ListGrid setValueIconSize(int valueIconSize)
      Default width and height of value icons for this ListGrid. Can be overridden at the listGrid level via explicit valueIconWidth and valueIconHeight, or at the field level via ListGridField.valueIconSize, ListGridField.valueIconWidth and {ListGridField.valueIconHeight}
      Parameters:
      valueIconSize - New valueIconSize value. Default value is 16
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getValueIconSize

      public int getValueIconSize()
      Default width and height of value icons for this ListGrid. Can be overridden at the listGrid level via explicit valueIconWidth and valueIconHeight, or at the field level via ListGridField.valueIconSize, ListGridField.valueIconWidth and {ListGridField.valueIconHeight}
      Returns:
      Current valueIconSize value. Default value is 16
      See Also:
    • setValueIconWidth

      public ListGrid setValueIconWidth(Integer valueIconWidth)
      Width for value icons for this listGrid. Overrides valueIconSize. Can be overridden at the field level
      Parameters:
      valueIconWidth - New valueIconWidth value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getValueIconWidth

      public Integer getValueIconWidth()
      Width for value icons for this listGrid. Overrides valueIconSize. Can be overridden at the field level
      Returns:
      Current valueIconWidth value. Default value is null
      See Also:
    • setViewState

      public ListGrid setViewState(String viewState)
      Initial view state may be provided for the listGrid at init time. To set view state at runtime, use setViewState().
      See ListGridViewState for details of what is included in the viewState for a ListGrid by default.

      View state is a composite object containing various more granular states such as fieldState, current filter criteria, etc. As such it is not necessary to specificify fieldState, etc. in addition to viewState at init time, but if both are provided the specific states (fieldState, etc) will have priority.

      Note: For Smart GWT Pro users, the Saved Search subsystem provides a sophisticated, out of the box set of capabilities and user-interface components for users to store and apply multiple named views or "saved searches". See canSaveSearches for how to enable menu options to save searches in grids. Note that each saved search includes the full view state for the grid by default.

      If this method is called after the component has been drawn/initialized: Reset this grid's view state to match the ListGridViewState object passed in.
      Used to restore previous state retrieved from the grid by a call to getViewState().

      Parameters:
      viewState - Object describing the desired view state for the grid. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getViewState

      public String getViewState()
      Initial view state may be provided for the listGrid at init time. To set view state at runtime, use setViewState().
      See ListGridViewState for details of what is included in the viewState for a ListGrid by default.

      View state is a composite object containing various more granular states such as fieldState, current filter criteria, etc. As such it is not necessary to specificify fieldState, etc. in addition to viewState at init time, but if both are provided the specific states (fieldState, etc) will have priority.

      Note: For Smart GWT Pro users, the Saved Search subsystem provides a sophisticated, out of the box set of capabilities and user-interface components for users to store and apply multiple named views or "saved searches". See canSaveSearches for how to enable menu options to save searches in grids. Note that each saved search includes the full view state for the grid by default.

      Returns:
      Returns a snapshot of the current view state of this ListGrid.
      This includes the field, sort, hilite, group, and selected state of the grid, its criteria and, when canShowFilterEditor is true, whether the filter-editor is visible, returned as a string representation of a ListGridViewState object.
      This string can be stored over page-reloads (for example, in browser local storage or as field value in a record stored to a DataSource) and then reapplied to the grid via setViewState() later to reset the grid to to the current state (assuming the same data / fields are present).

      To detect when view state changes, developers may use the viewStateChanged event.

      Note that the autoPersistViewState feature will automatically persist the view state to Offline storage and reapply when the grid is reloaded, without the need to invoke this method explicitly. Default value is null

      See Also:
    • setVirtualScrolling

      public ListGrid setVirtualScrolling(Boolean virtualScrolling) throws IllegalStateException
      When incremental rendering is switched on and there are variable record heights, the virtual scrolling mechanism manages the differences in scroll height calculations due to the unknown sizes of un-rendered rows to make the scrollbar and viewport appear correctly.

      When the virtualScrolling system is active, the last scroll position scrolls the last record to the top of the viewport, leaving blank space underneath. This is a necessary and unavoidable consequence of mapping the position of the scrollbar thumb to an unknown amount of remaining space without being able to know the total scrollable area in advance (since record heights vary).

      virtualScrolling is switched on automatically when fixedRecordHeights is false and also when using the recordComponents subsystem, as recordComponents expand the rows that contain them. This flag should be manually enabled when calling addEmbeddedComponent() if embedded components can cause record sizes to expand beyond specified cellHeight.

      virtualScrolling is also automatically enabled when canExpandRecords is true to handle the fact that expanded rows may render at variable heights.

      Note : This is an advanced setting

      Parameters:
      virtualScrolling - New virtualScrolling value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getVirtualScrolling

      public Boolean getVirtualScrolling()
      When incremental rendering is switched on and there are variable record heights, the virtual scrolling mechanism manages the differences in scroll height calculations due to the unknown sizes of un-rendered rows to make the scrollbar and viewport appear correctly.

      When the virtualScrolling system is active, the last scroll position scrolls the last record to the top of the viewport, leaving blank space underneath. This is a necessary and unavoidable consequence of mapping the position of the scrollbar thumb to an unknown amount of remaining space without being able to know the total scrollable area in advance (since record heights vary).

      virtualScrolling is switched on automatically when fixedRecordHeights is false and also when using the recordComponents subsystem, as recordComponents expand the rows that contain them. This flag should be manually enabled when calling addEmbeddedComponent() if embedded components can cause record sizes to expand beyond specified cellHeight.

      virtualScrolling is also automatically enabled when canExpandRecords is true to handle the fact that expanded rows may render at variable heights.

      Returns:
      Current virtualScrolling value. Default value is null
      See Also:
    • setWaitForSave

      public ListGrid setWaitForSave(Boolean waitForSave)
      If this is an editable listGrid, this property determines whether the user will be able to dismiss the edit form, or navigate to another cell while the save is in process (before the asynchronous server response returns).

      Note : This is an advanced setting

      Parameters:
      waitForSave - New waitForSave value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getWaitForSave

      public Boolean getWaitForSave()
      If this is an editable listGrid, this property determines whether the user will be able to dismiss the edit form, or navigate to another cell while the save is in process (before the asynchronous server response returns).
      Returns:
      Current waitForSave value. Default value is false
      See Also:
    • setWarnOnRemoval

      public ListGrid setWarnOnRemoval(Boolean warnOnRemoval)
      If canRemoveRecords is true, when the user clicks the remove icon for some record, should we show a warning message (defined as warnOnRemovalMessage) and allow the user to cancel removal?
      Parameters:
      warnOnRemoval - New warnOnRemoval value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
    • getWarnOnRemoval

      public Boolean getWarnOnRemoval()
      If canRemoveRecords is true, when the user clicks the remove icon for some record, should we show a warning message (defined as warnOnRemovalMessage) and allow the user to cancel removal?
      Returns:
      Current warnOnRemoval value. Default value is false
    • setWarnOnRemovalMessage

      public ListGrid setWarnOnRemovalMessage(String warnOnRemovalMessage)
      Warning message to show the user on a click on the 'remove' icon if canRemoveRecords is true and warnOnRemoval is true.
      Parameters:
      warnOnRemovalMessage - New warnOnRemovalMessage value. Default value is "Are you sure you want to delete this record?"
      Returns:
      ListGrid instance, for chaining setter calls
    • getWarnOnRemovalMessage

      public String getWarnOnRemovalMessage()
      Warning message to show the user on a click on the 'remove' icon if canRemoveRecords is true and warnOnRemoval is true.
      Returns:
      Current warnOnRemovalMessage value. Default value is "Are you sure you want to delete this record?"
    • setWarnOnUnmappedValueFieldChange

      public ListGrid setWarnOnUnmappedValueFieldChange(Boolean warnOnUnmappedValueFieldChange)
      If a field has ListGridField.displayField specified and has no ListGridField.optionDataSource, this field will display the value from the displayField of each record by default (for more on this behavior see ListGridField.optionDataSource).

      If such a field is editable, changing the edit value for the field on some record, without updating the edit value for the associated display field on the same record would mean the user would continue to see the unchanged display field value. Developers can resolve this situation by programmatically setting an edit value for the display field as well as the data field, or avoid it by specifying an optionDataSource and ensuring autoFetchDisplayMap is true, or setting an explicit valueMap for the field.

      By default, when the edit value on a field with a specified displayField and no optionDataSource is set, we log a warning to notify the developer. This warning may be disabled by setting warnOnUnmappedValueFieldChange to false.

      Note: There are actually a couple of cases in which the system will automatically derive a new display-field value and apply it to the record:

      1. If the edit value was changed by a user actually editing the record (rather than a programmatic call to setEditValue()), and the edit-item had a valueMap or optionDataSource set, we automatically pick up the display value from that item and store it as an edit-value for the displayField of the record
      2. If the listGrid has a loaded record in its data set whose valueField value matches the edit value for the valueField, we automatically apply the displayField value from that record as an edit value for the displayField on the newly edited record.
      In either case, the display value for the record is updated automatically (and the warning would not be logged).

      Note : This is an advanced setting

      Parameters:
      warnOnUnmappedValueFieldChange - New warnOnUnmappedValueFieldChange value. Default value is true
      Returns:
      ListGrid instance, for chaining setter calls
    • getWarnOnUnmappedValueFieldChange

      public Boolean getWarnOnUnmappedValueFieldChange()
      If a field has ListGridField.displayField specified and has no ListGridField.optionDataSource, this field will display the value from the displayField of each record by default (for more on this behavior see ListGridField.optionDataSource).

      If such a field is editable, changing the edit value for the field on some record, without updating the edit value for the associated display field on the same record would mean the user would continue to see the unchanged display field value. Developers can resolve this situation by programmatically setting an edit value for the display field as well as the data field, or avoid it by specifying an optionDataSource and ensuring autoFetchDisplayMap is true, or setting an explicit valueMap for the field.

      By default, when the edit value on a field with a specified displayField and no optionDataSource is set, we log a warning to notify the developer. This warning may be disabled by setting warnOnUnmappedValueFieldChange to false.

      Note: There are actually a couple of cases in which the system will automatically derive a new display-field value and apply it to the record:

      1. If the edit value was changed by a user actually editing the record (rather than a programmatic call to setEditValue()), and the edit-item had a valueMap or optionDataSource set, we automatically pick up the display value from that item and store it as an edit-value for the displayField of the record
      2. If the listGrid has a loaded record in its data set whose valueField value matches the edit value for the valueField, we automatically apply the displayField value from that record as an edit value for the displayField on the newly edited record.
      In either case, the display value for the record is updated automatically (and the warning would not be logged).
      Returns:
      Current warnOnUnmappedValueFieldChange value. Default value is true
    • setWrapCells

      public ListGrid setWrapCells(Boolean wrapCells)
      Should content within cells be allowed to wrap?

      Even if content is allowed to wrap, if fixedRecordHeights is set, the content will be clipped off at the cell boundary. Either set a larger, fixed cellHeight to reveal more content, or set fixedRecordHeights to false to allow auto-sizing.

      If this method is called after the component has been drawn/initialized: Setter for wrapCells

      Note : This is an advanced setting

      Parameters:
      wrapCells - New wrapCells value. Default value is false
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • getWrapCells

      public Boolean getWrapCells()
      Should content within cells be allowed to wrap?

      Even if content is allowed to wrap, if fixedRecordHeights is set, the content will be clipped off at the cell boundary. Either set a larger, fixed cellHeight to reveal more content, or set fixedRecordHeights to false to allow auto-sizing.

      Returns:
      Current wrapCells value. Default value is false
      See Also:
    • setWrapHeaderSpanTitles

      public ListGrid setWrapHeaderSpanTitles(Boolean wrapHeaderSpanTitles) throws IllegalStateException
      If HeaderSpan.wrap is not explicitly set, should fields wrap? If autofitting, see the docs on that property for the details of how the minimum width for a field is determined.
      Parameters:
      wrapHeaderSpanTitles - New wrapHeaderSpanTitles value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getWrapHeaderSpanTitles

      public Boolean getWrapHeaderSpanTitles()
      If HeaderSpan.wrap is not explicitly set, should fields wrap? If autofitting, see the docs on that property for the details of how the minimum width for a field is determined.
      Returns:
      Current wrapHeaderSpanTitles value. Default value is null
      See Also:
    • setWrapHeaderTitles

      public ListGrid setWrapHeaderTitles(Boolean wrapHeaderTitles) throws IllegalStateException
      If ListGridField.wrap is not explicitly set, should fields wrap? If autofitting, see the docs on that property for the details of how the minimum width for a field is determined.
      Parameters:
      wrapHeaderTitles - New wrapHeaderTitles value. Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getWrapHeaderTitles

      public Boolean getWrapHeaderTitles()
      If ListGridField.wrap is not explicitly set, should fields wrap? If autofitting, see the docs on that property for the details of how the minimum width for a field is determined.
      Returns:
      Current wrapHeaderTitles value. Default value is null
      See Also:
    • addData

      public void addData(Record newRecord)
      Perform a DataSource "add" operation to add new records to this component's DataSource.
      Parameters:
      newRecord - new record
      See Also:
    • addData

      public void addData(Record newRecord, DSCallback callback)
      See Also:
    • addData

      public void addData(Record newRecord, DSCallback callback, DSRequest requestProperties)
      Perform a DataSource "add" operation to add new records to this component's DataSource.
      Parameters:
      newRecord - new record
      callback - method to call on operation completion
      requestProperties - additional properties to set on the DSRequest that will be issued
      See Also:
    • addEmbeddedComponent

      public void addEmbeddedComponent(Canvas component, ListGridRecord record)
      Attaches the component to the provided record. If position is specified as "within" Canvas.snapTo and Canvas.snapOffsetLeft, Canvas.snapOffsetTop may be set to specify where the component will render within the cell or record. If unset, for components embedded within a record we will default to embedding at the top/left coordinate, and for components embedded within a cell, we will respect the align / valign properties for the cell in question. Any percentage sizing will be interpreted as percentage of row size.

      Otherwise it will appear to be embedded within the record, underneath the field values.

      Embedded components become children of the grid and will stay attached to a record through scrolling, sorting and other operations that cause records to shift position.

      If position is set to "expand", embedded components may offer a resize interface, eg, by setting canDragResize:true, and the grid will react accordingly, growing or shrinking the record to match the embedded component's new extents.

      Embedded components can be explicitly removed with removeEmbeddedComponent().

      If a record is removed from the dataset or is replaced in the dataset, for example, it is eliminated through filtering (removes record) or is successfully edited in a databound grid (replaces record), the component is cleared but not logically removed from the grid. It is the responsibility of code that sets up the embedded component to remove it if the record is removed from the dataSet.

      When embedding components will result in variable height records, you should switch on virtualScrolling.

      Parameters:
      component - component to embed
      record - record to attach the component to
    • addEmbeddedComponent

      public void addEmbeddedComponent(Canvas component, ListGridRecord record, Integer rowNum)
      See Also:
    • addEmbeddedComponent

      public void addEmbeddedComponent(Canvas component, ListGridRecord record, Integer rowNum, Integer colNum)
      See Also:
    • addEmbeddedComponent

      public void addEmbeddedComponent(Canvas component, ListGridRecord record, Integer rowNum, Integer colNum, EmbeddedPosition position)
      Attaches the component to the provided record. If position is specified as "within" Canvas.snapTo and Canvas.snapOffsetLeft, Canvas.snapOffsetTop may be set to specify where the component will render within the cell or record. If unset, for components embedded within a record we will default to embedding at the top/left coordinate, and for components embedded within a cell, we will respect the align / valign properties for the cell in question. Any percentage sizing will be interpreted as percentage of row size.

      Otherwise it will appear to be embedded within the record, underneath the field values.

      Embedded components become children of the grid and will stay attached to a record through scrolling, sorting and other operations that cause records to shift position.

      If position is set to "expand", embedded components may offer a resize interface, eg, by setting canDragResize:true, and the grid will react accordingly, growing or shrinking the record to match the embedded component's new extents.

      Embedded components can be explicitly removed with removeEmbeddedComponent().

      If a record is removed from the dataset or is replaced in the dataset, for example, it is eliminated through filtering (removes record) or is successfully edited in a databound grid (replaces record), the component is cleared but not logically removed from the grid. It is the responsibility of code that sets up the embedded component to remove it if the record is removed from the dataSet.

      When embedding components will result in variable height records, you should switch on virtualScrolling.

      Parameters:
      component - component to embed
      record - record to attach the component to
      rowNum - rowNum of the record to attach the component to
      colNum - colNum in which to embed the component
      position - positioning with respect to the record or cell (Defaults to "expand").
    • addSort

      public void addSort(SortSpecifier sortSpecifier)
      Adds another SortSpecifier to this grid's sort configuration and resorts.
      Parameters:
      sortSpecifier - A SortSpecifier object indicating an additional field and direction to sort by
    • applyCellData

      public void applyCellData(RecordList cellData)
      Applies a set of Records containing coordinate-based data as returned by getSelectedCellData() and applies the data at the current selection.

      For consistency with Excel, given a record in the cellData, after the data value with the most negative column index is found, the rest of the values in the record are applied contiguously to the right of it, using the positional data for ordering only.

      Will only modify cells in the grid which are editable, and changes will be applied as editValues, exactly as though the user had typed the values in (see Grid Editing Overview).

      See also applyRecordData().

      Parameters:
      cellData - list of Records as described above
    • applyRecordData

      public void applyRecordData(RecordList recordData)
      Applies a list of Records as changes to the current selection.

      Values found in each of the passed records will be applied to the same-named fields in the Records starting from the top-left of the current selection, in order.

      Will only modify cells in the grid which are editable, and changes will be applied as editValues, exactly as though the user had typed the values in (see Grid Editing Overview).

      See also applyCellData().

      Parameters:
      recordData - list of Records as described above
    • applySortToData

      public void applySortToData(SortSpecifier... sortSpecifiers)
      Sort the grid's data to reflect the parameter sortSpecifiers.

      NOTE: This method is primarily used by setSort(); it is not intended to be called by user code, unless you are implementing a custom setSortHandler). For the normal use case, calling this method directly will fail to execute vital pre-steps. If you are not implementing a custom handler as described above, do not call this method directly - call setSort() instead.

      Parameters:
      sortSpecifiers - Array of SortSpecifier objects
    • askForSort

      public void askForSort()
      Show a dialog to configure the sorting of multiple fields on this component. Calls through to MultiSortDialog.askForSort(), passing this component as the fieldSource and the current sort-specification if there is one.

      The generated multiSortDialog can be customized via multiSortDialogDefaults, multiSortDialogProperties.

    • autoFitField

      public int autoFitField(String fieldName)
      Programmatically cause a field to auto-fit horizontally to it's contents or title.

      Does not establish permanent auto-fitting - use setAutoFitWidth() or setAutoFitFieldWidths() to do so.

      Note that unlike the ongoing autoFit set up by autoFitFieldWidths or ListGridField.autoFitWidth, any specified ListGridField.width will not be taken as a minimum width - the field may shrink below the current specified width when this method is run. However, ListGridField.minWidth will be respected.

      As with autoFitFieldWidths, the auto-fit sizing is determined via the autoFitWidthApproach.

      Parameters:
      fieldName -
      Returns:
      new width in pixels
    • autoFitFields

      public void autoFitFields()
      Perform a one-time horizontal auto-fit of the fields passed. Fields will be sized to match their contents or title (as specified in autoFitWidthApproach) Does not establish permanent auto-fitting - use setAutoFitWidth() to do so.

      Note that unlike the ongoing autoFit set up by autoFitFieldWidths or ListGridField.autoFitWidth, any specified ListGridField.width will not be taken as a minimum width - the field(s) may shrink below the current specified width when this method is run. However, ListGridField.minWidth will be respected.

      For information about auto-fitting specific fields, see ListGridField.autoFit.

    • autoFitFields

      public void autoFitFields(ListGridField... fields)
      Perform a one-time horizontal auto-fit of the fields passed. Fields will be sized to match their contents or title (as specified in autoFitWidthApproach) Does not establish permanent auto-fitting - use setAutoFitWidth() to do so.

      Note that unlike the ongoing autoFit set up by autoFitFieldWidths or ListGridField.autoFitWidth, any specified ListGridField.width will not be taken as a minimum width - the field(s) may shrink below the current specified width when this method is run. However, ListGridField.minWidth will be respected.

      For information about auto-fitting specific fields, see ListGridField.autoFit.

      Parameters:
      fields - Array of fields to auto fit. If this parameter is not passed, autoFitting will occur on all visible fields.
    • cancelEditing

      public void cancelEditing()
      Cancel the current edit without saving.
      See Also:
    • canEditCell

      public boolean canEditCell(int rowNum, int colNum)
      Can this cell be edited?

      The default implementation of canEditCell() respects the various property settings affecting editability:

      • field.canEdit can be set to disable editing for a field
      • If the grid is bound to a dataSource, the canEditFieldAttribute value on the dataSource field may enable / disable editing
      • a record with the recordEditProperty set to false is not editable
      • disabled records are not editable
      You can override this method to control editability on a cell-by-cell basis. For example, if you had a grid that allows editing of "orders", and you had a field "shipDate" that is normally editable, but should not be editable if the order is already "complete", you might implement canEditCell() as follows:

           public boolean canEditCell(int rowNum, int colNum) {
             Record record = this.getRecord(rowNum);
             String fieldName = this.getFieldName(colNum);
             if (fieldName.equals("shipDate") && record.getAttribute("orderStatus").equals("complete") {
               return false;
             }
             // use default rules for all other fields
             return super.canEditCell(rowNum, colNum);
           };
        

      Notes on providing custom implementations:

      • In order to allow complete control over editing, canEditCell() is called very frequently. If you see delays on row to row navigation, check that your implementation is efficient
      • If you change the editability of a cell on the fly, for example, during ListGrid.editorExit() on another cell, call refreshCell() to show or hide the editor
      • If this ListGrid allows new records to be created, canEditCell() may be called when there is no record available, in which case getRecord() will return null. The values input so far by the user are available via getEditValues().

      Note: This is an override point.

      For more information on editing, see the editing overview.

      Parameters:
      rowNum - row number for the cell
      colNum - column number of the cell
      Returns:
      Whether to allow editing this cell
      See Also:
    • canExpandRecord

      public boolean canExpandRecord(ListGridRecord record, int rowNum)
      Indicates whether a given record or rowNum can be expanded. The default implementation checks the value of canExpandRecords and record[canExpandRecordProperty].

      Override this method for more specific control over individual record expansion.

      Note: Rows with no underlying record in the data array - for example newly added edit rows that have not yet been saved - cannot be expanded.

      Parameters:
      record - record to work with
      rowNum - rowNum of the record to work with
      Returns:
      true if the record can be expanded
    • canSelectCell

      public boolean canSelectCell(int rowNum, int colNum)
      If canSelectCells is set to true then, whenever an end-user or programmatic cell-selection is attempted, this method is called for each cell in the selection. If it returns false, the cell will not be selected.
      Parameters:
      rowNum - rowNum being selected
      colNum - colNum being selected
      Returns:
      return false to disallow selection
    • addCellSavedHandler

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

      Fires after user edits have been successfully saved to the server, only for cells where the value was actually modified.

      If you want immediate notification of a changes before changes has been saved to the server, implement field.change() or field.changed() instead.

      You can alternatively use ListGridField.cellChanged() to get notification only of saved changes for a specific field. If both a listGridField and the containing listGrid have a handler for this event, only the handler defined on the field is called.

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

      public HandlerRegistration addCellClickHandler(CellClickHandler handler)
      Add a cellClick handler.

      Called when a cell receives a click event.

      Note that returning false from this method will not prevent any specified ListGrid.rowClick() handler from firing.

      Specified by:
      addCellClickHandler in interface HasCellClickHandlers
      Parameters:
      handler - the cellClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellContextClickHandler

      public HandlerRegistration addCellContextClickHandler(CellContextClickHandler handler)
      Add a cellContextClick handler.

      Called when a cell receives a contextclick event.

      Specified by:
      addCellContextClickHandler in interface HasCellContextClickHandlers
      Parameters:
      handler - the cellContextClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellDoubleClickHandler

      public HandlerRegistration addCellDoubleClickHandler(CellDoubleClickHandler handler)
      Add a cellDoubleClick handler.

      Called when a cell receives a double click event.

      Specified by:
      addCellDoubleClickHandler in interface HasCellDoubleClickHandlers
      Parameters:
      handler - the cellDoubleClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellErrorIconHoverHandler

      public HandlerRegistration addCellErrorIconHoverHandler(CellErrorIconHoverHandler handler)
      Add a cellErrorIconHover handler.

      Optional stringMethod to fire when the user hovers over the error icon of a cell with validation errors. The default behavior is to show a hover canvas containing the validation error message text. Call CellErrorIconHoverEvent.cancel() from within CellErrorIconHoverHandler.onCellErrorIconHover(com.smartgwt.client.widgets.grid.events.CellErrorIconHoverEvent) to suppress this default behavior.

      Specified by:
      addCellErrorIconHoverHandler in interface HasCellErrorIconHoverHandlers
      Parameters:
      handler - the cellErrorIconHover handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellErrorIconOutHandler

      public HandlerRegistration addCellErrorIconOutHandler(CellErrorIconOutHandler handler)
      Add a cellErrorIconOut handler.

      Optional stringMethod to fire when the mouse moves off the error icon of a cell with validation errors.

      Specified by:
      addCellErrorIconOutHandler in interface HasCellErrorIconOutHandlers
      Parameters:
      handler - the cellErrorIconOut handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellErrorIconOverHandler

      public HandlerRegistration addCellErrorIconOverHandler(CellErrorIconOverHandler handler)
      Add a cellErrorIconOver handler.

      Optional stringMethod to fire when the mouse moves over the error icon of a cell with validation errors.

      Specified by:
      addCellErrorIconOverHandler in interface HasCellErrorIconOverHandlers
      Parameters:
      handler - the cellErrorIconOver handler
      Returns:
      HandlerRegistration used to remove this handler
    • cellHasChanges

      public Boolean cellHasChanges(int rowNum, int colNum)
      If this listGrid can be edited, this method will return true if the cell passed in has been edited, but the edits have not yet been saved to the ListGrid's data object.
      Parameters:
      rowNum - index of row to check for changes
      colNum - index of the col to check for changes
      Returns:
      returns true if the cell has unsaved edits
      See Also:
    • cellHasErrors

      public Boolean cellHasErrors(int rowNum, String fieldID)
      Given a rowNum and a colNum or fieldName, determine whether we currently have stored validation errors for the record/field in question.
      Parameters:
      rowNum - index of row to check for validation errors
      fieldID - name of field, or index of column to check for validation errors
      Returns:
      true if we have validation errors for the row/col in question
      See Also:
    • addCellHoverHandler

      public HandlerRegistration addCellHoverHandler(CellHoverHandler handler)
      Add a cellHover handler.

      Called when the mouse hovers over a cell if this.canHover is true. To suppress the hover text from being shown if showHover is true for this or the field, cancel the CellHoverEvent. For example:

      grid.addCellHoverHandler(new CellHoverHandler() {
           @Override
           public void onCellHover(CellHoverEvent event) {
               if (/* some condition for when to suppress the hover */) {
                   event.cancel();
               }
           }
       });
      Specified by:
      addCellHoverHandler in interface HasCellHoverHandlers
      Parameters:
      handler - the cellHover handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellMouseDownHandler

      public HandlerRegistration addCellMouseDownHandler(CellMouseDownHandler handler)
      Add a cellMouseDown handler.

      Called when a cell receives a mousedown event.

      Specified by:
      addCellMouseDownHandler in interface HasCellMouseDownHandlers
      Parameters:
      handler - the cellMouseDown handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellMouseUpHandler

      public HandlerRegistration addCellMouseUpHandler(CellMouseUpHandler handler)
      Add a cellMouseUp handler.

      Called when a cell receives a mouseup event.

      Specified by:
      addCellMouseUpHandler in interface HasCellMouseUpHandlers
      Parameters:
      handler - the cellMouseUp handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellOutHandler

      public HandlerRegistration addCellOutHandler(CellOutHandler handler)
      Add a cellOut handler.

      Called when the mouse pointer leaves a cell

      Specified by:
      addCellOutHandler in interface HasCellOutHandlers
      Parameters:
      handler - the cellOut handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellOverHandler

      public HandlerRegistration addCellOverHandler(CellOverHandler handler)
      Add a cellOver handler.

      Called when the mouse pointer enters a cell

      Specified by:
      addCellOverHandler in interface HasCellOverHandlers
      Parameters:
      handler - the cellOver handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellSelectionChangedHandler

      public HandlerRegistration addCellSelectionChangedHandler(CellSelectionChangedHandler handler)
      Add a cellSelectionChanged handler.

      Called when (cell-based) selection changes within this grid.

      Specified by:
      addCellSelectionChangedHandler in interface HasCellSelectionChangedHandlers
      Parameters:
      handler - the cellSelectionChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addCellValueHoverHandler

      public HandlerRegistration addCellValueHoverHandler(CellValueHoverHandler handler)
      Add a cellValueHover handler.

      Optional stringMethod to fire when the user hovers over a cell and the value is clipped. If this.showClippedValuesOnHover is true, the default behavior is to show a hover canvas containing the HTML returned by cellValueHoverHTML(). Call CellValueHoverEvent.cancel() from within CellValueHoverHandler.onCellValueHover(com.smartgwt.client.widgets.grid.events.CellValueHoverEvent) to suppress this default behavior.

      Specified by:
      addCellValueHoverHandler in interface HasCellValueHoverHandlers
      Parameters:
      handler - the cellValueHover handler
      Returns:
      HandlerRegistration used to remove this handler
    • cellValueHoverHTML

      public String cellValueHoverHTML(ListGridRecord record, int rowNum, int colNum, String defaultHTML)
      Returns the HTML that is displayed by the default cellValueHover handler. Return null or an empty string to cancel the hover.

      Use setCellValueHoverFormatter() to provide a custom implementation.

      Parameters:
      record - cell record as returned by getCellRecord()
      rowNum - row number for the cell
      colNum - column number of the cell
      defaultHTML - the HTML that would have been displayed by default. See HTMLString
      Returns:
      HTML to be displayed in the hover. If null or an empty string, then the hover is canceled. See HTMLString
      See Also:
    • cellValueIsClipped

      public Boolean cellValueIsClipped(int rowNum, int colNum)
      Is the value in a given cell clipped?
      Parameters:
      rowNum - row number of the cell
      colNum - column number of the cell
      Returns:
      null if there is no cell at the given row, column; otherwise, whether the value in the specified cell is clipped.
      See Also:
    • chartData

      public FacetChart chartData(String labelField)
      Chart the data in this listGrid as a multi-series chart.

      Each row provides a series of data. Each series of data is labeled by a value from one column, called the labelField.

      For example, cell values are sales figures, and fields are "Product", "August", "September", "October". In this case each row gives a series: sales figures for each of 3 months. The labelField in this case is the "Product" field, meaning each row represents sales figures for each of 3 months for a particular product. This dataset can be charted via any multi-series chart: stacked or clustered bar or column chart, line chart with multiple lines, or area chart (stacked lines).

      By default, all visible fields other than the label field are assumed to be labels for series values, but an explicit list of fields can be provided as dataFields.

      By default, all data is charted if all data is loaded, otherwise, data visible in the viewport is charted. An explicit set of rows can be provided via dataRows.

      Parameters:
      labelField - name of the field
      Returns:
      created Chart instance
      See Also:
    • chartData

      public FacetChart chartData(String labelField, String[] dataFields)
      See Also:
    • chartData

      public FacetChart chartData(String labelField, String[] dataFields, ListGridRecord... dataRows)
      See Also:
    • chartData

      public FacetChart chartData(String labelField, String[] dataFields, ListGridRecord[] dataRows, FacetChart chartProperties)
      See Also:
    • chartData

      public FacetChart chartData(String labelField, String[] dataFields, ListGridRecord[] dataRows, FacetChart chartProperties, boolean labelFieldFirst)
      Chart the data in this listGrid as a multi-series chart.

      Each row provides a series of data. Each series of data is labeled by a value from one column, called the labelField.

      For example, cell values are sales figures, and fields are "Product", "August", "September", "October". In this case each row gives a series: sales figures for each of 3 months. The labelField in this case is the "Product" field, meaning each row represents sales figures for each of 3 months for a particular product. This dataset can be charted via any multi-series chart: stacked or clustered bar or column chart, line chart with multiple lines, or area chart (stacked lines).

      By default, all visible fields other than the label field are assumed to be labels for series values, but an explicit list of fields can be provided as dataFields.

      By default, all data is charted if all data is loaded, otherwise, data visible in the viewport is charted. An explicit set of rows can be provided via dataRows.

      Parameters:
      labelField - name of the field
      dataFields - optional list of fields to use as labels. By default, all fields are used.
      dataRows - set of records to chart. Can be obtained by eg grid.data.getRange().
      chartProperties - properties to pass to the created chart
      labelFieldFirst - if true, use the labelField as the "first" set of labels, for example, as the bar labels in a stacked bar chart, whereas the second set of labels would appear as the legend.
      Returns:
      created Chart instance
      See Also:
    • clearAllCriteria

      public void clearAllCriteria()
      This method, the equivalent of the builtin Clear Filter menu-item, clears all user-visible criteria applied to this grid, including values and filter-operators in the filter-row and criteria in the advanced filter window, and issues a re-filter.
    • clearCriteria

      public void clearCriteria()
      Clear the current criteria used to filter data. This method clears filter-values from fields in the filterEditor but will not change their current operator or clear associated operator-icons. See clearAllCriteria() for a means of doing that.
      See Also:
    • clearCriteria

      public void clearCriteria(DSCallback callback)
      See Also:
    • clearCriteria

      public void clearCriteria(DSCallback callback, DSRequest requestProperties)
      Clear the current criteria used to filter data. This method clears filter-values from fields in the filterEditor but will not change their current operator or clear associated operator-icons. See clearAllCriteria() for a means of doing that.
      Parameters:
      callback - callback to invoke on completion
      requestProperties - additional properties to set on the DSRequest that will be issued
      See Also:
    • clearFieldError

      public void clearFieldError(int rowNum, int fieldName)
      Clears any validation errors for some cell.
      Parameters:
      rowNum - row index of cell to add validation error for
      fieldName - col index or field name of cell to add validation error for
      See Also:
    • clearFieldSearchOperator

      public void clearFieldSearchOperator(String fieldName, Boolean suppressFilter)
      Clears the current search operator from a field in the grid's filter row. This will reset the field to its default operator and, unless alwaysShowOperatorIcon is true, hide the field's operatorIcon.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      If filterOnKeypress is true, a fetch may be issued when the operator is cleared - see setFieldSearchOperator() for details. To prevent this fetch, pass the suppressFilter parameter.

      To retrieve a field's current search operator, use getFieldSearchOperator(). To programmatically modify a field's current search operator, use setFieldSearchOperator().

      This method has no effect if no specific operator has been set on the field, either by the user or as a result of other criteria applied by setCriteria() or similar.

      Parameters:
      fieldName - name of the field to clear the search operator from
      suppressFilter - prevent this call from causing a filter as a result of operator change - clearing, eg, "isNull" criteria will cause a refilter
    • clearFilterWindowCriteria

      public void clearFilterWindowCriteria()
      Clears criteria applied to this grid via the advanced filter window and issues a re-filter.

      To clear all user-editable criteria, see clearAllCriteria().

    • clearRowErrors

      public void clearRowErrors(int rowNum)
      Clear any stored validation errors for some row
      Parameters:
      rowNum - index of row to clear validation error for
      See Also:
    • clearSavedViewState

      public void clearSavedViewState()
      Clear this grid's auto-saved view state as described in autoPersistViewState.
      See Also:
    • clearSort

      public void clearSort()
      This method clears any existing sort on this grid by calling setSort() with a null parameter. The internal list of SortSpecifiers is removed and the grid is unsorted.
    • closeGroup

      public boolean closeGroup(Record record)
      Closes the node represented by the "record" parameter, if it is a folder and is not already closed. This method only applies to grouped ListGrids.
      Parameters:
      record - node to close
      Returns:
      true if the node was closed, false if it was not (either because it is not a folder, or because it was already closed)
    • collapseRecord

      public void collapseRecord(ListGridRecord record)
      Collapses a given record which has been previously expanded using expandRecord().

      Depending on the pooling mode, this method may automatically destroy expansionComponents. By default, components created automatically by the ListGrid will be auto-destroyed. This behavior can be changed by setting a different pooling mode.

      Note that components created via an override to getExpansionComponent() will not be auto-destroyed - developers should override collapseRecord to take care of clean-up for such components.

      Parameters:
      record - record to collapse
    • collapseRecords

      public void collapseRecords(ListGridRecord... records)
      Collapses the passed list of expanded records. Calls collapseRecord for each passed record, but only marks the grid for redraw once, after all records have been collapsed.
      Parameters:
      records - records to collapse
    • configureGrouping

      public void configureGrouping()
      Open a MultiGroupDialog to configure the fields used for grouping.
    • createRecordComponent

      protected Canvas createRecordComponent(ListGridRecord record, Integer colNum)
      When showRecordComponents is true, this method is called to create per-row or per-cell embedded components to display in the grid.

      The colNum parameter is applicable only when showRecordComponentsByCell is true.

      If this row should not have a recordComponent, return null.

      This method should create and return a new component for the record passed in every time it is called and never return the same Canvas instance twice. To re-use components with different rows, set RecordComponentPoolingMode to "recycle". In this mode, in addition to implementing this method, developers should also implement updateRecordComponent() which allows already created components to be altered for re-use in new records. See the showRecordComponents overview for more information.

      Parameters:
      record - record to create a component for
      colNum - cell to which the component applies
      Returns:
      return the component to embed in the passed record
    • addCriteriaChangedHandler

      public HandlerRegistration addCriteriaChangedHandler(CriteriaChangedHandler handler)
      Add a criteriaChanged handler.

      Callback fired when the end-user changes criteria. This occurs via the +{FilterEditor} or +{showFilterWindow,advanced filtering} interface. It does not fire when a change is made via ListGrid.setCriteria(), ListGrid.fetchData(), ListGrid.setFilterWindowCriteria() or other APIs are called to change the criteria.

      Specified by:
      addCriteriaChangedHandler in interface HasCriteriaChangedHandlers
      Parameters:
      handler - the criteriaChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDataArrivedHandler

      public HandlerRegistration addDataArrivedHandler(DataArrivedHandler handler)
      Add a dataArrived handler.

      Notification method fired when new data arrives from the server to be displayed in this ListGrid, (for example in response to the user scrolling a new set of rows into view). Only applies to databound listGrids where the data attribute is a ResultSet. This ResultSet may have been created manually and applied to the grid via a call to ListGrid.setData() or may have been created and automatically assigned if ListGrid.fetchData() was used to populate the grid. This method is fired directly in response to dataArrived() firing on the data object.

      Note that dataArrived(), unlike ListGrid.dataChanged(), only fires in limited circumstances - when data for a ResultSet arrives from the server due to a fetch or cache invalidation, or as a result of filtering. If you want to catch all data changes, you should instead react to ListGrid.dataChanged().

      Specified by:
      addDataArrivedHandler in interface HasDataArrivedHandlers
      Parameters:
      handler - the dataArrived handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDataChangedHandler

      public HandlerRegistration addDataChangedHandler(DataChangedHandler handler)
      Add a dataChanged handler.

      Method invoked when changes to the listGrid's data occur. This method will perform the necessary actions to ensure the changes to the data are reflected in the user interface, and then invoked the ListGrid.dataChangedComplete() notification method.

      May be invoked by any of the following:

      Calling ListGrid.setData() will not call this method directly, but it may fire if one of the above listed events is triggered (e.g. a server fetch for ResultSet data).

      Note that the operationType parameter is optional and will be passed and contain the operation (e.g. "update") if this notification was triggered by a fetch, an ListGrid.addData(), ListGrid.updateData(), or ListGrid.removeData(), or a DataSource update for ResultSet data (the first three reasons listed above) but otherwise will be null.

      Specified by:
      addDataChangedHandler in interface HasDataChangedHandlers
      Parameters:
      handler - the dataChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • dataChangedComplete

      public void dataChangedComplete()
      Notification method fired when the grid data has changed.
    • dataChangedComplete

      public void dataChangedComplete(String operationType)
      Notification method fired when the grid data has changed.
      Parameters:
      operationType - optionally passed operation causing the change
    • deselectRange

      public void deselectRange(int startRow, int endRow)
      Deselect a contiguous range of records by index.

      This is a synonym for selectRange(startRow, endRow, false);

      Parameters:
      startRow - start of selection range
      endRow - end of selection range (non-inclusive)
      See Also:
    • discardAllEdits

      public void discardAllEdits()
      Cancel outstanding edits, discarding edit values, and hiding editors for the record[s] passed in if appropriate.

      If no rows are passed in, all outstanding edit values will be dropped. This will not automatically end editing; call endEditing() before calling discardAllEdits() if you also want to end editing.

      Note that this also clears the removed state of any records that have been marked as removed.

      See Also:
    • discardAllEdits

      public void discardAllEdits(int[] rows)
      See Also:
    • discardAllEdits

      public void discardAllEdits(int[] rows, boolean dontHideEditor)
      Cancel outstanding edits, discarding edit values, and hiding editors for the record[s] passed in if appropriate.

      If no rows are passed in, all outstanding edit values will be dropped. This will not automatically end editing; call endEditing() before calling discardAllEdits() if you also want to end editing.

      Note that this also clears the removed state of any records that have been marked as removed.

      Parameters:
      rows - allows you to specify which row(s) to drop edits for
      dontHideEditor - By default this method will hide the editor if it is currently showing for any row in the grid. Passing in this parameter will leave the editor visible (and just reset the edit values underneath the editor).
      See Also:
    • discardEdits

      public void discardEdits(int rowNum, int colNum)
      Cancel outstanding edits for the specified rows, discarding edit values, and hiding editors if appropriate.

      Note that if this method is called on a new edit row (created via startEditingNew() for example), which has not yet been saved, this method will remove the row entirely.

      Also note that this method will clear the removed state of records that have been marked as removed.

      Parameters:
      rowNum - Row to cancel
      colNum - Column to cancel. Note that this parameter is ignored in ListGrids but may be required in subclasses of ListGrid where each cell represents one record in the data set (EG CubeGrid)
      See Also:
    • discardEdits

      public void discardEdits(int rowNum, int colNum, Boolean dontHideEditor)
      Cancel outstanding edits for the specified rows, discarding edit values, and hiding editors if appropriate.

      Note that if this method is called on a new edit row (created via startEditingNew() for example), which has not yet been saved, this method will remove the row entirely.

      Also note that this method will clear the removed state of records that have been marked as removed.

      Parameters:
      rowNum - Row to cancel
      colNum - Column to cancel. Note that this parameter is ignored in ListGrids but may be required in subclasses of ListGrid where each cell represents one record in the data set (EG CubeGrid)
      dontHideEditor - By default this method will hide the editor if it is currently showing for the row in question. Passing in this parameter will leave the editor visible (and just reset the edit values underneath the editor).
      See Also:
    • displaySort

      public void displaySort(SortSpecifier... sortSpecifiers)
      Modify the grid UI to reflect the parameter sortSpecifiers. For a single sortSpecifier, this consists of marking the field with a directional arrow in its header button (if it visible).

      If multiple fields are sorted, those that are visible show a directional icon and a small sort-numeral indicating that field's index in the sort configuration.

      See addSort() and toggleSort() APIs for information on making changes to the current sort configuration.

      NOTE: This method is primarily used by setSort(); it is not intended to be called by user code, unless you are implementing a custom setSortHandler). For the normal use case, calling this method directly will fail to execute vital pre-steps. If you are not implementing a custom handler as described above, do not call this method directly - call setSort() instead.

      Parameters:
      sortSpecifiers - Array of SortSpecifier objects
    • addDrawAreaChangedHandler

      public HandlerRegistration addDrawAreaChangedHandler(DrawAreaChangedHandler handler)
      Add a drawAreaChanged handler.

      Notification method that fires when the drawArea changes due to scrolling. Receives the previous drawArea co-ordinates as parameters. Call ListGrid.getDrawArea() to get the new drawArea co-ordinates.

      Note that if this grid is showing any frozen fields, they will not be included in the oldStartCol, oldEndCol range reported by this method. Frozen fields are assumed never to be scrolled out of view.

      Specified by:
      addDrawAreaChangedHandler in interface HasDrawAreaChangedHandlers
      Parameters:
      handler - the drawAreaChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • drop

      public boolean drop()
      Handle a drop event. Default implementation supports moving data within this grid or transferring data into the grid from some other component.

      Developers wishing to implement custom listGrid record drag and drop behavior should typically use the recordDrop() method rather than overriding this method directly.

      Returns:
      true for completion of a successful drag/drop interaction
      See Also:
    • addEditCompleteHandler

      public HandlerRegistration addEditCompleteHandler(EditCompleteHandler handler)
      Add a editComplete handler.

      Callback fired when inline edits have been successfully saved.

      No default implementation.

      Specified by:
      addEditCompleteHandler in interface HasEditCompleteHandlers
      Parameters:
      handler - the editComplete handler
      Returns:
      HandlerRegistration used to remove this handler
    • editExistingRecord

      public void editExistingRecord()
      Start inline editing at a record identified by criteria. If the criteria matches more than one record, the first matched record is edited. Additionally, if the record to be edited is not visible, the record will be scrolled into view.

      Note that the record to be matched must already be loaded in the grid - no fetch will be performed.

      See Also:
    • editExistingRecord

      public void editExistingRecord(Criteria criteria)
      Start inline editing at a record identified by criteria. If the criteria matches more than one record, the first matched record is edited. Additionally, if the record to be edited is not visible, the record will be scrolled into view.

      Note that the record to be matched must already be loaded in the grid - no fetch will be performed.

      Parameters:
      criteria - Criteria identifying the existing row to edit
      See Also:
    • addEditFailedHandler

      public HandlerRegistration addEditFailedHandler(EditFailedHandler handler)
      Add a editFailed handler.

      Called when an attempt to save inline edits fails, due to a validation error or other server error.

      The default implementation of editFailed does nothing for normal validation errors, which are displayed before editFailed() is called. For any other errors, the default implementation will call HandleErrorCallback.handleError(), which by default will result in a warning dialog.

      Specified by:
      addEditFailedHandler in interface HasEditFailedHandlers
      Parameters:
      handler - the editFailed handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEditorEnterHandler

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

      Callback fired when the user starts editing a new cell.

      This callback is typically used to establish dynamic default values via ListGrid.setEditValue() or ListGrid.setEditValues().

      Can also be overridden on a per-field basis via field.editorEnter.

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

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

      Callback fired when the user attempts to navigate away from the current edit cell, or complete the current edit.

      Call EditorExitEvent.cancel() from within EditorExitHandler.onEditorExit(com.smartgwt.client.widgets.grid.events.EditorExitEvent) from this method to cancel the default behavior (Saving / cancelling the current edit / moving to the next edit cell).

      This callback is typically used to dynamically update values or value maps for related fields (via ListGrid.setEditValue() and ListGrid.setEditorValueMap() respectively, or to implement custom navigation (via startEditing(rowNum,colNum).

      Can be overridden at the field level as field.editorExit.

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

      public void endEditing()
      Complete the current edit by storing the value and hiding the inline editor. Note that if autoSaveEdits is true, the value will be saved to the server.
      See Also:
    • expandRecord

      public void expandRecord(ListGridRecord record)
      Expands a given record by creating a subcomponent and inserting it in to the record's grid-row. A number of built-in expansionModes are supported by the default implementation of getExpansionComponent() and you can override that method to provide your own expansion behavior.

      Once a record has been expanded, the currently visible expansion component may be retrieved via getCurrentExpansionComponent().

      Parameters:
      record - record to expand
    • expandRecords

      public void expandRecords(ListGridRecord... records)
      Expands the passed list of records by creating a subcomponent for each record and inserting them it in to the record's grid-row. Calls expandRecord for each passed record, but only marks the grid for redraw once, after all expansions are complete.
      Parameters:
      records - records to expand
    • exportClientData

      public void exportClientData()
      Exports this component's data with client-side formatters applied, so is suitable for direct display to users, using the specified export format.

      A variety of DSRequest settings, such as exportAs and DSRequest.exportFilename, affect the exporting process: see exportResults for further detail.

      If this component is databound and not all records that match the current filter-criteria have been loaded, you can call loadAllRecords() - this method accepts a callback which is fired when all necessary data has arrived. When that callback fires, a call to exportClientData will have access to the full dataset for the filter.

      This feature requires the Smart GWT server.

      If your ListGrid has custom formatters, formatted values will be exported by default, with HTML normalized to text where possible. Since some levels of HTML normalizing aren't possible, this may result in missing or incorrect export values. In this case, you have three options:

      • Set exportRawValues on the field. This will export the raw underlying value of the field; your formatter will not be called
      • Have your formatter call isExportingClientData() and perform whatever alternative formatting you require if that method returns true
      • Set exportRawNumbers on the field. This will export the raw underlying number of the field; your formatter will not be called
      Note that during export, the ListGridField.escapeHTML setting on a field determines how escaped and unescaped HTML values are handled. In particular, if escapeHTML is not set for a field, a value like "<FOO>" will be exported as the empty string, and you'd need the escaped value "&lt;FOO&gt;" to end up exporting "<FOO>".

      Ordinarily, calls to this method go through the static classMethod DataSource.exportClientData(). In this case, no server-side DataSources are required. However, if this component is databound and you specify a valid operationId in the properties passed to this method, the call will go through the instance method DataSource.exportClientData() instead. As the documentation for that method explains, this allows you more control on the server side. This approach requires both the Smart GWT server and server-side DataSource definitions.

      To export data from this component's dataSource, see exportData, which does not include client-side formatters, but does include formatters declared in the .ds.xml file. exportData() relies on both the Smart GWT server and server-side DataSources.

      See Also:
    • exportClientData

      public void exportClientData(DSRequest requestProperties)
      See Also:
    • exportClientData

      public void exportClientData(DSRequest requestProperties, RPCCallback callback)
      Exports this component's data with client-side formatters applied, so is suitable for direct display to users, using the specified export format.

      A variety of DSRequest settings, such as exportAs and DSRequest.exportFilename, affect the exporting process: see exportResults for further detail.

      If this component is databound and not all records that match the current filter-criteria have been loaded, you can call loadAllRecords() - this method accepts a callback which is fired when all necessary data has arrived. When that callback fires, a call to exportClientData will have access to the full dataset for the filter.

      This feature requires the Smart GWT server.

      If your ListGrid has custom formatters, formatted values will be exported by default, with HTML normalized to text where possible. Since some levels of HTML normalizing aren't possible, this may result in missing or incorrect export values. In this case, you have three options:

      • Set exportRawValues on the field. This will export the raw underlying value of the field; your formatter will not be called
      • Have your formatter call isExportingClientData() and perform whatever alternative formatting you require if that method returns true
      • Set exportRawNumbers on the field. This will export the raw underlying number of the field; your formatter will not be called
      Note that during export, the ListGridField.escapeHTML setting on a field determines how escaped and unescaped HTML values are handled. In particular, if escapeHTML is not set for a field, a value like "<FOO>" will be exported as the empty string, and you'd need the escaped value "&lt;FOO&gt;" to end up exporting "<FOO>".

      Ordinarily, calls to this method go through the static classMethod DataSource.exportClientData(). In this case, no server-side DataSources are required. However, if this component is databound and you specify a valid operationId in the properties passed to this method, the call will go through the instance method DataSource.exportClientData() instead. As the documentation for that method explains, this allows you more control on the server side. This approach requires both the Smart GWT server and server-side DataSource definitions.

      To export data from this component's dataSource, see exportData, which does not include client-side formatters, but does include formatters declared in the .ds.xml file. exportData() relies on both the Smart GWT server and server-side DataSources.

      Parameters:
      requestProperties - Request properties for the export. Note that specifying exportData on the request properties allows the developer to pass in an explicit data set to export.
      callback - Optional callback. If you specify exportToClient: false in the request properties, this callback will fire after export completes. Otherwise the callback will fire right before the download request is made to the server.
      See Also:
    • fetchRelatedData

      public void fetchRelatedData(ListGridRecord record, Canvas schema)
      Based on the relationship between the DataSource this component is bound to and the DataSource specified as the "schema" argument, call fetchData() to retrieve records in this grid that are related to the passed-in record.

      Relationships between DataSources are declared via DataSourceField.foreignKey.

      For example, given two related DataSources "orders" and "orderItems", where we want to fetch the "orderItems" that belong to a given "order". "orderItems" should declare a field that is a foreignKey to the "orders" table (for example, it might be named "orderId" with foreignKey="orders.id"). Then, to load the records related to a given "order", call fetchRelatedData() on the component bound to "orderItems", pass the "orders" DataSource as the "schema" and pass a record from the "orders" DataSource as the "record" argument.

      Note that multiple foreign keys into the schema are supported by this method.

      Parameters:
      record - DataSource record
      schema - schema of the DataSource record, or DataBoundComponent already bound to that schema
      See Also:
    • fetchRelatedData

      public void fetchRelatedData(ListGridRecord record, Canvas schema, DSCallback callback)
      See Also:
    • fetchRelatedData

      public void fetchRelatedData(ListGridRecord record, Canvas schema, DSCallback callback, DSRequest requestProperties)
      Based on the relationship between the DataSource this component is bound to and the DataSource specified as the "schema" argument, call fetchData() to retrieve records in this grid that are related to the passed-in record.

      Relationships between DataSources are declared via DataSourceField.foreignKey.

      For example, given two related DataSources "orders" and "orderItems", where we want to fetch the "orderItems" that belong to a given "order". "orderItems" should declare a field that is a foreignKey to the "orders" table (for example, it might be named "orderId" with foreignKey="orders.id"). Then, to load the records related to a given "order", call fetchRelatedData() on the component bound to "orderItems", pass the "orders" DataSource as the "schema" and pass a record from the "orders" DataSource as the "record" argument.

      Note that multiple foreign keys into the schema are supported by this method.

      Parameters:
      record - DataSource record
      schema - schema of the DataSource record, or DataBoundComponent already bound to that schema
      callback - callback to invoke on completion
      requestProperties - additional properties to set on the DSRequest that will be issued
      See Also:
    • fetchRowCount

      public void fetchRowCount()
      For databound grids, method will fall through to ResultSet.fetchRowCount(), allowing developers to request an accurate row count from the dataSource when progressive loading is active.
      See Also:
    • fetchRowCount

      public void fetchRowCount(RowCountCallback callback)
      See Also:
    • fetchRowCount

      public void fetchRowCount(RowCountCallback callback, DSRequest dsRequest)
      For databound grids, method will fall through to ResultSet.fetchRowCount(), allowing developers to request an accurate row count from the dataSource when progressive loading is active.
      Parameters:
      callback - Callback to fire when the fetch request completes. To retrieve details of the row-count that was retrieved from the server, use the getRowCount() and getRowCountStatus() methods.
      dsRequest - Custom properties for the row count fetch request
      See Also:
    • fieldIsEditable

      public boolean fieldIsEditable(ListGridField field)
      Can the field be edited? This method looks at canEdit for the grid as well as the ListGridField.canEdit value, to determine whether editing is allowed. This method's return value is not authoritative for editibility since canEditCell() could return a more specific value.

      For a detailed discussion, see the documentation at canEdit.

      Parameters:
      field - field object, number, or name
      Returns:
      whether field can be edited
      See Also:
    • fieldIsEditable

      public boolean fieldIsEditable(int field)
      Can the field be edited? This method looks at canEdit for the grid as well as the ListGridField.canEdit value, to determine whether editing is allowed. This method's return value is not authoritative for editibility since canEditCell() could return a more specific value.

      For a detailed discussion, see the documentation at canEdit.

      Parameters:
      field - field object, number, or name
      Returns:
      whether field can be edited
      See Also:
    • fieldIsEditable

      public boolean fieldIsEditable(String field)
      Can the field be edited? This method looks at canEdit for the grid as well as the ListGridField.canEdit value, to determine whether editing is allowed. This method's return value is not authoritative for editibility since canEditCell() could return a more specific value.

      For a detailed discussion, see the documentation at canEdit.

      Parameters:
      field - field object, number, or name
      Returns:
      whether field can be edited
      See Also:
    • fieldIsVisible

      public boolean fieldIsVisible(String field)
      Check whether a field is currently visible
      Parameters:
      field - field to be checked
      Returns:
      true if the field is currently visible, false otherwise.
    • addFieldStateChangedHandler

      public HandlerRegistration addFieldStateChangedHandler(FieldStateChangedHandler handler)
      Add a fieldStateChanged handler.

      Notification method executed when columns are resized or reordered, or fields are shown or hidden, frozen or unfrozen. Has no default implementation.

      Specified by:
      addFieldStateChangedHandler in interface HasFieldStateChangedHandlers
      Parameters:
      handler - the fieldStateChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • filterByEditor

      public void filterByEditor()
      If the filter editor (showFilterEditor) is visible for this grid, this method will perform a filter based on the current values in the editor.
    • addFilterEditorSubmitHandler

      public HandlerRegistration addFilterEditorSubmitHandler(FilterEditorSubmitHandler handler)
      Add a filterEditorSubmit handler.

      Optional notification fired when the user performs a filter using the Filter Editor. Useful for applying additional criteria not available in the filterEditor. Note that it is often easiest to do this with the SearchForm attribute, which requires no code.

      May fire as criteria values are being edited if ListGrid.filterByCell or ListGrid.filterOnKeypress is true, otherwise will fire when the user clicks the filter button or presses the Enter key while focus is in the Filter Editor.

      Use event.cancel() to cancel the default behavior - you must cancel the default behavior if your code is going to call ListGrid.filterData(), ListGrid.setCriteria() or any other API that affects the criteria applied to the grid.

      The criteria parameter contains the current criteria applied to the grid including edits the user has just made using the Filter Editor and those applied with the advanced filtering dialog. A call to ListGrid.getFilterEditorCriteria() does not include the advanced filtering criteria.

      If you wish to access the criteria applied to the grid without picking up any edits to the Filter Editor, use ListGrid.getCriteria() instead.

      Developers may wish to perform a filter using the Filter Editor values from code running outside the standard filterEditorSubmit flow. For example, if you wanted a confirmation dialog to be shown before filtering was performed, you would cancel the default behavior as described above, but then need to replicate the default behavior once the user confirms that they want to proceed. To replicate the default behavior, just call:

         grid.filterData(grid.getFilterEditorCriteria());
        
      or, to ensure the specified ListGrid.autoFetchTextMatchStyle is picked up
         DSRequest request = new DSRequest();
         request.setTextMatchStyle(grid.getAutoFetchTextMatchStyle());
         grid.filterData(grid.getFilterEditorCriteria(), null,
              request);
        
      Specified by:
      addFilterEditorSubmitHandler in interface HasFilterEditorSubmitHandlers
      Parameters:
      handler - the filterEditorSubmit handler
      Returns:
      HandlerRegistration used to remove this handler
    • focusInCell

      public void focusInCell(Integer row, Integer col)
      Puts keyboard focus into the specified cell, showing a highlighted (roll-over style) appearance, and ensuring that arrow-key navigation will start from the specified cell.

      Only applies where canSelectCells is true.

      Parameters:
      row - Index of target row
      col - Index of target col
      See Also:
    • focusInFilterEditor

      public void focusInFilterEditor()
      If the filter editor (showFilterEditor) is visible for this grid, this method will explicitly put focus into the specified field in the filter editor.
    • focusInFilterEditor

      public void focusInFilterEditor(String fieldName)
      If the filter editor (showFilterEditor) is visible for this grid, this method will explicitly put focus into the specified field in the filter editor.
      Parameters:
      fieldName - Name of the field to put focus into. If unspecified focus will go to the first field in the editor
    • focusInRow

      public void focusInRow(Integer row)
      Puts keyboard focus into the specified row, showing a highlighted (roll-over style) appearance, and ensuring that arrow-key navigation will start from the specified row.

      Only applies where canSelectCells is false.

      Parameters:
      row - Index of target row
      See Also:
    • addFormulaUpdatedHandler

      public HandlerRegistration addFormulaUpdatedHandler(FormulaUpdatedHandler handler)
      Add a formulaUpdated handler.

      Notification fired when a user either creates a new formula field or edits an existing formula field.

      Specified by:
      addFormulaUpdatedHandler in interface HasFormulaUpdatedHandlers
      Parameters:
      handler - the formulaUpdated handler
      Returns:
      HandlerRegistration used to remove this handler
    • freezeField

      public void freezeField(ListGridField field)
      Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs.
      Parameters:
      field - field or fields to freeze. fields may be specified as ListGridField objects, field names or colNum.
      See Also:
    • freezeField

      public void freezeField(Integer field)
      Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs.
      Parameters:
      field - field or fields to freeze. fields may be specified as ListGridField objects, field names or colNum.
      See Also:
    • freezeField

      public void freezeField(String field)
      Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs.
      Parameters:
      field - field or fields to freeze. fields may be specified as ListGridField objects, field names or colNum.
      See Also:
    • freezeField

      public void freezeField(String[] field)
      Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs.
      Parameters:
      field - field or fields to freeze. fields may be specified as ListGridField objects, field names or colNum.
      See Also:
    • getAllEditRows

      public int[] getAllEditRows()
      Returns an array of every rowNum for which we have pending (unsubmitted) edits. This will return records that have been marked as removed (see markRecordRemoved() as well as records with unsaved changes to field values.
      Returns:
      Array of rowNums for rows with edit values pending submission.
      See Also:
    • getAllFields

      public ListGridField[] getAllFields()
      Get the complete array of fields for this ListGrid, including fields that are not currently visible or were specified implicitly via dataSource.

      This list of fields is only valid once the ListGrid has been drawn or once setFields() has been called explicitly. If called earlier, only the list of directly specified fields will be returned (the Array passed to create()).

      This Array should be treated as read-only. To modify the set of visible fields, use showField(), hideField() and related APIs. To update properties of individual fields, use setFieldProperties() or more specific APIs such as setFieldTitle().

      Returns:
      Array of all fields in the ListGrid
    • getAriaState

      public Map getAriaState()
      Dynamically retrieves the aria properties to write out for this listGrid in screen reader mode.

      If ariaRole is set to "grid" this will return an object with rowcount and colcount attributes populated to indicate this size of the grid and its data.

      If a static ariaState has been specified, the default implementation will apply these dynamically derived properties in addition to any properties specified on the static object.

      Note that redrawing the grid will re-evaluate this method and apply the result to the handle.

      Returns:
      object containing aria attribute names and values to apply to this grid's handle
    • getAriaStateDefaults

      public Map getAriaStateDefaults()
      Retrieves dynamically calculated default ARIA state mapping properties for this listGrid. These will be combined with explicitly specified aria state as described in getAriaState().

      Overridden by ListGrid to pick up aria-rowcount and aria-colcount.

      Overrides:
      getAriaStateDefaults in class Canvas
      Returns:
      dynamically calculated default aria state properties
    • getBaseStyle

      protected String getBaseStyle(ListGridRecord record, int rowNum, int colNum)
      Return the base styleName for this cell. Has the following implementation by default: If no custom style is found for the cell as described above, the default baseStyle will be returned. If baseStyle is specified this will be used. Otherwise for grids showing fixed height rows which match normalCellHeight normalBaseStyle will be used. For grids with variable, or modified cell heights, tallBaseStyle will be used.

      Note also that enabling fastCellUpdates will cause the tallBaseStyle to be used rather than normalBaseStyle.

      As noted under enforceVClipping, cell content which renders taller than the available space within a cell may cause rows to expand even if fixedRecordHeights is true. This can lead to misaligned rows when frozen columns are used. Developers should be aware that changing cell styling such that there is increased borders or padding will reduce the available space for content within the specified cell height, making this scenario more common. To fix this, specify a larger cellHeight, or set enforceVClipping to true.

      Note: This is an override point.

      Parameters:
      record - Record associated with this cell. May be null for a new edit row at the end of this grid's data set.
      rowNum - row number for the cell
      colNum - column number of the cell
      Returns:
      CSS class for this cell. See CSSStyleName
      See Also:
    • getCellAriaState

      public Map getCellAriaState(Integer rowNum, Integer colNum, ListGridRecord record, String role)
      Returns a map of WAI ARIA state attribute values to be written into cells within this grid. Default implementation return null, meaning no per-cell aria state is written out
      Parameters:
      rowNum - row index of the cell
      colNum - column index of the cell
      record - record for the cell in question
      role - ARIA role for the cell as returned by getCellRole()
      Returns:
      Object containing aria property names and values to write into the cell's HTML
      See Also:
    • getCellContextMenuItems

      public MenuItem[] getCellContextMenuItems(Integer record, Integer rowNum, Integer colNum)
      If showCellContextMenus is true this method returns the menu items to be displayed in the default cell context menu.

      This method is called at various times, so this method should not instantiate any classes, because they'll be re-created on each call, resulting in a leak - your implementation should return an array of menuItem config-blocks only, so you shouldn't instantiate actual Menu instances to apply as the submenu of items - instead, set submenu to a simple array of menuItems. If your use-case necessitates that class instances are created, because specific submenus have a different Menu class, for example, you should keep a reference to them and either, if their content is dynamic, destroy and recreate them with the new items, or just return the existing instances otherwise.

      The default set of menu items includes items for built-in ListGrid features, like showing or hiding an inline edit form, or removing records.

      Parameters:
      record - The record the user clicked in
      rowNum - Index of the record the user clicked in
      colNum - Index of the column the user clicked in
      Returns:
    • getCellCSSText

      protected String getCellCSSText(ListGridRecord record, int rowNum, int colNum)
      Return CSS text for styling this cell, which will be applied in addition to the CSS class for the cell, as overrides.

      "CSS text" means semicolon-separated style settings, suitable for inclusion in a CSS stylesheet or in a STYLE attribute of an HTML element.

      Note: This is an override point.

      Parameters:
      record - cell record as returned by getCellRecord
      rowNum - row number for the cell
      colNum - column number of the cell
      Returns:
      CSS text for this cell
      See Also:
    • getCellErrors

      public String[] getCellErrors(int rowNum, String fieldName)
      Returns the current set of errors for this cell.
      Parameters:
      rowNum - index of row to check for validation errors.
      fieldName - field to check for validation errors - can be fieldName or index of the column.
      Returns:
      array of error messages (strings) for the specified cell. If no validation errors are present, returns null.
      See Also:
    • getCellHoverComponent

      protected Canvas getCellHoverComponent(Record record, Integer rowNum, Integer colNum)
      When showHoverComponents is set, this method is called to get the component to show as a hover for the current cell.

      By default, this method returns one of a set of builtin components, according to the value of listGrid.hoverMode. You can override this method to return any component you wish to provide as a hoverComponent, or invoke the superclass method to have the default hover component generated, then further customize it.

      By default, components returned by getCellHoverComponent() will be automatically destroyed when the hover is hidden. To prevent this, set Canvas.hoverAutoDestroy to false on the returned component.

      If you return a component that fetches data or loads content dynamically:

      1. set rpcRequest.promptStyle to "cursor" or set rpcRequest.showPrompt to false on any network requests, or the default masking that blocks the screen during network requests will dismiss the hover
      2. as covered above, your component may have been automatically destroyed by the time your content has been loaded. Check Canvas.destroyed before taking action in an asynchronous callback
      3. if your component grows in size after data is loaded, and it would then be rendered partially off-screen, it will be automatically re-positioned to keep it on-screen. However this will not automatically happen in cases where you provide HTML content that changes size after initial render, in which case a call to Canvas.adjustForContent() will be required. See that API for details.
      Parameters:
      record - record to get the hoverComponent for
      rowNum - row number for the cell
      colNum - column number of the cell
      Returns:
      the component to show as a hover
    • getCellPageRect

      public Integer[] getCellPageRect(int rowNum, int colNum)
      Returns the page offsets and size of the cell at the passed row and column. If auto-sizing is enabled, sizes are not definitive until the grid has finished drawing, so calling this method before drawing completes will return the configured column sizes.
      Parameters:
      rowNum - row index of the cell
      colNum - column index of the cell
      Returns:
      the page rect of the passed cell, or null if undrawn
      See Also:
    • getCellRowSpan

      public int getCellRowSpan(int rowNum, int colNum)
      When using row spanning, returns the number of cells spanned by the cell at the given coordinates.

      If the passed coordinates are in the middle of a series of spanned cells, the row span of the spanning cell is returned. For example, if row 2 col 0 spans 3 cells, calls to getCellRowSpan() for row 2 col 0, row 3 col 0, row 4 col 0 will all return 3.

      This method returns row span information for the current rendered cells. In contrast, if the grid is about to be redrawn, a call to getRowSpan() may return row span values for how the grid is about to be drawn. Also, user-provided getRowSpan() functions are not required to operate properly when called outside of the grid rendering loop.

      Note: This method is a utility method for developers - it is not called directly by the grid rendering path and therefore is not intended for override. To set up custom row-spanning behavior, override getRowSpan() instead.

      Parameters:
      rowNum - row number of cell to return the row span for
      colNum - column number of cell to return the row span for
      Returns:
      number of cells spanned by the cell that spans through these coordinates
    • getCellSelection

      public CellSelection getCellSelection()
      When canSelectCells is active, returns the CellSelection object that tracks and manages the current selection. Returns null if canSelectCells is false.
      Returns:
      current cellSelection
    • getCellStartRow

      public int getCellStartRow(int rowNum, int colNum)
      When using row spanning, returns the row number where a row-spanning cell starts.

      For example, if row 2 col 0 spans 3 cells, getCellStartRow() for row 2 col 0, row 3 col 0, row 4 col 0 will all return 2, because that's the row when spanning starts.

      Parameters:
      rowNum - row number of cell for which the start row should be returned
      colNum - column number of cell for which the start row should be returned
      Returns:
      row number where spanning starts
    • getCellStyle

      protected String getCellStyle(ListGridRecord record, int rowNum, int colNum)
      Return the CSS class for a cell. By default this method has the following implementation:
      - return any custom style for the record (GridRenderer.recordCustomStyleProperty) if defined.
      - create a style name based on the result of GridRenderer.getBaseStyle() and the state of the record using the rules described in CellStyleSuffixes.

      Cell Styles are customizable by:

      • attaching a custom style to a record by setting record[this.recordCustomStyleProperty] to some valid CSS style name.
      • modifying the base style returned by getBaseStyle() [see that method for further documentation on this]
      • overriding this function

      In addition to this, getCellCSSText() may be overriden to provide custom cssText to apply on top of the styling attributes derived from the named style.

      Note: This is an override point.

      Parameters:
      record - record object for this row and column
      rowNum - number of the row
      colNum - number of the column
      Returns:
      CSS style for this cell. See CSSStyleName
      See Also:
    • getColumnLeft

      public Integer getColumnLeft(Integer colNum)
      Return the left offset (in local coordinate space) of a particular column.
      Parameters:
      colNum - number of the column
      Returns:
      left offset of the passed colNum, or null if not yet drawn or no such column
      See Also:
    • getColumnPageLeft

      public Integer getColumnPageLeft(Integer colNum)
      Return the left coordinate for a given column number as a GLOBAL coordinate
      Parameters:
      colNum - number of the column
      Returns:
      page left offset of the passed colNum, or null if undrawn or no such column
      See Also:
    • getColumnWidth

      public Integer getColumnWidth(int colNum)
      Return the width of a particular column.
      Parameters:
      colNum - number of the column
      Returns:
      width of the column, or null if undrawn or no such column.
      See Also:
    • getCurrentExpansionComponent

      public Canvas getCurrentExpansionComponent(Integer record)
      Returns the expansion component derived from getExpansionComponent() currently visible in some record, or null if the specified record is not showing an expansion component.
      Parameters:
      record - rowNum or record to get the expansionComponent for
      Returns:
      the currently visible expansion component for the expanded row.
    • getCurrentExpansionComponent

      public Canvas getCurrentExpansionComponent(ListGridRecord record)
      Returns the expansion component derived from getExpansionComponent() currently visible in some record, or null if the specified record is not showing an expansion component.
      Parameters:
      record - rowNum or record to get the expansionComponent for
      Returns:
      the currently visible expansion component for the expanded row.
    • getCurrentFieldWidths

      public Integer[] getCurrentFieldWidths()
      Returns an array of widths of the visible fields in this ListGrid, in px. This method is implemented by calling getFieldWidth() for each field. If field widths cannot be determined, the returned array will contain nulls.
      Returns:
      field widths in px
    • setDefaultFieldWidthCustomizer

      public void setDefaultFieldWidthCustomizer(DefaultFieldWidthCustomizer customizer)
      Method to calculate and return the default width of a field. This method is called to calculate the size of each field's content as part of the field auto fit behavior. Note that this method returns a size for content, so will not be consulted if autoFitWidthApproach is set to "title".

      If ListGridField.defaultWidth is specified, this will be returned.

      Otherwise, the default implementation varies by field type. For fields of type "icon", or fields which show only a valueIcon as a value, and for boolean fields which show a checkbox value, the width will be calculated based on the icon size and iconPadding. For other fields the getFieldContentWidth() method will be used to calculate a width based on the rendered width of content. Note that for "image" type fields, this method will rely on the ListGridField.imageWidth being specified.

      Note that this width is the default width of "content" - it does not take into account the rendered size of the field title.

      Parameters:
      DefaultFieldWidthCustomizer - customizer
    • getDefaultFormattedFieldValue

      public String getDefaultFormattedFieldValue(Record record, ListGridField field)
      Get a field value for some record with default field formatters applied.

      This method differs from getDefaultFormattedValue() in a couple of ways. Firstly, this method does not rely on the rowNum and colNum parameters to find the record and field in the grid.
      Secondly, unlike getDefaultFormattedValue() this method will call any explicit cell formatter specified on the field passed in (though it will not call a component level formatter if one exists).

      This is useful for cases where a developer wishes to display a formatted value for some record and field combination which does not necessarily map to a cell displayed in the ListGrid.

      If rowNum and colNum parameters are passed through to the field level cell formatter if one exists. If not explicitly provided these are defaulted to -1.

      Parameters:
      record - the record object
      field - the field object
      Returns:
      Default formatted value
      See Also:
    • getDefaultFormattedFieldValue

      public String getDefaultFormattedFieldValue(Record record, ListGridField field, int rowNum)
      See Also:
    • getDefaultFormattedFieldValue

      public String getDefaultFormattedFieldValue(Record record, ListGridField field, int rowNum, int colNum)
      Get a field value for some record with default field formatters applied.

      This method differs from getDefaultFormattedValue() in a couple of ways. Firstly, this method does not rely on the rowNum and colNum parameters to find the record and field in the grid.
      Secondly, unlike getDefaultFormattedValue() this method will call any explicit cell formatter specified on the field passed in (though it will not call a component level formatter if one exists).

      This is useful for cases where a developer wishes to display a formatted value for some record and field combination which does not necessarily map to a cell displayed in the ListGrid.

      If rowNum and colNum parameters are passed through to the field level cell formatter if one exists. If not explicitly provided these are defaulted to -1.

      Parameters:
      record - the record object
      field - the field object
      rowNum - rowNum (passed to any field level cell formatter)
      colNum - colNum (passed to any field level cell formatter)
      Returns:
      Default formatted value
      See Also:
    • getDefaultFormattedValue

      public String getDefaultFormattedValue(Record record, int rowNum, int colNum)
      Get the value for some cell with default formatters applied.

      This method is useful for cases where a developer wishes to conditionally customize a cell's formatting, but needs to see what the default formatted value would be.

      For example - a developer might wish to apply a custom formatter to some link type field, and be able to return the default active link HTML in some cases. In this case a formatter could check for the conditions in which custom formatting should be applied and run appropriate custom logic to generate a value for display - otherwise return the result of this method to leave the standard formatted-value intact.

      Parameters:
      record - the cell's record object
      rowNum - rowNum for the cell
      colNum - colNum for the cell
      Returns:
      Cell value with default formatters applied
      See Also:
    • getDrawArea

      public Integer[] getDrawArea()
      Returns the extents of the rows and columns currently visible in this grid's viewport.

      Note: if there are any frozen fields, they are not included in the draw area range returned by this method. Frozen fields are assumed to never be scrolled out of view. The column coordinates returned by this method will only include unfrozen columns.

      Returns:
      The row/col co-ordinates currently visible in the viewport as [startRow, endRow, startCol, endCol].
    • getDrawnRowHeight

      public int getDrawnRowHeight(int rowNum)
      Get the drawn height of a row.
      Parameters:
      rowNum -
      Returns:
      height
      See Also:
    • getEditCol

      public int getEditCol()
      Returns the index of the column being edited or -1 if there is no current edit column.
      Returns:
      index of the current edit column
      See Also:
    • getEditedCell

      public Object getEditedCell(int record, int field)
      Returns the current value of a cell. If the cell has an outstanding edit value, this will be returned, otherwise the underlying value of the record will be returned.
      Parameters:
      record - rowNum of the record being edited, or an Object containing values for all the record's primary keys
      field - colNum or fieldName of the cell
      Returns:
      Current edit value, or underlying value for the cell
      See Also:
    • getEditRow

      public int getEditRow()
      Returns the index of the row being edited or -1 if there is no current edit row.
      Returns:
      index of the current edit row
      See Also:
    • getEditValue

      public Object getEditValue(int rowNum, int colNum)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      colNum - index of the field, or fieldName, for which value should be returned
      Returns:
      edit value for the field in question
      See Also:
    • getEventColumn

      public int getEventColumn()
      Returns the column number of the provided X-coordinate, or the most recent mouse event if an X-coordinate is not provided.
      Returns:
      column number, or -2 if beyond last drawn column
    • getEventColumn

      public int getEventColumn(Integer x)
      Returns the column number of the provided X-coordinate, or the most recent mouse event if an X-coordinate is not provided.
      Parameters:
      x - X-coordinate relative to the left edge of the content to obtain the column number for. If not provided, then Canvas.getOffsetX() will be used.
      Returns:
      column number, or -2 if beyond last drawn column
    • getEventRow

      public int getEventRow()
      Returns the row number of the provided Y-coordinate, or the most recent mouse event if a Y-coordinate is not provided.
      Returns:
      row number, or -2 if beyond last drawn row
    • getEventRow

      public int getEventRow(Integer y)
      Returns the row number of the provided Y-coordinate, or the most recent mouse event if a Y-coordinate is not provided.
      Parameters:
      y - Y-coordinate relative to the top edge of the content to obtain the row number for. If not provided, then Canvas.getOffsetY() will be used.
      Returns:
      row number, or -2 if beyond last drawn row
    • getExpandedRecords

      public ListGridRecord[] getExpandedRecords()
      Returns the list of records from this ListGrid that are expanded
      Returns:
      All expanded records in the grid
    • getExpansionComponent

      protected Canvas getExpansionComponent(ListGridRecord record)
      When canExpandRecords is true, gets the embedded-component to show as a given record's expansionComponent. This component is then housed in a VLayout and embedded into a record's row.

      By default, this method returns one of a set of built-in components, according to the value of listGrid.expansionMode. You can override this method to return any component you wish to provide as an expansionComponent.

      As long as the record is expanded, this component may be retrieved via a call to getCurrentExpansionComponent().

      When an expanded record is collapsed, the component is disassociated from the record and may or may not be automatically destroyed. By default, built-in components will be destroyed on unembed according to the pooling mode being used. Custom expansion components, created via an override of getExpansionComponents(), will not be auto-destroyed - developers should override collapseRecord() to take care of clean-up for such components.

      Parameters:
      record - record to get the expansionComponent for
      Returns:
      the component to embed
      See Also:
    • getExportBGColor

      public String getExportBGColor(int rowNum, int colNum, Record record)
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), background color to use for the cell at the given rowNum and colNum.

      See ExportBGColor for an overview.

      Parameters:
      rowNum - row number of cell
      colNum - column number of cell
      record - the record object behind the row being exported
      Returns:
      background color to use for the cell, or null to use the default background color. See CSSColor
    • getExportColumnBGColor

      public String getExportColumnBGColor(int colNum)
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), background color to use for the given colNum.

      See ExportBGColor for an overview.

      Parameters:
      colNum - column number
      Returns:
      background color to use for the column, or null to use the default background color. See CSSColor
    • getExportRowBGColor

      public String getExportRowBGColor(int rowNum, Record record)
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), background color to use for the given rowNum.

      See ExportBGColor for an overview.

      Parameters:
      rowNum - row number
      record - the record object behind the row being exported
      Returns:
      background color to use for the row, or null to use the default background color. See CSSColor
    • getExportTextColor

      public String getExportTextColor(int rowNum, int colNum, Record record)
      When exporting data to Excel/OpenOffice format using exportData() or exportClientData(), text color to use for the cell at the given rowNum and colNum.

      Return null (the default function behavior) to allow hilite color, if any, to determine the text color.

      Parameters:
      rowNum - row number of cell
      colNum - column number of cell
      record - the record object behind the row being exported
      Returns:
      text color to use for the cell, or null to use the default text color. See CSSColor
    • getField

      public ListGridField getField(int colNum)
      Given a column number or field name, return the field definition of a field which is visible in the grid. To retrieve the definition of any field, including hidden ones, use getFieldByName().

      When using DataBinding, the field definition may be a mix of information derived from fields and dataSource.

      Parameters:
      colNum - number or name of the field
      Returns:
      field definition
    • getField

      public ListGridField getField(String colNum)
      Given a column number or field name, return the field definition of a field which is visible in the grid. To retrieve the definition of any field, including hidden ones, use getFieldByName().

      When using DataBinding, the field definition may be a mix of information derived from fields and dataSource.

      Parameters:
      colNum - number or name of the field
      Returns:
      field definition
      See Also:
    • getFieldByName

      public ListGridField getFieldByName(String fieldName)
      Given a field name, return the appropriate field definition. Unlike getField(), this method will return the field definition even if it's not visible in the grid.
      Parameters:
      fieldName - name of the field to retrieve. See FieldName
      Returns:
      field definition
      See Also:
    • getFieldContentWidth

      public Integer getFieldContentWidth(ListGridField field)
      Returns the pixel width of the content of a visible field in this grid.
      Parameters:
      field - field to test
      Returns:
      drawn width of this fields content
    • getFieldName

      public String getFieldName(int colNum)
      Given a column number or field id, return the field name of a field.
      Parameters:
      colNum - number or id of the field.
      Returns:
      Name of the field.
    • getFieldNum

      public int getFieldNum(String fieldID)
      Given a field or field id, return it's index in the fields array
      Parameters:
      fieldID - field number or field.name
      Returns:
      index of the field within this.fields
    • getFieldNum

      public int getFieldNum(int fieldID)
      Given a field or field id, return it's index in the fields array
      Parameters:
      fieldID - field number or field.name
      Returns:
      index of the field within this.fields
    • getFieldSearchOperator

      public void getFieldSearchOperator(String fieldName)
      Returns the current search-operator applied to criteria for a given field in this grid's filter row. Typically, this will be the operator most recently selected by the user, or applied by a call to setCriteria() or similar..

      If no operator has been applied by the user, the result is the default provided by the developer, or null, indicating a default operator according to data-type.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      Parameters:
      fieldName - name of the field to get the search operator for
    • getFieldTitle

      public String getFieldTitle(String fieldId)
      Return the title of a field, specified by name or index.
      Parameters:
      fieldId - name or index of the field
      Returns:
      Field title.
    • getFieldTitle

      public String getFieldTitle(int fieldId)
      Return the title of a field, specified by name or index.
      Parameters:
      fieldId - name or index of the field
      Returns:
      Field title.
    • getFieldWidth

      public Integer getFieldWidth(int fieldNum)
      Returns a numeric value for the width of some field within this ListGrid.
      Parameters:
      fieldNum - Index or name of the field for which the width is to be determined.
      Returns:
      width of the field in px, or null if the width can't be determined.
    • getFilterEditorCriteria

      public Criteria getFilterEditorCriteria()
      If showFilterEditor is true, this method will return the criteria currently displayed in the filterEditor. Note that these values may differ from the criteria returned by getCriteria() if the filter editor values have been modified without performing an actual filter.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      Returns:
      criteria currently displayed in the filterEditor
    • getFilterEditorCriteria

      public Criteria getFilterEditorCriteria(Boolean omitHiddenFields)
      If showFilterEditor is true, this method will return the criteria currently displayed in the filterEditor. Note that these values may differ from the criteria returned by getCriteria() if the filter editor values have been modified without performing an actual filter.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      Parameters:
      omitHiddenFields - By default this method will include criteria applied to fields, including criteria that are not actually visible/editable in the filterEditor for the grid. Pass in this parameter to get only values for visible fields returned.
      Returns:
      criteria currently displayed in the filterEditor
    • getFilterEditorCriterion

      public Criterion getFilterEditorCriterion(String fieldName)
      Extracts and returns the criteria for the passed field from the filterEditor. The result can be an AdvancedCriteria, if the field in question produces more than one restriction, such as separate greaterThan and lessThan criteria for a range.
      Parameters:
      fieldName - name of the field to get the criteria for
      Returns:
      the passed field's filterEditor criterion
    • getFocusRow

      public Integer getFocusRow()
      Get the row that currently has keyboard focus. Arrow key navigation moves relative to this row.
      Returns:
      rowNum of the current focus row
    • getFormattedRowCount

      public String getFormattedRowCount()
      Returns the current total row count for this grid as a formatted string.

      Due to progressiveLoading, an exact total row count may not be available. Depending on the current rowCount status, this method will return a value in one of the following formats. Note that if the row count is not exact, the numeric value will be rounded to the nearest multiple of rowCountDisplayPrecision.

      See also getRowRangeDisplayValue().
      Returns:
      the formatted rowCount display value
      See Also:
    • getFormattedRowRange

      public String getFormattedRowRange()
      Uses the rowRangeFormat to return a formatted display value showing the currently visible set of rows in the listGrid viewport.

      If this listGrid has never been drawn, so has no meaningful "viewport", this method will return an empty string.

      See also getRowRangeDisplayValue()

      Returns:
      formatted row range value
    • getFrozenRollOverCanvas

      protected Canvas getFrozenRollOverCanvas(Integer rowNum, Integer colNum)
      For grids with frozen columns, this method is called to retrieve the frozenRollOverCanvas when the user moves over a new row or cell if showRollOverCanvas is true, or when the user moves over the selected record if showSelectedRollOverCanvas is true.

      The default implementation uses the com.smartgwt.client.types.AutoChild subystem to create the frozenRollOverCanvas based on the rollOverCanvas auto child settings. It may be overridden for custom behavior.

      Note that for efficiency this should not typically create a new Canvas every time that it is called. Instead usually a single rollOver canvas should be created and updated to reflect the current rollOver row if necessary.

      Return null to avoid showing a rollOverCanvas for this row.

      See also getRollOverCanvas().

      Note: This is an override point.

      Parameters:
      rowNum - index of the current rollOver row.
      colNum - index of the current rollOver column. This parameter will be null unless useCellRollOvers is true for the grid.
      Returns:
      the embedded component
    • getFrozenRollUnderCanvas

      protected Canvas getFrozenRollUnderCanvas(Integer rowNum, Integer colNum)
      For grids with frozen columns, this method is called to retrieve the frozenRollUnderCanvas when showing a rollUnder canvas or showing a rollUnder canvas for the selected record.

      The default implementation uses the com.smartgwt.client.types.AutoChild subystem to create the rollUnderCanvas auto child. It may be overridden for custom behavior.

      Note that for efficiency this should not typically create a new Canvas every time that it is called. Instead usually a single rollOver canvas should be created and updated to reflect the current rollOver row if necessary.

      Return null to avoid showing a rollUnderCanvas for frozen fields for this row.

      See also getRollUnderCanvas().

      Note: This is an override point.

      Parameters:
      rowNum - index of the current rollOver row.
      colNum - index of the current rollOver column. This parameter will be null unless useCellRollOvers is true for the grid.
      Returns:
      the embedded component
    • getGridSummary

      public Object getGridSummary(ListGridField field)
      When showGridSummary is true this method is called for each field which will show a grid summary value (as described in ListGridField.showGridSummary) to get the summary value to display below the relevant column.

      The default implementation is as follows:

      • If this is a databound grid and not all data is loaded, returns null for every field
      • Otherwise if ListGridField.getGridSummary() is defined, calls that method passing in the current data set for the grid
      • If ListGridField.getGridSummary() is undefined, makes use of the standard summary function for the field to calculate the summary based on the current data set
      This method may return an array of values. This implies that the grid summary should show multiple rows. Note that if a field has more than one summaryFunction specified, this method will pick up values from each summary function and return them in an array, meaning these summaries will show up on multiple rows in the grid.

      This method may be overridden to completely customize the summary value displayed for columns in this grid. An example use case would be when summary information is available on the client and does not need to be calculated directly from the data.

      If you update this method after the grid has been drawn so that new summaries will be generated from the same data, the changes won't be reflected in any redraws or other interaction until the next data change, unless you call recalculateGridSummary().

      Note: this method will not be called if summaryRowDataSource is specified.

      Parameters:
      field - field for which the summary value should be returned
      Returns:
      summary value to display for the specified field.
    • getGridSummaryData

      public ListGridRecord[] getGridSummaryData()
      This method returns the data displayed in the summaryRow when showGridSummary is true.

      By default this will call getGridSummary() for each field and generate an array of records containing the resulting values.

      This method may return multiple records if more than one summary row is desired.

      Returns:
      summary record(s)
    • getGroupedRecordIndex

      public int getGroupedRecordIndex(ListGridRecord record)
      Returns the true row index for a grouped record excluding group and summary records. Records in closed groups are included in number.

      Function is not applicable for non-grouped grids and will return -1 if called.

      Parameters:
      record - record to number
      Returns:
      row index for record or -1 for group or summary records
    • getGroupSummaryData

      public ListGridRecord[] getGroupSummaryData(Record[] records, Record groupNode)
      If this grid is grouped, and showGroupSummary is true, this method will return the group summary data displayed at the end of the group.

      This method may return multiple records if more than one summary row per group is desired.

      Parameters:
      records - the records in the group, for which the summary values are being calculated
      groupNode - object with specified groupValue and groupName for this group
      Returns:
      summary record(s)
    • getGroupSummaryData

      public ListGridRecord[] getGroupSummaryData(Record[] records, Record groupNode, Boolean recalculate)
      If this grid is grouped, and showGroupSummary is true, this method will return the group summary data displayed at the end of the group.

      This method may return multiple records if more than one summary row per group is desired.

      Parameters:
      records - the records in the group, for which the summary values are being calculated
      groupNode - object with specified groupValue and groupName for this group
      recalculate - if set to false and the node has existing summary data, returns the stored summary data, rather than recalculating
      Returns:
      summary record(s)
    • getGroupTreeSelection

      public ListGridRecord[] getGroupTreeSelection()
      If this grid is grouped, this method will return the current selection. Unlike the standard getSelection method, this method will return group nodes in addition to standard ListGridRecords within the grid's data.
      Returns:
      Selected group header nodes and record data objects. If this grid is not grouped, standard listGrid selection will be returned.
    • getGroupTreeSelection

      public ListGridRecord[] getGroupTreeSelection(boolean excludePartialSelection)
      See Also:
    • getGroupTreeSelection

      public ListGridRecord[] getGroupTreeSelection(boolean excludePartialSelection, boolean groupNodesOnly)
      If this grid is grouped, this method will return the current selection. Unlike the standard getSelection method, this method will return group nodes in addition to standard ListGridRecords within the grid's data.
      Parameters:
      excludePartialSelection - By default a group header node is considered selected if any members of the group are selected. If this flag is passed in, only header nodes where all members of the group are selected will be included in the returned results.
      groupNodesOnly - If this parameter is passed as true, this method will return just the group header nodes from the group tree. If omitted or false, both header nodes and data records will be returned.
      Returns:
      Selected group header nodes and record data objects. If this grid is not grouped, standard listGrid selection will be returned.
    • getHeaderContextMenuItems

      protected MenuItem[] getHeaderContextMenuItems(Integer fieldNum)
      If showHeaderContextMenu is true this method returns the menu items to be displayed in the default header context menu.

      This method is called at various times, including during redraws, as the mouse moves over a ListGrid header button and each time the menu is actually displayed - this allows for dynamic content depending on the current state of the grid and its fields.

      Consequently, this method should not instantiate any classes, because they'll be re-created on each call, resulting in a leak - your implementation should return an array of menuItem config-blocks only, so you shouldn't instantiate actual Menu instances to apply as the submenu of items - instead, set submenu to a simple array of menuItems. If your use-case necessitates that class instances are created, because specific submenus have a different Menu class, for example, you should keep a reference to them and either, if their content is dynamic, destroy and recreate them with the new items, or just return the existing instances otherwise.

      The default set of menu items includes items for built-in ListGrid features like showing and hiding fields, freezing fields or grouping by them, and other functions.

      Parameters:
      fieldNum - Index of the field the user clicked in the fields array. Note: if the user right-clicked the sorter button this parameter will be null.
      Returns:
      See Also:
    • getHeaderSpanContextMenuItems

      public MenuItem[] getHeaderSpanContextMenuItems(HeaderSpan headerSpan)
      Return the menus items that should be shown in a menu triggered from a headerSpan. The default implementation returns the parent element's context menu, unless showHeaderSpanContextMenu is true, in which case it returns standard items for showing / hiding fields and freezing / unfreezing header spans. Note that no column picker will be shown unless showTreeColumnPicker is true.
      Parameters:
      headerSpan - the component representing the headerSpan. This component will have all the properties specified via headerSpans.
      Returns:
      return false instead to avoid showing any menu
    • getRecord

      public ListGridRecord getRecord(int recordNum)
      Return the pointer to a particular record by record number. Synonym for getCellRecord().
      Parameters:
      recordNum - row index of record to return.
      Returns:
      Record object for the row.
      See Also:
    • getRecordComponent

      public Canvas getRecordComponent(int rowNum)
      Retrieve the recordComponent currently being shown at the given coordinates.

      recordComponents are dynamically assigned to row/cell coordinates and, depending on the recordComponentPoolingMode, any kind of redraw of the containing ListGrid (due to sort change, scrolling, editing etc) may cause a recordComponent to be assigned to another row, clear()ed or permanently destroy()ed.

      Hence you should always call getRecordComponent() right before taking action on the recordComponent - don't cache the component associated with row/cell coordinate. Similarly, it's invalid to call getRecordComponent() during a redraw (for example, from formatting code).

      It's always invalid to try to use a recordComponent outside of a ListGrid (by eg adding it to some other layout).

      If showRecordComponentsByCell is true and the colNum parameter is not passed, the call will return the first component in the passed rowNum.

      Returns null if there is no component at the specified coordinates.

      Parameters:
      rowNum - row number to get record component for
      Returns:
      record component, or null if none is shown at these coordintes
      See Also:
    • getRecordComponent

      public Canvas getRecordComponent(int rowNum, Integer colNum)
      Retrieve the recordComponent currently being shown at the given coordinates.

      recordComponents are dynamically assigned to row/cell coordinates and, depending on the recordComponentPoolingMode, any kind of redraw of the containing ListGrid (due to sort change, scrolling, editing etc) may cause a recordComponent to be assigned to another row, clear()ed or permanently destroy()ed.

      Hence you should always call getRecordComponent() right before taking action on the recordComponent - don't cache the component associated with row/cell coordinate. Similarly, it's invalid to call getRecordComponent() during a redraw (for example, from formatting code).

      It's always invalid to try to use a recordComponent outside of a ListGrid (by eg adding it to some other layout).

      If showRecordComponentsByCell is true and the colNum parameter is not passed, the call will return the first component in the passed rowNum.

      Returns null if there is no component at the specified coordinates.

      Parameters:
      rowNum - row number to get record component for
      colNum - optional column number to get the record component for
      Returns:
      record component, or null if none is shown at these coordintes
      See Also:
    • getRecordDropPosition

      public RecordDropPosition getRecordDropPosition()
      Returns the RecordDropPosition for some record drop operation. This value is passed to the recordDrop() event notification method.

      Default implementation determines the position to return based on the specified recordDropAppearance for the grid and the y-coordinate of the drop event.

      Returns:
      record drop position.
    • getRecordIndex

      public int getRecordIndex(ListGridRecord record)
      Get the index of the provided record.

      This is essentially the same as calling listGrid.data.indexOf(record), except that the currently visible range of records is checked first. This is important for responsiveness in functions that respond to user actions when the user is working near the end of a very large dataset (eg 500k records).

      Parameters:
      record - the record whose index is to be retrieved
      Returns:
      index of the record, or -1 if not found
    • getRelatedDataSource

      public DataSource getRelatedDataSource(ListGridRecord record)
      Returns the DataSource containing data related to the passed record. Used when canExpandRecords is true and ExpansionMode is "related". The default implementation returns the DataSource specified in ListGridRecord.detailDS if set, otherwise detailDS.
      Parameters:
      record - The record to get the Related dataSource for.
      Returns:
      The related DataSource for the "record" param
    • getRollOverCanvas

      protected Canvas getRollOverCanvas(Integer rowNum, Integer colNum)
      This method is called to retrieve the rollOverCanvas when the user moves over a new row or cell if showRollOverCanvas is true, or when the user moves over the selected record if showSelectedRollOverCanvas is true.

      The default implementation uses the com.smartgwt.client.types.AutoChild subystem to create the rollOverCanvas auto child. It may be overridden for custom behavior.

      Note that for efficiency this should not typically create a new Canvas every time that it is called. Instead usually a single rollOver canvas should be created and updated to reflect the current rollOver row if necessary.

      Return null to avoid showing a rollOverCanvas for this row.

      See also getFrozenRollOverCanvas().

      Note: This is an override point.

      Parameters:
      rowNum - index of the current rollOver row.
      colNum - index of the current rollOver column. This parameter will be null unless useCellRollOvers is true for the grid.
      Returns:
      the embedded component
    • getRollUnderCanvas

      protected Canvas getRollUnderCanvas(Integer rowNum, Integer colNum)
      This method is called to retrieve the rollUnderCanvas when the user moves over a new row or cell if showing a rollUnder canvas or showing a rollUnder canvas for the selected record.

      The default implementation uses the com.smartgwt.client.types.AutoChild subystem to create the rollUnderCanvas auto child. It may be overridden for custom behavior.

      Note that for efficiency this should not typically create a new Canvas every time that it is called. Instead usually a single rollOver canvas should be created and updated to reflect the current rollOver row if necessary.

      Return null to avoid showing a rollUnderCanvas for this row.

      See also getFrozenRollUnderCanvas().

      Note: This is an override point.

      Parameters:
      rowNum - index of the current rollOver row.
      colNum - index of the current rollOver column. This parameter will be null unless useCellRollOvers is true for the grid.
      Returns:
      the embedded component
    • getRowCount

      public Integer getRowCount()
      Retrieves the row count for the grid, which may differ from the reported data length if progressive loading is enabled.

      See also getRowCountStatus()

      Returns:
      current row count for the grid
      See Also:
    • getRowCountRange

      public Integer[] getRowCountRange()
      Retrieves the row count range for listGrids where progressive loading is active and the row count has been specified as a range.

      The returned value will be a two element array, containing the min and max bounds for the row-count. Note that if the row count has not been recorded as a range, the first element in the array will be the row count, and the second element will be null.

      Returns:
      minimum and maximum bounds for the row count
      See Also:
    • getRowCountStatus

      public RowCountStatus getRowCountStatus()
      This method indicates whether getRowCount() reflects an accurate row-count for this listGrid. An accurate row count may not currently be available if progressiveLoading is active.

      See RowCountStatus for further details.

      Returns:
      Current row-count status for this grid
      See Also:
    • getRowErrors

      public Map getRowErrors(int rowNum)
      Returns any currently stored validation errors for this row in the following format:
        {fieldName:[array of error messages], ...}
      Parameters:
      rowNum - index of row to check for validation errors.
      Returns:
      object showing validation error arrays by field for the row passed in - if no validation errors stored for the row, null is returned.
      See Also:
    • getRowHeight

      public int getRowHeight(ListGridRecord record, int rowNum)
      Return the height this row should be. Default is this.cellHeight. If fixedRecordHeights is false, the row may be rendered taller than this specified size.

      If records will be variable height, you should switch on virtualScrolling.

      Note if row spanning is enabled, this method should return the height of a single row (with rowSpan set to 1).

      Parameters:
      record - cell record as returned by getCellRecord
      rowNum - row number
      Returns:
      height in pixels
    • getRowNum

      public int getRowNum(ListGridRecord record)
      Synonym of getRecordIndex().
      Parameters:
      record - the record whose index is to be retrieved
      Returns:
      index of the record, or -1 if not found
    • getRowPageTop

      public int getRowPageTop(int rowNum)
      Returns the Y-coordinate for a given row number as a page-relative coordinate. See getRowTop().
      Parameters:
      rowNum -
      Returns:
      Y-coordinate
      See Also:
    • getRowRangeDisplayValue

      public String getRowRangeDisplayValue()
      This method will return a row range summary display value containing the currently visible row range and row count for the data set.

      The RowRangeDisplay label autoChild shows this value as its contents.

      The format of the display value is governed by the RowRangeDisplayStyle

      Returns:
      formatted row range summary value
      See Also:
    • getRowTop

      public int getRowTop(int rowNum)
      Returns the top coordinate for a given row number, relative to the top of body content. Use getRowPageTop() for a page-relative coordinate.

      This method is reliable only for rows that are currently drawn, which is generally only rows that are visible in the viewport. If row heights vary (see fixedRowHeights), coordinates for rows that are not currently shown are rough approximations.

      Parameters:
      rowNum -
      Returns:
      Y-coordinate
      See Also:
    • getSavedViewState

      public String getSavedViewState()
      Returns the view state for this ListGrid as last saved by the autoPersistViewState setting.
      Returns:
      last auto-saved view state for the grid. See ListGridViewState
      See Also:
    • getSelectedRecord

      public ListGridRecord getSelectedRecord()
      Returns the first selected record in this grid.

      This method is appropriate if the selectionType is SelectionStyle.SINGLE, or if you only care about the first selected record in a multiple-record selection. To access all selected records, use getSelection() instead.

      NOTE: If a record is returned, it should be treated as read-only and not modified.

      Returns:
      the first selected record, or null if no record is selected.
      See Also:
    • getSelectedRecords

      public ListGridRecord[] getSelectedRecords()
      Returns all selected records in this grid.

      NOTE: Records in the returned array should be treated as read-only and not modified.

      Returns:
      array of selected records, which will be empty if no record is selected.
      See Also:
    • getSelectedRecords

      public ListGridRecord[] getSelectedRecords(boolean excludePartialSelections)
      Returns all selected records in this grid.

      NOTE: Records in the returned array should be treated as read-only and not modified.

      Parameters:
      excludePartialSelections - When true, partially selected records will not be returned. Otherwise, both fully and partially selected records are returned.
      Returns:
      array of selected records, which will be empty if no record is selected.
      See Also:
    • getSort

      public SortSpecifier[] getSort()
      Returns the current SortSpecifiers for this ListGrid. Will return null if this grid has never been sorted (and has no specified initialSort or sortField).

      Note that if sorting was applied via sort() [rather than setSort()] the sortSpecifiers returned will have been created based on the specified sort field / direction passed into sort().

      Specified by:
      getSort in interface DataBoundComponent
      Returns:
      current sort specifiers for this grid (may be null if this grid is unsorted).
    • getSortFieldCount

      public int getSortFieldCount()
      Returns the number of fields involved in this grid's current sort configuration.
      Returns:
      the number of fields this grid is currently sorted on.
    • getSortNumeralHTML

      public String getSortNumeralHTML(String fieldName, int sortIndex)
      When multiple fields are sorted, this method returns the HTML for the sort-numeral that appears after the sort-arrows in the header-buttons of sorted fields. If you don't want sort-numerals in the header-buttons, you can override this method to return null or an empty string, or set showSortNumerals to false.

      Note that the sortIndex passed in is zero based. The default implementation of this method returns an HTML element with the sortNumeralStyle applied to it, containing the specified sortIndex incremented by 1 (therefore showing the more user-friendly 1-based numbering system).

      Parameters:
      fieldName - The name of a sort-field to get the sortNumeral HTML for.
      sortIndex - The sort index for the field.
      Returns:
      The HTML for this field's sortNumeral. See HTMLString
    • getSortSpecifier

      public SortSpecifier getSortSpecifier(String fieldName)
      Returns the SortSpecifier for the passed fieldName, or null if the field is not sorted.
      Parameters:
      fieldName - The name of a field, visible, hidden or existing only in the dataSource. See FieldName
      Returns:
      for the passed fieldName, or null if the field is not sorted.
      See Also:
    • getSummaryFieldValue

      public String getSummaryFieldValue(ListGridField field, Record record)
      Get the computed value of a summary field.
      Parameters:
      field - field that has a summary format
      record - record to use to compute formula value
      Returns:
      formula result
    • getToggleFreezeText

      public String getToggleFreezeText(ListGridField field)
      If we're showing a headerContextMenu for this grid and this.canFreezeFields is true, this string will be shown as the title for the menu item to toggle whether a field is frozen or unfrozen.

      Default implementation evaluates and returns freezeFieldText or unfreezeFieldText depending on whether the field is currently frozen.

      Parameters:
      field - field to get the menu item title for
      Returns:
      Title to show in the menu item. See HTMLString
    • getUserCriteriaState

      public String getUserCriteriaState()
      Returns a snapshot of the current user-provided criteria for this ListGrid.

      This object can be passed to setUserCriteriaState() to reset this grid's user-criteria to the current state.

      Returns:
      current criteria state for the grid. See ListGridUserCriteriaState
      See Also:
    • getValueIconCursor

      public Cursor getValueIconCursor(ListGridField field, ListGridRecord record, Object value)
      Returns the cursor to display when the mouse pointer is over a valueIcon in a a cell.

      Default behavior will display the ListGridField.iconCursor if specified, otherwise the "pointer" cursor if a ListGridField.valueIconClick() hander is present. (If no valueIconClick handler is defined this method will return null and the cursor will be unchanged when the user rolls over the value icon image).

      Parameters:
      field - field displaying the valueIcon
      record - record being rolled over
      value - value of this cell
      Returns:
      cursor to display when the user rolls over icons in this field's cells. May be null indicating no special cursor to display.
    • addGroupByCompleteHandler

      public HandlerRegistration addGroupByCompleteHandler(GroupByCompleteHandler handler)
      Add a groupByComplete handler.

      Callback fired when the listGrid is grouped or ungrouped.

      Unlike ListGrid.groupBy(), this notification will fire when grouping is complete, and the ListGrid.data object has been updated. On successful grouping the fields argument will list the new grouping and the ListGrid.groupTree will have been updated to reflect the grouped data.

      Note that the fields argument may be an empty array if the data is not grouped. This implies that a user or developer explicitly ungrouped the grid, or that a groupBy attempt failed due to the data length exceeding ListGrid.groupByMaxRecords.

      By design, this method is not called when the data is regrouped, either programmatically, or in response to new data arriving from the server. You can use the callback ListGrid.groupTreeChanged() to be notified in that situation.

      If you monitor only this method and call ListGrid.groupBy() before data is fetched, the notification that you'll receive will be for grouping the initial (perhaps empty) data set only. To have this method actually trigger when grouping of the fetched data is done, you should avoid calling ListGrid.groupBy() before the initial fetch, and instead do it in the the fetch callback.

      Specified by:
      addGroupByCompleteHandler in interface HasGroupByCompleteHandlers
      Parameters:
      handler - the groupByComplete handler
      Returns:
      HandlerRegistration used to remove this handler
    • groupSortNormalizer

      public Object groupSortNormalizer(ListGridRecord record, String fieldName, ListGrid context)
      When sortByGroupFirst is active, the sorting normalizer applied for implicit sorting by the field(s) used for grouping.

      No default implementation.

      Parameters:
      record - record to normalize
      fieldName - name of the field on which sorting occurred. See FieldName
      context - the grid is passed to allow property and method access
      Returns:
      normalized value for sorting
      See Also:
    • addGroupStateChangedHandler

      public HandlerRegistration addGroupStateChangedHandler(GroupStateChangedHandler handler)
      Add a groupStateChanged handler.

      Notification method executed whenever the groupState of this grid changes. Group state is accessible via ListGrid.getGroupState(), and contains group state information.

      Specified by:
      addGroupStateChangedHandler in interface HasGroupStateChangedHandlers
      Parameters:
      handler - the groupStateChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addGroupTreeChangedHandler

      public HandlerRegistration addGroupTreeChangedHandler(GroupTreeChangedHandler handler)
      Add a groupTreeChanged handler.

      Callback fired when a grouping operation completes, whether it started as a direct call to ListGrid.groupBy() or ListGrid.regroup() or data changing, including incremental changes.

      If changeType is "groupBy", ListGrid.groupBy() should have been called at the beginning of the operation, and ListGrid.groupByComplete() will be called immediately before this method. If changeType is "regroup", then ListGrid.regroup() should have been called at the beginning of the operation.

      Specified by:
      addGroupTreeChangedHandler in interface HasGroupTreeChangedHandlers
      Parameters:
      handler - the groupTreeChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addGroupByHandler

      public HandlerRegistration addGroupByHandler(GroupByHandler handler)
      Add a groupBy handler.

      Callback fired when the user attempts to group or ungroup the listGrid, or when ListGrid.groupBy() is called programmatically. This event may be cancelled.

      This notification is fired before the data is updated to reflect the grouping. See also ListGrid.groupByComplete().

      Note that this method is not called when the data is regrouped, either programmatically, or in response to new data arriving from the server, and such regrouping can't be canceled - instead use callback ListGrid.regroup().

      Specified by:
      addGroupByHandler in interface HasGroupByHandlers
      Parameters:
      handler - the groupBy handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRegroupHandler

      public HandlerRegistration addRegroupHandler(RegroupHandler handler)
      Add a regroup handler.

      Callback fired when a regroup operation is begun, either from a direct call to ListGrid.regroup(), or because of data arriving from the server when the grid is already grouped.

      After this call, the Framework should eventually call ListGrid.groupTreeChanged().

      Specified by:
      addRegroupHandler in interface HasRegroupHandlers
      Parameters:
      handler - the regroup handler
      Returns:
      HandlerRegistration used to remove this handler
    • hasChanges

      public Boolean hasChanges()
      Whether the grid as a whole has any unsaved edits, in any row. Note that this method will return true if any rows are marked as removed in addition to any rows that have unsaved edits.

      Note that if this grid is bound to a dataSource, and an asynchronous save has been submitted, this method will compare the local edit values against the submitted values by default, returning false (no changes), if they match. This is useful for detecting whether the user is actively editing values and hasn't yet committed them.

      The ignorePendingValues parameter may be used by developers who want to ignore this case and simply compare edit values against the record in the local data set.

      Returns:
      returns true of any unsaved edits are present
      See Also:
    • hasChanges

      public Boolean hasChanges(Boolean ignorePendingValues)
      Whether the grid as a whole has any unsaved edits, in any row. Note that this method will return true if any rows are marked as removed in addition to any rows that have unsaved edits.

      Note that if this grid is bound to a dataSource, and an asynchronous save has been submitted, this method will compare the local edit values against the submitted values by default, returning false (no changes), if they match. This is useful for detecting whether the user is actively editing values and hasn't yet committed them.

      The ignorePendingValues parameter may be used by developers who want to ignore this case and simply compare edit values against the record in the local data set.

      Parameters:
      ignorePendingValues - If true, this method will compare the current edit values against the underlying records in the dataset, not taking pending edit values into account
      Returns:
      returns true of any unsaved edits are present
      See Also:
    • hasErrors

      public Boolean hasErrors()
      Does this grid currently have errors associated with editValues for any row in the grid.
      Returns:
      true if there are unresolved errors, false otherwise
      See Also:
    • addHeaderDoubleClickHandler

      public HandlerRegistration addHeaderDoubleClickHandler(HeaderDoubleClickHandler handler)
      Add a headerDoubleClick handler.

      Handle a double click in the list header.

      By default, calls ListGrid.autoFitField() if ListGrid.canAutoFitFields is true and ListGrid.headerAutoFitEvent is "doubleClick".

      Specified by:
      addHeaderDoubleClickHandler in interface HasHeaderDoubleClickHandlers
      Parameters:
      handler - the headerDoubleClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addHeaderHoverHandler

      public HandlerRegistration addHeaderHoverHandler(HeaderHoverHandler handler)
      Add a headerHover handler.

      Handle a hover over a button in the header.

      Specified by:
      addHeaderHoverHandler in interface HasHeaderHoverHandlers
      Parameters:
      handler - the headerHover handler
      Returns:
      HandlerRegistration used to remove this handler
    • headerHoverHTML

      public String headerHoverHTML(int fieldNum, String defaultHTML)
      Returns the HTML that is displayed by the default headerHover handler. Return null or an empty string to cancel the hover.

      Use setHeaderHoverFormatter() to provide a custom implementation.

      Parameters:
      fieldNum - field number for the header that was hovered
      defaultHTML - the HTML that would have been displayed by default. See HTMLString
      Returns:
      HTML to be displayed in the hover. If null or an empty string, then the hover is canceled. See HTMLString
      See Also:
    • headerTitleClipped

      public boolean headerTitleClipped(int fieldNum)
      Is the field title for the specified field clipped?
      Parameters:
      fieldNum - field number for the header button title to test
      Returns:
      whether the field title for the specified field is clipped
      See Also:
    • hideDragHandles

      public void hideDragHandles()
      Hides the drag handle field, if currently shown.
      See Also:
    • hideField

      public void hideField(String field)
      Force a field to be hidden.

      NOTE: If a field.showIf expression exists, it will be destroyed.

      Note also that if multiple fields are to be hidden it is more efficient to call hideFields() passing in the array of fields to hide rather than to call this method repeatedly. In particular, this will ensure recalculateSummaries() is only run once.

      Parameters:
      field - field to hide
      See Also:
    • hideField

      public void hideField(String field, boolean suppressRelayout)
      Force a field to be hidden.

      NOTE: If a field.showIf expression exists, it will be destroyed.

      Note also that if multiple fields are to be hidden it is more efficient to call hideFields() passing in the array of fields to hide rather than to call this method repeatedly. In particular, this will ensure recalculateSummaries() is only run once.

      Parameters:
      field - field to hide
      suppressRelayout - if passed, don't relayout non-explicit sized fields to fit the available space
      See Also:
    • hideFields

      public void hideFields(String... fields)
      Force an array of fields to be hidden.

      NOTE: If a field.showIf expression exists, it will be destroyed.

      When hiding multiple fields, this method should be called rather than calling hideField() repeatedly for each field to hide.

      Parameters:
      fields - fields to hide
    • hideFields

      public void hideFields(ListGridField... fields)
      Force an array of fields to be hidden.

      NOTE: If a field.showIf expression exists, it will be destroyed.

      When hiding multiple fields, this method should be called rather than calling hideField() repeatedly for each field to hide.

      Parameters:
      fields - fields to hide
    • hideFields

      public void hideFields(String[] fields, boolean suppressRelayout)
      Force an array of fields to be hidden.

      NOTE: If a field.showIf expression exists, it will be destroyed.

      When hiding multiple fields, this method should be called rather than calling hideField() repeatedly for each field to hide.

      Parameters:
      fields - fields to hide
      suppressRelayout - if passed, don't relayout non-explicit sized fields to fit the available space
    • addHilitesChangedHandler

      public HandlerRegistration addHilitesChangedHandler(HilitesChangedHandler handler)
      Add a hilitesChanged handler.

      Notification method executed whenever the end user uses the HiliteEditor to change the set of hilites applied to this grid. This method will not be called after a purely programmatic change to the hilites made with a call to setHilites(). The array of currently applied hilite objects is accessible via getHilites().

      Specified by:
      addHilitesChangedHandler in interface HasHilitesChangedHandlers
      Parameters:
      handler - the hilitesChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • invalidateRecordComponents

      public void invalidateRecordComponents()
      Invalidates the currently visible set of recordComponents and gets fresh ones for the visible rows in the grid according to the recordComponentPoolingMode

      See also refreshRecordComponent() which allows you to refresh a specific recordComponent

    • isCheckboxField

      public Boolean isCheckboxField(ListGridField field)
      Identifies whether the passed-in field is the specially generated checkboxField used when SelectionAppearance is "checkbox". Use this method in your custom event handlers to avoid inappropriately performing actions when the checkboxField is clicked on.
      Parameters:
      field - field to test
      Returns:
      whether the provided field is the checkbox field
    • isExpanded

      public Boolean isExpanded(ListGridRecord record)
      Whether a given record is expanded or collapsed.
      Parameters:
      record - record in question
      Returns:
      true if the node is expanded
    • isExpansionField

      public Boolean isExpansionField(ListGridField field)
      Identifies whether the passed-in field is the specially generated expansionField used when canExpandRecords is true. Use this method in your custom event handlers to avoid inappropriately performing actions when the expansionField is clicked on.
      Parameters:
      field - field to test
      Returns:
      whether the provided field is the expansion field
    • isExportingClientData

      public boolean isExportingClientData()
      Returns true if this component is currently exporting client data. This method can be called from custom cell formatters if you need to return a different formatted value for an export than for a live ListGrid
      Returns:
      returns true if this component is currently exporting client data
      See Also:
    • isGroupNode

      public boolean isGroupNode(ListGridRecord record)
      If this listGrid is grouped, is the record passed in a group header node.
      Parameters:
      record - record to test
      Returns:
      returns true if the record passed in is a group header node
    • isPartiallySelected

      public Boolean isPartiallySelected(ListGridRecord record)
      When using tree-oriented selection modes like TreeGrid.cascadeSelection, returns true if the record is considered partially selected because only some of it's children are selected.
      Parameters:
      record - record to check
      Returns:
      true if record is partially selected; false otherwise
      See Also:
    • isRowNumberField

      public Boolean isRowNumberField(ListGridField field)
      Identifies whether the passed-in field is the specially generated rowNumberField used when showRowNumbers is true. Use this method in your custom event handlers to avoid inappropriately performing actions when the rowNumberField is clicked on.
      Parameters:
      field - field to test
      Returns:
      whether the provided field is the rowNumberField
    • isSelected

      public Boolean isSelected(ListGridRecord record)
      Returns true if the record is selected.
      Parameters:
      record - record to check
      Returns:
      true if record is selected; false otherwise
      See Also:
    • isSortField

      public Boolean isSortField(String fieldName)
      Returns true if the passed fieldName is in the current sort-specification.
      Parameters:
      fieldName - The name of a field, which may be visible, hidden or existing only in the dataSource. See FieldName
      Returns:
      true if the component is sorted by the specified field; false otherwise.
      See Also:
    • isSummaryRecord

      public boolean isSummaryRecord(ListGridRecord record)
      Returns whether the supplied record is a group or grid summary record. Useful in conjunction with getGroupMembers() for determining which records are group summary records.
      Parameters:
      record - Record object such as from getGroupMembers()
      Returns:
      whether record is summary
    • loadAllRecords

      public Boolean loadAllRecords()
      Loads all records that match this grid's current filter-criteria, optionally firing a callback when the data arrives.

      If the length of the data is not known, or is greater than the passed maxRecords, this call returns false. No fetch is issued and the callback, if passed, is not fired.

      If all data is already loaded, no fetch is issued and this call returns true. The callback, if passed, will be fired, but its parameters will be null, since there was no fetch to provide the values from.

      In all other cases, this call returns true and a fetch is issued for all necessary records. When the data arrives, the callback is fired.

      Returns:
      true if a fetch was made or was not needed - false otherwise
    • loadAllRecords

      public Boolean loadAllRecords(Integer maxRecords)
      See Also:
    • loadAllRecords

      public Boolean loadAllRecords(Integer maxRecords, DSCallback callback)
      Loads all records that match this grid's current filter-criteria, optionally firing a callback when the data arrives.

      If the length of the data is not known, or is greater than the passed maxRecords, this call returns false. No fetch is issued and the callback, if passed, is not fired.

      If all data is already loaded, no fetch is issued and this call returns true. The callback, if passed, will be fired, but its parameters will be null, since there was no fetch to provide the values from.

      In all other cases, this call returns true and a fetch is issued for all necessary records. When the data arrives, the callback is fired.

      Parameters:
      maxRecords - optional maximum record count - if passed, no fetch takes place if maxRecords is below the known length of the data
      callback - callback to fire if a fetch is issued - if all data was already loaded, the callback is fired with no parameters
      Returns:
      true if a fetch was made or was not needed - false otherwise
    • markForRedraw

      public void markForRedraw()
      Marks the widget as "dirty" so that it will be added to a queue for redraw. Redraw of dirty components is handled by a looping timer and will after a very short delay (typically less than 100ms). In most cases it is recommended that developers use markForRedraw() instead of calling Canvas.redraw() directly. Since this method queues the redraw, multiple calls to markForRedraw() within a single thread of execution will only lead to a single DOM manipulation which greatly improves application performance.
      Overrides:
      markForRedraw in class Canvas
      See Also:
    • markForRedraw

      public void markForRedraw(String reason)
      Marks the widget as "dirty" so that it will be added to a queue for redraw. Redraw of dirty components is handled by a looping timer and will after a very short delay (typically less than 100ms). In most cases it is recommended that developers use markForRedraw() instead of calling Canvas.redraw() directly. Since this method queues the redraw, multiple calls to markForRedraw() within a single thread of execution will only lead to a single DOM manipulation which greatly improves application performance.
      Overrides:
      markForRedraw in class Canvas
      Parameters:
      reason - reason for performing the redraw
      See Also:
    • markRecordRemoved

      public void markRecordRemoved(int rowNum)
      Marks a record deleted such that a later call to saveEdits() or saveAllEdits() will cause a "remove" DSRequest to be submitted.

      A removed record is disabled and non-editable, and uses removedCSSText for its CSS style, which by default will show strikethrough text.

      Contrast this method with removeSelectedData(), which immediately submits a DSRequest to remove the selected records from the dataset.

      Records that have been marked for removal using this method may be 'unmarked' via a call to unmarkRecordRemoved(), or by discarding edit values (discardEdits()).

      Parameters:
      rowNum - row number for the record to mark
      See Also:
    • markRecordsRemoved

      public void markRecordsRemoved(ListGridRecord... records)
      Marks an array of records deleted such that a later call to saveEdits() or saveAllEdits() will cause a "remove" DSRequest to be submitted.

      This method is similar to markRecordRemoved() but should be more efficient in avoiding unneeded duplicate refreshes due to the multiple records getting marked.

      Parameters:
      records - records or indices to mark removed
      See Also:
    • markRecordsRemoved

      public void markRecordsRemoved(int records)
      Marks an array of records deleted such that a later call to saveEdits() or saveAllEdits() will cause a "remove" DSRequest to be submitted.

      This method is similar to markRecordRemoved() but should be more efficient in avoiding unneeded duplicate refreshes due to the multiple records getting marked.

      Parameters:
      records - records or indices to mark removed
      See Also:
    • markRecordsRemoved

      public void markRecordsRemoved(RecordList records)
      Marks an array of records deleted such that a later call to saveEdits() or saveAllEdits() will cause a "remove" DSRequest to be submitted.

      This method is similar to markRecordRemoved() but should be more efficient in avoiding unneeded duplicate refreshes due to the multiple records getting marked.

      Parameters:
      records - records or indices to mark removed
      See Also:
    • markSelectionRemoved

      public void markSelectionRemoved()
      Marks the currently selected records as removed, as though markRecordRemoved() had been called.
      See Also:
    • addBodyKeyPressHandler

      public HandlerRegistration addBodyKeyPressHandler(BodyKeyPressHandler handler)
      Add a bodyKeyPress handler.

      Handle a keyPress event on the body.

      Default implementation handles navigating between records with arrow keys, and activating records with space and enter.

      Specified by:
      addBodyKeyPressHandler in interface HasBodyKeyPressHandlers
      Parameters:
      handler - the bodyKeyPress handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRecordCollapseHandler

      public HandlerRegistration addRecordCollapseHandler(RecordCollapseHandler handler)
      Add a recordCollapse handler.

      Handler fired when a record is collapsed in a grid with canExpandRecords set to true. Allows the collapse to be cancelled.

      Specified by:
      addRecordCollapseHandler in interface HasRecordCollapseHandlers
      Parameters:
      handler - the recordCollapse handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRecordExpandHandler

      public HandlerRegistration addRecordExpandHandler(RecordExpandHandler handler)
      Add a recordExpand handler.

      Handler fired when a record is expanded in a grid with canExpandRecords set to true. Allows the expansion to be cancelled.

      Specified by:
      addRecordExpandHandler in interface HasRecordExpandHandlers
      Parameters:
      handler - the recordExpand handler
      Returns:
      HandlerRegistration used to remove this handler
    • addHeaderClickHandler

      public HandlerRegistration addHeaderClickHandler(HeaderClickHandler handler)
      Add a headerClick handler.

      Handler fired when the user clicks a header in this listGrid before any other processing occurs. Call HeaderClickEvent.cancel() from within HeaderClickHandler.onHeaderClick(com.smartgwt.client.widgets.grid.events.HeaderClickEvent) to suppress the default header click handling

      Specified by:
      addHeaderClickHandler in interface HasHeaderClickHandlers
      Parameters:
      handler - the headerClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRecordClickHandler

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

      Executed when the listGrid receives a 'click' event on an enabled, non-separator record. The default implementation does nothing -- override to perform some action when any record or field is clicked.
      A record event handler can be specified either as a function to execute, or as a string of script to evaluate. If the handler is defined as a string of script, all the parameters below will be available as variables for use in the script.
      To do something specific if a particular field is clicked, add a recordClick method or string of script to that field (same parameters) when you're setting up the list.
      Notes:

      • This will not be called if the click is below the last item of the list.
      • This method is called from the default implementation of ListGrid.rowClick(), so if that method is overridden this method may not be fired.
      Specified by:
      addRecordClickHandler in interface HasRecordClickHandlers
      Parameters:
      handler - the recordClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRecordDropHandler

      public HandlerRegistration addRecordDropHandler(RecordDropHandler handler)
      Add a recordDrop handler.

      Process a drop of one or more records on a ListGrid record.

      This method can be overridden to provide custom drop behaviors, and is a more appropriate override point than the lower level Canvas.drop() handler.

      If this is a self-drop, records are simply reordered.

      For a drop from another widget, ListGrid.transferDragData() is called, which depending on the dragDataAction specified on the source widget, may either remove the source records from the original list (dragDataAction:"move") or just provide a copy to this list (dragDataAction:"copy").

      If this grid is databound, the new records will be added to the dataset by calling DataSource.addData(). Further, if the new records were dragged from another databound component, and addDropValues is true, getDropValues will be called for every item being dropped.

      For multi-record drops, Queuing is automatically used to combine all DSRequests into a single HTTP Request (see QuickStart Guide, Server Framework chapter). This allows the server to persist all changes caused by the drop in a single transaction (and this is automatically done when using the built-in server DataSources with Power Edition and above).

      Note that reordering records has no effect on a databound grid.

      The newly dropped data is then selected automatically.

      If these default persistence behaviors are undesirable, Call RecordDropEvent.cancel() from within RecordDropHandler.onRecordDrop(com.smartgwt.client.widgets.grid.events.RecordDropEvent) to cancel them, then and implement your own behavior, typically by using grid.updateData() or addData() to add new records.

      NOTE: the records you receive in this event are the actual Records from the source component. Use DataSource.copyRecords() to create a copy before modifying the records or using them with updateData() or addData().

      NOTE: for a drop beyond the last visible record of a ListGrid, targetRecord will be null and the index will be one higher than the last record. This includes a drop into an empty ListGrid, where index will be 0.

      Specified by:
      addRecordDropHandler in interface HasRecordDropHandlers
      Parameters:
      handler - the recordDrop handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRemoveRecordClickHandler

      public HandlerRegistration addRemoveRecordClickHandler(RemoveRecordClickHandler handler)
      Add a removeRecordClick handler.

      Handler fired when the user clicks the "remove" icon if ListGrid.canRemoveRecords is true. Default behavior will remove the record from the data set, or if we're deferring removal mark the record as removed [or for records already marked as removed, clear this removed marker].

      If ListGrid.warnOnRemoval is set, this method will also show a warning dialog to users allowing them to cancel the removal.

      This event may be cancelled to suppress the default behavior.

      Specified by:
      addRemoveRecordClickHandler in interface HasRemoveRecordClickHandlers
      Parameters:
      handler - the removeRecordClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • openGroup

      public boolean openGroup(Record record)
      Opens the node represented by the "record" parameter, if it is a folder and is not already open. This method only applies to grouped ListGrids.
      Parameters:
      record - node to open
      Returns:
      true if the node was opened, false if it was not (either because it is not a folder, or because it was already open)
    • recalculateGridSummary

      public void recalculateGridSummary()
      Refresh the grid summary, by either re-calculating from already-loaded data or doing a new fetch from the summaryRowDataSource.

      Note unlike recalculateSummaries(), this method will not force a refresh of field-level summaries (see ListGridField.recordSummaryFunction) or group level summaries (see showGroupSummary).

    • recalculateSummaries

      public void recalculateSummaries()
      Recalculates values for fields with summary-functions or user formulae defined and for values displayed in the grid summary and group summary rows.
    • recalculateSummaries

      public void recalculateSummaries(Record... records)
      See Also:
    • recalculateSummaries

      public void recalculateSummaries(Record[] records, ListGridField... fields)
      Recalculates values for fields with summary-functions or user formulae defined and for values displayed in the grid summary and group summary rows.
      Parameters:
      records - Optional array of records to recalculate summaries for, or null for all records
      fields - Optional array of fields to recalculate summaries for, or null for all fields

      Note that the records should be from data; thus, if the grid is grouped, the records should be from the grouped data rather than originalData.

    • recordClick

      public Boolean recordClick(ListGrid viewer, ListGridRecord record, int recordNum, ListGridField field, int fieldNum, Object value, Object rawValue, ListGridRecord editedRecord)
      Executed when the listGrid receives a 'click' event on an enabled, non-separator record. The default implementation does nothing -- override to perform some action when any record or field is clicked.
      A record event handler can be specified either as a function to execute, or as a string of script to evaluate. If the handler is defined as a string of script, all the parameters below will be available as variables for use in the script.
      To do something specific if a particular field is clicked, add a recordClick method or string of script to that field (same parameters) when you're setting up the list.
      Notes:
      • This will not be called if the click is below the last item of the list.
      • This method is called from the default implementation of rowClick(), so if that method is overridden this method may not be fired.
      Parameters:
      viewer - the listGrid that contains the click event
      record - the record that was clicked on
      recordNum - number of the record clicked on in the current set of displayed records (starts with 0)
      field - the field that was clicked on (field definition)
      fieldNum - number of the field clicked on in the listGrid.fields array
      value - value of the cell (after valueMap, etc. applied)
      rawValue - raw value of the cell (before valueMap, etc applied)
      editedRecord - the clicked record with any unsaved edit values overlaid (see listGrid.getEditedRecord()).
      Returns:
      return false to cancel default behavior
      See Also:
    • addRecordDoubleClickHandler

      public HandlerRegistration addRecordDoubleClickHandler(RecordDoubleClickHandler handler)
      Add a recordDoubleClick handler.

      Executed when the listGrid receives a 'doubleClick' event on an enabled, non-separator record. The default implementation does nothing -- override to perform some action when any record or field is double clicked.
      A record event handler can be specified either as a function to execute, or as a string of script to evaluate. If the handler is defined as a string of script, all the parameters below will be available as variables for use in the script.
      To do something specific if a particular field is double clicked, add a recordDoubleClick method or string of script to that field (same parameters) when you're setting up the list.
      Notes:

      • This will not be called if the click is below the last item of the list.
      • This method is called from the default implementation of ListGrid.rowDoubleClick(), so if that method is overridden this method may not be fired.
      Specified by:
      addRecordDoubleClickHandler in interface HasRecordDoubleClickHandlers
      Parameters:
      handler - the recordDoubleClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • recordMarkedAsRemoved

      public Boolean recordMarkedAsRemoved(int rowNum)
      Returns true if the specified record is marked as removed via a call to markRecordRemoved()
      Parameters:
      rowNum - index of row to verify
      Returns:
      true if the specified record has been marked for removal
      See Also:
    • redrawHeader

      public void redrawHeader(boolean rightNow)
      Redraw just the grid header
      Parameters:
      rightNow - If true, redraw the grid header with a direct inline call to its redraw() method. Otherwise, mark the header for redraw
    • refreshCell

      public void refreshCell(int rowNum, int colNum)
      Refresh an individual cell without redrawing the grid.

      The cell's value, CSS class, and CSS text will be refreshed, to the current values returned by getCellValue(), getCellStyle(), and getCellCSSText(), respectively. Also, if displaying a standard hover (not a hover component), re-checks to see if the hover should continue to be displayed, hiding the hover if not, or updating the hover if so.

      Parameters:
      rowNum - row number of cell to refresh
      colNum - column number of cell to refresh
      See Also:
    • refreshCellStyle

      public void refreshCellStyle(int rowNum, int colNum)
      Refresh the styling of an individual cell without redrawing the grid.

      The cell's CSS class and CSS text will be refreshed, to the current values returned by getCellStyle() and getCellCSSText() respectively.

      The cell's contents (as returned by getCellValue()) will not be refreshed. To refresh both styling and contents, call refreshCell() instead.

      Parameters:
      rowNum - row number of cell to refresh
      colNum - column number of cell to refresh
      See Also:
    • refreshData

      public void refreshData()
      Unlike invalidateCache this will perform an asynchronous (background) refresh of this component's data and then call the provided callback method on completion. A grid needs to have a DataSource associated with it to use this method.

      If refreshData() is called while the grid is waiting for a response from fetchData() the refreshData() call will be aborted. This is because the fetch has higher priority.

      If fetchData() is called while the grid is waiting for a response from refreshData() and the fetchData() call has altered the criteria or sort specifiers, the refreshData() call will be aborted.

      If data is being edited or has been edited without being saved when refreshData() is called, the data will be retained so you can save it after the refresh is complete. If you however want to throw away your edited but unsaved data when calling refreshData() you first need to call discardAllEdits() which will discard any unsaved edited data.

      Note that for a TreeGrid with TreeGrid.loadDataOnDemand: true, all currently opened parent nodes will be re-fetched, except for paged TreeGrids, for which only opened parent nodes that are visible or contain visible children are re-fetched. We do this in a single queued batch of fetches to maximize efficiency.

      Except for changes to the dataset length, dataChanged() is not fired after refreshData(), as the Framework is not in a position to know for sure if data has actually changed (which would require traversing the entire dataset to determine) and whether criteria, sort or other specifiers of the dataset also have not changed. Applications that need to take action on refreshData() should use the callback to do so.

      See Also:
    • refreshData

      public void refreshData(DSCallback callback)
      Unlike invalidateCache this will perform an asynchronous (background) refresh of this component's data and then call the provided callback method on completion. A grid needs to have a DataSource associated with it to use this method.

      If refreshData() is called while the grid is waiting for a response from fetchData() the refreshData() call will be aborted. This is because the fetch has higher priority.

      If fetchData() is called while the grid is waiting for a response from refreshData() and the fetchData() call has altered the criteria or sort specifiers, the refreshData() call will be aborted.

      If data is being edited or has been edited without being saved when refreshData() is called, the data will be retained so you can save it after the refresh is complete. If you however want to throw away your edited but unsaved data when calling refreshData() you first need to call discardAllEdits() which will discard any unsaved edited data.

      Note that for a TreeGrid with TreeGrid.loadDataOnDemand: true, all currently opened parent nodes will be re-fetched, except for paged TreeGrids, for which only opened parent nodes that are visible or contain visible children are re-fetched. We do this in a single queued batch of fetches to maximize efficiency.

      Except for changes to the dataset length, dataChanged() is not fired after refreshData(), as the Framework is not in a position to know for sure if data has actually changed (which would require traversing the entire dataset to determine) and whether criteria, sort or other specifiers of the dataset also have not changed. Applications that need to take action on refreshData() should use the callback to do so.

      Parameters:
      callback - callback method to run once the refresh completes.
      See Also:
    • refreshFields

      public void refreshFields()
      Re-evaluates ListGridField.showIf() for each field, dynamically showing and hiding the appropriate set of fields
    • refreshRecordComponent

      public void refreshRecordComponent(int rowNum)
      Discards any recordComponent currently assigned to the specified record (or cell) and gets a fresh one, according to the recordComponentPoolingMode

      See also invalidateRecordComponents() which allows you to refresh all record components that are currently visible in the grid.

      Parameters:
      rowNum - Row to refresh
    • refreshRecordComponent

      public void refreshRecordComponent(int rowNum, Integer colNum)
      Discards any recordComponent currently assigned to the specified record (or cell) and gets a fresh one, according to the recordComponentPoolingMode

      See also invalidateRecordComponents() which allows you to refresh all record components that are currently visible in the grid.

      Parameters:
      rowNum - Row to refresh
      colNum - Column to refresh. This parameter should be passed if showRecordComponentsByCell is true.
    • refreshRow

      public void refreshRow(int rowNum)
      Refresh an entire row of cells without redrawing the grid.

      The cells' values, CSS classes, and CSS text will be refreshed, to the current values returned by getCellValue(), getCellStyle() and getCellCSSText(), respectively. Also, if displaying a standard hover (not a hover component), re-checks to see if the hover should continue to be displayed, hiding the hover if not, or updating the hover if so.

      Parameters:
      rowNum - row number of cell to refresh
      See Also:
    • regroup

      public void regroup()
      Programmatically regroup the grid according to the current grouping configuration.
      See Also:
    • removeData

      public void removeData(Record data)
      Remove a record from this ListGrid.

      If this grid is bound to a DataSource, it will perform a DataSource "remove" operation to remove records from this component's DataSource.

      Otherwise the data will be removed from the grid's data object.

      To make changes to the local data object even when a DataSource is present, use saveLocally.

      Parameters:
      data - listGrid record, or primary key values of record to delete.
      See Also:
    • removeData

      public void removeData(Record data, DSCallback callback)
      See Also:
    • removeData

      public void removeData(Record data, DSCallback callback, DSRequest requestProperties)
      Remove a record from this ListGrid.

      If this grid is bound to a DataSource, it will perform a DataSource "remove" operation to remove records from this component's DataSource.

      Otherwise the data will be removed from the grid's data object.

      To make changes to the local data object even when a DataSource is present, use saveLocally.

      Parameters:
      data - listGrid record, or primary key values of record to delete.
      callback - method to call on operation completion. Note that if this is method does not trigger a dataSource remove operation, the callback will still be fired when the data has been removed, but the dsResponse parameter will be null.
      requestProperties - additional properties to set on any DSRequest that will be issued
      See Also:
    • removeEmbeddedComponent

      public void removeEmbeddedComponent(ListGridRecord record)
      Removes an embedded component previously associated with the provided record. If a Canvas is passed as the record parameter, it is assumed to be a component and the record is detected automatically from it. If destroyOnUnEmbed is true for the component, it will also be destroyed.
      Parameters:
      record - record that the component was previously attached to or the component itself
    • removeEmbeddedComponent

      public void removeEmbeddedComponent(ListGridRecord record, Integer component)
      Removes an embedded component previously associated with the provided record. If a Canvas is passed as the record parameter, it is assumed to be a component and the record is detected automatically from it. If destroyOnUnEmbed is true for the component, it will also be destroyed.
      Parameters:
      record - record that the component was previously attached to or the component itself
      component - component to unembed, or the colNum in which it appears
    • removeRecordClick

      public void removeRecordClick(int rowNum)
      Method fired when the user clicks the "remove" icon if canRemoveRecords is true. Default behavior will remove the record from the data set, or if we're deferring removal mark record as removed [or for records already marked as removed, clear this removed marker].

      If warnOnRemoval is set, this method will also show a warning dialog to users allowing them to cancel the removal.

      This method may be called directly to cause a record to be removed or marked for removal as if the user had hit the "remove" icon.

      To be notified when a "remove" click occurs, developers should add a * RemoveRecordClickHandler.

      Parameters:
      rowNum - Row on which the icon was clicked
    • removeSelectedData

      public void removeSelectedData()
      Remove the currently selected records from this component. If this is a databound grid, the records will be removed directly from the DataSource. The grid will automatically be updated if the record deletion succeeds.

      If no records are selected, no action is taken and neither callback will be called.

      For a grid with no DataSource or where saveLocally is true, the data removal is performed on the client and both callbacks will fire with no arguments.

      See Also:
    • removeSelectedData

      public void removeSelectedData(DSCallback callback)
      See Also:
    • removeSelectedData

      public void removeSelectedData(DSCallback callback, DSRequest requestProperties)
      See Also:
    • removeSelectedData

      public void removeSelectedData(DSCallback callback, DSRequest requestProperties, RPCQueueCallback queueCallback)
      Remove the currently selected records from this component. If this is a databound grid, the records will be removed directly from the DataSource. The grid will automatically be updated if the record deletion succeeds.

      If no records are selected, no action is taken and neither callback will be called.

      For a grid with no DataSource or where saveLocally is true, the data removal is performed on the client and both callbacks will fire with no arguments.

      Parameters:
      callback - callback to fire when each record has been removed
      requestProperties - additional properties to set on the DSRequest that will be issued
      queueCallback - callback to fire after all selected data has been removed
      See Also:
    • reorderField

      public void reorderField(int fieldNum, int moveToPosition)
      Reorder a particular field
      Parameters:
      fieldNum - Number of the field to reorder
      moveToPosition - New position for that field
    • reorderFields

      public void reorderFields(int start, int end, int moveDelta)
      Reorder a set of adjacent fields, from start to end exclusive at the end, by distance moveDelta.

      NOTE: start and end coordinates are in terms of the currently visible fields, not the full set of fields.
      Parameters:
      start - Start of the range of fields to move, inclusive
      end - End of the range of fields to move, non-inclusive
      moveDelta - Distance to move by
    • resizeField

      public void resizeField(int fieldNum, int newWidth)
      Resize a particular field to a new width. Note that this method will also set ListGridField.autoFitWidth to false if it was previously true.
      Parameters:
      fieldNum - Number of the field to resize
      newWidth - New width of the field
    • resort

      public void resort()
      If a list has become unsorted due to data modification or a call to unsort(), this method will resort the list by the previous sort-specifier array, if there is one, or by the previous sort-field and -direction.
    • rowClick

      public void rowClick(ListGridRecord record, int recordNum, int fieldNum)
      Event handler for when rows in the body are clicked upon. The default implementation handles firing startEditing() if appropriate, and fires ListGridField.recordClick() and/or recordClick() if set. Developers should typically implement recordClick rather than overriding this method.

      Note that this method fires in addition to any specified ListGrid.cellClick() handler (even if that method cancels the event as a whole by returning false).

      Parameters:
      record - record object returned from getCellRecord()
      recordNum - index of the row where the click occurred
      fieldNum - index of the col where the click occurred
      See Also:
    • rowClick

      public void rowClick(ListGridRecord record, int recordNum, int fieldNum, boolean keyboardGenerated)
      Event handler for when rows in the body are clicked upon. The default implementation handles firing startEditing() if appropriate, and fires ListGridField.recordClick() and/or recordClick() if set. Developers should typically implement recordClick rather than overriding this method.

      Note that this method fires in addition to any specified ListGrid.cellClick() handler (even if that method cancels the event as a whole by returning false).

      Parameters:
      record - record object returned from getCellRecord()
      recordNum - index of the row where the click occurred
      fieldNum - index of the col where the click occurred
      keyboardGenerated - indicates whether this was a synthesized record click in response to a keyboard event
      See Also:
    • addRowContextClickHandler

      public HandlerRegistration addRowContextClickHandler(RowContextClickHandler handler)
      Add a rowContextClick handler.

      Called when a row receives a contextclick event.

      Specified by:
      addRowContextClickHandler in interface HasRowContextClickHandlers
      Parameters:
      handler - the rowContextClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • rowDoubleClick

      public void rowDoubleClick(ListGridRecord record, int recordNum, int fieldNum)
      Event handler for when a body record is double-clicked.

      Default implementation fires 'editCell' if appropriate, and handles firing 'recordDoubleClick' stringMethod if defined at the field or LG level (That method has a different signature from this one)

      Parameters:
      record - record object returned from getCellRecord()
      recordNum - index of the row where the click occurred
      fieldNum - index of the col where the click occurred
      See Also:
    • rowDoubleClick

      public void rowDoubleClick(ListGridRecord record, int recordNum, int fieldNum, boolean keyboardGenerated)
      Event handler for when a body record is double-clicked.

      Default implementation fires 'editCell' if appropriate, and handles firing 'recordDoubleClick' stringMethod if defined at the field or LG level (That method has a different signature from this one)

      Parameters:
      record - record object returned from getCellRecord()
      recordNum - index of the row where the click occurred
      fieldNum - index of the col where the click occurred
      keyboardGenerated - indicates whether this was a synthesized record doubleclick in response to a keyboard event
      See Also:
    • addRowEditorEnterHandler

      public HandlerRegistration addRowEditorEnterHandler(RowEditorEnterHandler handler)
      Add a rowEditorEnter handler.

      Callback fired when the user starts editing a new row.

      Specified by:
      addRowEditorEnterHandler in interface HasRowEditorEnterHandlers
      Parameters:
      handler - the rowEditorEnter handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRowEditorExitHandler

      public HandlerRegistration addRowEditorExitHandler(RowEditorExitHandler handler)
      Add a rowEditorExit handler.

      Callback fired when the user attempts to navigate away from the current edit row, or complete the current edit.

      Call RowEditorExitEvent.cancel() from within RowEditorExitHandler.onRowEditorExit(com.smartgwt.client.widgets.grid.events.RowEditorExitEvent) from this method to cancel the default behavior (Saving / cancelling the current edit / moving to the next edit cell).

      Specified by:
      addRowEditorExitHandler in interface HasRowEditorExitHandlers
      Parameters:
      handler - the rowEditorExit handler
      Returns:
      HandlerRegistration used to remove this handler
    • rowHasChanges

      public Boolean rowHasChanges(int rowNum)
      If this listGrid can be edited, this method will return true if the row passed in has been edited, but the edits have not yet been saved to the ListGrid's data object.

      Note this method will not return true if a record has been marked as removed, but has no other changes. Developers can use recordMarkedAsRemoved() to check for this case.

      Note that if this grid is bound to a dataSource, and an asynchronous save has been submitted, this method will compare the local edit values against the submitted values by default, returning false (no changes), if they match. This is useful for detecting whether the user is actively editing values and hasn't yet committed them.

      The ignorePendingValues parameter may be used by developers who want to ignore this case and simply compare edit values against the record in the local data set.

      Parameters:
      rowNum - index of row to check for changes
      Returns:
      true if the row has changes.
      See Also:
    • rowHasChanges

      public Boolean rowHasChanges(int rowNum, Boolean ignorePendingValues)
      If this listGrid can be edited, this method will return true if the row passed in has been edited, but the edits have not yet been saved to the ListGrid's data object.

      Note this method will not return true if a record has been marked as removed, but has no other changes. Developers can use recordMarkedAsRemoved() to check for this case.

      Note that if this grid is bound to a dataSource, and an asynchronous save has been submitted, this method will compare the local edit values against the submitted values by default, returning false (no changes), if they match. This is useful for detecting whether the user is actively editing values and hasn't yet committed them.

      The ignorePendingValues parameter may be used by developers who want to ignore this case and simply compare edit values against the record in the local data set.

      Parameters:
      rowNum - index of row to check for changes
      ignorePendingValues - If true, this method will compare the current edit values against the underlying record in the dataset, not taking pending edit values into account
      Returns:
      true if the row has changes.
      See Also:
    • rowHasErrors

      public Boolean rowHasErrors(int rowNum)
      Does the specified row have unresolved errors?
      Parameters:
      rowNum - rowNum to check for errors
      Returns:
      true if there are unresolved errors, false otherwise
      See Also:
    • addRowHoverHandler

      public HandlerRegistration addRowHoverHandler(RowHoverHandler handler)
      Add a rowHover handler.

      Called when the mouse hovers over a row if this.canHover is true. Returning false will suppress the hover text from being shown if this.showHover is true.

      Specified by:
      addRowHoverHandler in interface HasRowHoverHandlers
      Parameters:
      handler - the rowHover handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRowMouseDownHandler

      public HandlerRegistration addRowMouseDownHandler(RowMouseDownHandler handler)
      Add a rowMouseDown handler.

      Called when a row receives a mousedown event.

      Specified by:
      addRowMouseDownHandler in interface HasRowMouseDownHandlers
      Parameters:
      handler - the rowMouseDown handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRowMouseUpHandler

      public HandlerRegistration addRowMouseUpHandler(RowMouseUpHandler handler)
      Add a rowMouseUp handler.

      Called when a row receives a mouseup event.

      Specified by:
      addRowMouseUpHandler in interface HasRowMouseUpHandlers
      Parameters:
      handler - the rowMouseUp handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRowOutHandler

      public HandlerRegistration addRowOutHandler(RowOutHandler handler)
      Add a rowOut handler.

      Called when the mouse pointer leaves a row

      Specified by:
      addRowOutHandler in interface HasRowOutHandlers
      Parameters:
      handler - the rowOut handler
      Returns:
      HandlerRegistration used to remove this handler
    • addRowOverHandler

      public HandlerRegistration addRowOverHandler(RowOverHandler handler)
      Add a rowOver handler.

      Called when the mouse pointer enters a row

      Specified by:
      addRowOverHandler in interface HasRowOverHandlers
      Parameters:
      handler - the rowOver handler
      Returns:
      HandlerRegistration used to remove this handler
    • saveEdits

      public void saveEdits()
      Validates and saves edits within the row currently being edited (or another row with unsaved edits, if indicated).

      This method can be called to manually trigger saves if the default mechanisms of cell by cell or row by row saving are not suitable.

      The 'callback' parameter provides a notification when the save attempt completes, which is likely to be asynchronous for databound grids. Cases under which the callback will fire are:

      • Save completed successfully
      • No changes to the edited row, so save not required
      • Validation failure occurred on the client or on the server
      Note that if this method was unable to determine the row to be saved, the callback will NOT fire - in this case, the method is a no-op.

      Other, standard callbacks such as ListGrid.editComplete(), ListGrid.editFailed() and ListGrid.cellSaved() will fire normally.

      Note this method does not hide the inline editors if they are showing - to explicitly save and end editing, use the method 'endEditing()'

      If this method is called for a row which has been marked for deletion (see markRecordRemoved()) it will cause the record to be removed from the data-set.

      For more information on editing, see the editing overview.

      See Also:
    • saveEdits

      public void saveEdits(EditCompletionEvent editCompletionEvent)
      See Also:
    • saveEdits

      public void saveEdits(EditCompletionEvent editCompletionEvent, String callback)
      See Also:
    • saveEdits

      public void saveEdits(EditCompletionEvent editCompletionEvent, String callback, int rowNum)
      Validates and saves edits within the row currently being edited (or another row with unsaved edits, if indicated).

      This method can be called to manually trigger saves if the default mechanisms of cell by cell or row by row saving are not suitable.

      The 'callback' parameter provides a notification when the save attempt completes, which is likely to be asynchronous for databound grids. Cases under which the callback will fire are:

      • Save completed successfully
      • No changes to the edited row, so save not required
      • Validation failure occurred on the client or on the server
      Note that if this method was unable to determine the row to be saved, the callback will NOT fire - in this case, the method is a no-op.

      Other, standard callbacks such as ListGrid.editComplete(), ListGrid.editFailed() and ListGrid.cellSaved() will fire normally.

      Note this method does not hide the inline editors if they are showing - to explicitly save and end editing, use the method 'endEditing()'

      If this method is called for a row which has been marked for deletion (see markRecordRemoved()) it will cause the record to be removed from the data-set.

      For more information on editing, see the editing overview.

      Parameters:
      editCompletionEvent - Event used to complete cell editing. Optional, and defaults to "programmatic". Can be used by the callback method to perform custom actions such as navigation when the save completes.
      callback - Callback to fire on completion of the saving process. If no edits were made or client-side validation fails the callback will be fired synchronously at the end of this method.
      Takes the following parameters:
      - rowNum (Number) edited row number
      - colNum (Number) edited column number
      - editCompletionEvent (EditCompletionEvent) event passed in (defaults to "programmatic")
      - success (boolean) false if the save was unable to complete due to a validation failure or server-side error.. See Callback
      rowNum - Which row should be saved. If unspecified the current edit row is saved by default. Note that if there is no current edit row this method will no op.
      See Also:
    • scrollToCell

      public void scrollToCell(int rowNum, int colNum)
      Will scroll the listGrid body such that the specified cell is visible close to the center of the viewport.

      This method has no effect if the cell is already visible in the viewport.

      When scrolling vertically, this will cause data to be automatically loaded if paging is active and you scroll into an area of the data that isn't loaded. Only rows around the target row will be loaded, not all intervening rows. See also ResultSet.

      Scrolling into an undrawn area will cause the body area of the grid to redraw, but this won't happen synchronously unless you explicitly call redraw(). Scrolling into an area of the data that is not yet loaded will never synchronously draw new rows, even if you call redraw() - wait for ListGrid.dataArrived() to be notified when new rows have been loaded.

      Calling this method with a row index larger than the current dataset will clamp to the end of the dataset (similarly horizontal scrolling will clamp to the last column).

      If a call to this method is made while data is still loading, such that the last row of the dataset is not yet known the grid will attempt to compensate by scrolling the record into view when data arrives, if it is valid. For better control over scrolling, developers should consider calling scrollToRow() or scrollToCell from ListGrid.dataArrived() if data is still loading.

      With mixed-height rows it will only reliably work if virtualScrolling is enabled.

      Parameters:
      rowNum - Row index of the cell to scroll into view
      colNum - Column index of the cell to scroll into view
      See Also:
    • scrollToCell

      public void scrollToCell(int rowNum, int colNum, Alignment xPosition)
      See Also:
    • scrollToCell

      public void scrollToCell(int rowNum, int colNum, Alignment xPosition, VerticalAlignment yPosition)
      Will scroll the listGrid body such that the specified cell is visible close to the center of the viewport.

      This method has no effect if the cell is already visible in the viewport.

      When scrolling vertically, this will cause data to be automatically loaded if paging is active and you scroll into an area of the data that isn't loaded. Only rows around the target row will be loaded, not all intervening rows. See also ResultSet.

      Scrolling into an undrawn area will cause the body area of the grid to redraw, but this won't happen synchronously unless you explicitly call redraw(). Scrolling into an area of the data that is not yet loaded will never synchronously draw new rows, even if you call redraw() - wait for ListGrid.dataArrived() to be notified when new rows have been loaded.

      Calling this method with a row index larger than the current dataset will clamp to the end of the dataset (similarly horizontal scrolling will clamp to the last column).

      If a call to this method is made while data is still loading, such that the last row of the dataset is not yet known the grid will attempt to compensate by scrolling the record into view when data arrives, if it is valid. For better control over scrolling, developers should consider calling scrollToRow() or scrollToCell from ListGrid.dataArrived() if data is still loading.

      With mixed-height rows it will only reliably work if virtualScrolling is enabled.

      Parameters:
      rowNum - Row index of the cell to scroll into view
      colNum - Column index of the cell to scroll into view
      xPosition - Horizontal position of scrolled cell (optional)
      yPosition - Vertical position of scrolled cell (optional)
      See Also:
    • scrollToColumn

      public void scrollToColumn(int colNum)
      Scroll the grid to specified column such that the row appears near the center of the viewport.

      See scrollToCell() for a full description of how this method interacts with incremental loading and rendering of data.

      Parameters:
      colNum - Index of the column to scroll into view
      See Also:
    • scrollToColumn

      public void scrollToColumn(int colNum, Alignment xPosition)
      Scroll the grid to specified column such that the row appears near the center of the viewport.

      See scrollToCell() for a full description of how this method interacts with incremental loading and rendering of data.

      Parameters:
      colNum - Index of the column to scroll into view
      xPosition - Horizontal position of scrolled column (optional)
      See Also:
    • scrollToRow

      public void scrollToRow(int rowNum)
      Scroll the grid to specified row such that the row appears near the center of the viewport, loading data if necessary.

      See scrollToCell() for a full description of how this method interacts with incremental loading and rendering of data.

      Parameters:
      rowNum - Row index of the cell to scroll into view
      See Also:
    • scrollToRow

      public void scrollToRow(int rowNum, VerticalAlignment yPosition)
      Scroll the grid to specified row such that the row appears near the center of the viewport, loading data if necessary.

      See scrollToCell() for a full description of how this method interacts with incremental loading and rendering of data.

      Parameters:
      rowNum - Row index of the cell to scroll into view
      yPosition - Vertical position of scrolled row (optional)
      See Also:
    • addSelectionChangedHandler

      public HandlerRegistration addSelectionChangedHandler(SelectionChangedHandler handler)
      Add a selectionChanged handler.

      Called when (row-based) selection changes within this grid. Note this method fires for each record for which selection is modified - so when a user clicks inside a grid this method will typically fire twice (once for the old record being deselected, and once for the new record being selected).

      NOTE: For updating other components based on selections or triggering selection-oriented events within an application, see the selectionUpdated() event which is likely more suitable. Calls to getSelection() from within this event may not return a valid set of selected records if the event has been triggered by a call to selectAllRecords() or deselectAllRecords() - in this case use the selectionUpdated() event instead.

      Specified by:
      addSelectionChangedHandler in interface HasSelectionChangedHandlers
      Parameters:
      handler - the selectionChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addSelectionUpdatedHandler

      public HandlerRegistration addSelectionUpdatedHandler(SelectionUpdatedHandler handler)
      Add a selectionUpdated handler.

      Called when the selection changes. Note that this method fires exactly once for any given change to the selection unlike the selectionChanged event.

      This event is fired once after selection/deselection has completed. The result is one event per mouse-down event. For a drag selection there will be two events fired: one when the first record is selected and one when the range is completed.

      This event is also fired when selection is updated by a direct call to one of the DataBoundComponent select/deselect methods. Calls on the Selection object do not trigger this event.

      Specified by:
      addSelectionUpdatedHandler in interface HasSelectionUpdatedHandlers
      Parameters:
      handler - the selectionUpdated handler
      Returns:
      HandlerRegistration used to remove this handler
    • selectRange

      public void selectRange(int startRow, int endRow)
      Select a contiguous range of records by index
      Parameters:
      startRow - start of selection range
      endRow - end of selection range (non-inclusive)
      See Also:
    • selectRange

      public void selectRange(int startRow, int endRow, boolean newState)
      Select a contiguous range of records by index
      Parameters:
      startRow - start of selection range
      endRow - end of selection range (non-inclusive)
      newState - new selection state (if null, defaults to true)
      See Also:
    • setAutoFitWidth

      public void setAutoFitWidth(String fieldName, boolean autoFit)
      Setter for ListGridField.autoFitWidth. 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, use resizeField().
      Parameters:
      fieldName - field to auto-fit
      autoFit - Should autoFitWidth be enabled or disabled?
    • setDontAutoDestroyComponent

      public void setDontAutoDestroyComponent(Canvas component, boolean dontAutoDestroy)
      If showRecordComponents is true, by default any created record components are destroyed once they are no longer in use (for example, if the ListGrid as a whole is destroyed). This method may be used to suppress this behavior for some component. Typical usage might call this method as part of createRecordComponent() to suppress this behavior.
      Parameters:
      component - component in question.
      dontAutoDestroy - If true, the component will not be destroyed automatically when the grid is destroyed
    • setEditValues

      public void setEditValues(int rowNum, Map values)
      This method sets up a set of editValues for some row / cell. It differs from 'setEditValue()' in that:
       - it takes values for multiple fields
       - it clears out any previous edit values for the record
      Parameters:
      rowNum - Row number for the record being edited
      values - New values for the row
    • setFieldButtonProperties

      public void setFieldButtonProperties(String name, Canvas properties)
      Method to update properties on a field's header button at runtime. This property allows customization of any settable properties on the ListGridField's header button after it has been generated. Note that the provided Canvas should only have the minimal needed properties set on it, and should not be a Canvas that's already been drawn or added as the child of another widget.
      Parameters:
      name - Field to update
      properties - new properties to apply to the header button
    • setFieldCellIcon

      public void setFieldCellIcon(String fieldName, String cellIcon)
      Change the ListGridField.cellIcon for a field after the grid is created
      Parameters:
      fieldName - field to update
      cellIcon - new cellIcon for the field. See SCImgURL
    • setFieldError

      public void setFieldError(int rowNum, String fieldName, String errorMessage)
      Set a validation error for some cell.
      Parameters:
      rowNum - row index of cell to add validation error for
      fieldName - col index or field name of cell to add validation error for
      errorMessage - validation error/errors for the cell.
      See Also:
    • setFieldHeaderBaseStyle

      public void setFieldHeaderBaseStyle(String name, String newStyle)
      Update the ListGridField.headerBaseStyle for a field within the grid at runtime.
      Parameters:
      name - name of the field.
      newStyle - new baseStyle for the field header. See CSSStyleName
    • setFieldHeaderTitleStyle

      public void setFieldHeaderTitleStyle(String name, String newStyle)
      Update the ListGridField.headerTitleStyle for a field within the grid at runtime.
      Parameters:
      name - name of the field.
      newStyle - new titleTyle for the field header. See CSSStyleName
    • setFieldIcon

      public void setFieldIcon(String fieldName, String icon)
      Change the ListGridField.icon for a field after the grid is created
      Parameters:
      fieldName - field to update
      icon - icon for the field. See SCImgURL
    • setFieldMaxWidth

      public void setFieldMaxWidth(int fieldNum, int width)
      Updates ListGridField.maxWidth for the specified field and redraws the associated column if required.
      Parameters:
      fieldNum - name of the field, or index.
      width -
      See Also:
    • setFieldMinWidth

      public void setFieldMinWidth(int fieldNum, int width)
      Updates ListGridField.minWidth for the specified field and redraws the associated column if required.
      Parameters:
      fieldNum - name of the field, or index.
      width -
      See Also:
    • setFieldProperties

      public void setFieldProperties(int fieldNum, ListGridField properties)
      Dynamically set properties for a particular field. This method will update the fields header-button without having to explicitly reset the fields in the grid. The passed-in ListGridField should contain just the minimal properties you want to change; do not take the original ListGridField, modify it, and just pass that to this function.

      NOTE: Where explicit setters exist for field properties (such as resizeField(), setFieldTitle(), setFieldIcon(), etc.) these should be used instead.

      Parameters:
      fieldNum - name of the field, or index.
      properties - properties to apply to the header
    • setFieldProperties

      public void setFieldProperties(String fieldNum, ListGridField properties)
      Dynamically set properties for a particular field. This method will update the fields header-button without having to explicitly reset the fields in the grid. The passed-in ListGridField should contain just the minimal properties you want to change; do not take the original ListGridField, modify it, and just pass that to this function.

      NOTE: Where explicit setters exist for field properties (such as resizeField(), setFieldTitle(), setFieldIcon(), etc.) these should be used instead.

      Parameters:
      fieldNum - name of the field, or index.
      properties - properties to apply to the header
    • setFieldSearchOperator

      public void setFieldSearchOperator(String fieldName, OperatorId operator)
      Applies a new search operator to a field in the grid's filter row, and updates it's operatorIcon.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      Depending on the field's current filter-value and operator, calls to this method may result in the current filter-value being cleared, and/or a fetch being issued if filterByCell or filterOnKeypress are set.

      In general, if the field has a current filter-value, it will be cleared if

      If filterOnKeypress is true, a fetch will be issued if

      • the value was just cleared, in one of the ways listed above
      • the operator changes while there is a current value
      • the new operator does not require a value and the old one did

      If passed null, the field's operator will be cleared, reverting it to its default operator and, if alwaysShowOperatorIcon is false, the operatorIcon is hidden. See clearFieldSearchOperator() for an alternative way to clear a field's operator.

      To retrieve a field's current search operator, use getFieldSearchOperator().

      Parameters:
      fieldName - name of the field to apply a new search operator to
      operator - id of the search operator to apply
    • setFieldTitle

      public void setFieldTitle(int fieldNum, String title)
      Change the title of a field after the grid is created.
      Parameters:
      fieldNum - name of the field, or index.
      title - new title
    • setFieldTitle

      public void setFieldTitle(String fieldNum, String title)
      Change the title of a field after the grid is created.
      Parameters:
      fieldNum - name of the field, or index.
      title - new title
    • setFilterEditorCriteria

      public void setFilterEditorCriteria(Criteria criteria)
      If showFilterEditor is true, this method will update the criteria shown in the filterEditor without performing a filter.

      For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

      Parameters:
      criteria - New criteria to show
    • setHeaderSpanBaseStyle

      public void setHeaderSpanBaseStyle(String name, String newStyle)
      Update the HeaderSpan.headerBaseStyle for a span within the grid at runtime.
      Parameters:
      name - name of the headerSpan, as specified via HeaderSpan.name.
      newStyle - new baseStyle for the headerSpan. See CSSStyleName
    • setHeaderSpanButtonProperties

      public void setHeaderSpanButtonProperties(String name, Canvas properties)
      Method to update properties on a headerSpan's header button at runtime. This property allows customization of any settable properties on the HeaderSpan's header button after it has been generated.
      Parameters:
      name - name of span to update
      properties - new properties to apply to the header button
    • setHeaderSpanHeaderTitle

      public void setHeaderSpanHeaderTitle(String name, String newTitle)
      Update the headerTitle of a headerSpan dynamically.
      Parameters:
      name - name of the headerSpan, as specified via HeaderSpan.name.
      newTitle - new headerTitle for the headerSpan
    • setHeaderSpanTitle

      public void setHeaderSpanTitle(String name, String newTitle)
      Update the title of a headerSpan dynamically.
      Parameters:
      name - name of the headerSpan, as specified via HeaderSpan.name.
      newTitle - new title for the headerSpan
    • setHeaderSpanTitleStyle

      public void setHeaderSpanTitleStyle(String name, String newTitle)
      Update the HeaderSpan.headerTitleStyle for a span within the grid at runtime.
      Parameters:
      name - name of the headerSpan, as specified via HeaderSpan.name.
      newTitle - new titleStyle for the headerSpan. See CSSStyleName
    • setHideOnPhone

      public void setHideOnPhone(ListGridField field, Boolean hideOnPhone)
      Updates the ListGridField.hideOnPhone attribute at runtime.
      Parameters:
      field - field or field name to update
      hideOnPhone - new setting for hideOnPhone property
    • setHideOnTablet

      public void setHideOnTablet(ListGridField field, Boolean hideOnTablet)
      Updates the ListGridField.hideOnTablet attribute at runtime.
      Parameters:
      field - field or field name to update
      hideOnTablet - new setting for hideOnTablet property
    • setRowErrors

      public void setRowErrors(int rowNum, Object errors)
      Set the validation errors for some row (replacing any pre-existent validation errors)

      Note that in the case of a grouped listGrid, or a TreeGrid, some records may be hidden form view (part of a collapsed group or parent folder). In this case there is no meaningful row number associated with a record. This method cannot be called on such rows - developers should make the row visible first. This is by design - users should always be able to see errors.

      Parameters:
      rowNum - row to add validation error for
      errors - validation errors for the row in the format {fieldName:errorMessage, ...}
      or
      {fieldName:[errorMessage1, errorMessage2], ...}
      See Also:
    • addSetSortHandler

      public HandlerRegistration addSetSortHandler(SetSortHandler handler)
      Add a setSort handler.

      Optional notification fired when either user or framework code calls setSort(). This notification fires before the default behavior; use event.cancel() to cancel the default behavior. Note, the notification is fired before the default functionality, but after prechecks have completed; your method will only be called if the default behavior would have been called. For example, if there are pending edits and the user does not confirm that these should be saved, normal sorting would not have gone ahead, so equally your handler will not be called.

      The default setSort() method does two things to reflect the set of sortSpecifiers passed to it:

      • Change the grid UI (show directional arrows, numerals to indicate sort priority, etc)
      • Actually sort the grid data
      If your reason for implementing a custom setSortHandler() is to inhibit or replace one of those behaviors, you should cancel the default behavior and directly invoke just that part of it you require. The following implementation will replicate the default behavior:
          grid.addSetSortHandler(new SetSortHandler() {
              public void onSetSort(SetSortEvent event) {
                  displaySort(event.getSortSpecifiers());
                  applySortToData(event.getSortSpecifiers());
                  event.cancel();  // Prevent the framework from running its own default impl
              }
          });
      Specified by:
      addSetSortHandler in interface HasSetSortHandlers
      Parameters:
      handler - the setSort handler
      Returns:
      HandlerRegistration used to remove this handler
    • setUserAIFilterRequest

      public void setUserAIFilterRequest(UserAIRequest userAIFilterRequest)
      If filter-via-AI is enabled (see filterViaAIMode), this utility method first calls AI.buildCriterion() to build AdvancedCriteria for the user's request, then sets this grid's filter criteria.
      Parameters:
      userAIFilterRequest - the user's natural language description of a filter.
    • setUserAIFilterRequest

      public void setUserAIFilterRequest(UserAIRequest userAIFilterRequest, BuildCriterionRequest buildRequestProperties)
      See Also:
    • setUserAIFilterRequest

      public void setUserAIFilterRequest(UserAIRequest userAIFilterRequest, BuildCriterionRequest buildRequestProperties, BuildCriterionResponseCallback callback)
      If filter-via-AI is enabled (see filterViaAIMode), this utility method first calls AI.buildCriterion() to build AdvancedCriteria for the user's request, then sets this grid's filter criteria.
      Parameters:
      userAIFilterRequest - the user's natural language description of a filter.
      buildRequestProperties - request properties to use. Note that userAIRequest will be overridden by userAIFilterRequest, dataSource will be overridden by this grid's DataSource, and mode will be overridden by filterViaAIMode.
      callback - optional callback to fire.
    • setUserCriteriaState

      public void setUserCriteriaState(String userCriteriaState)
      Reset this grid's user-criteria to match the ListGridUserCriteriaState object passed in.

      Used to restore previous state retrieved from the grid by a call to getUserCriteriaState().

      Parameters:
      userCriteriaState - Object describing the desired criteria. See ListGridUserCriteriaState
      See Also:
    • setUserFormula

      public void setUserFormula(ListGridField field)
      Updates the userFormula 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:
      field - field owning the formula
      See Also:
    • setUserFormula

      public void setUserFormula(String field)
      Updates the userFormula 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:
      field - field owning the formula
      See Also:
    • setUserFormula

      public void setUserFormula(ListGridField field, UserFormula userFormula)
      Updates the userFormula 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:
      field - field owning the formula
      userFormula - optional formula to install
      See Also:
    • setUserFormulaText

      public void setUserFormulaText(ListGridField field)
      Updates the UserFormula.text of the specified field. This method is preferred over setting the 'text' property directly because it also updates any component dependencies and recalculates the field. If the formula text 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:
      field - field owning the formula
      See Also:
    • setUserFormulaText

      public void setUserFormulaText(String field)
      Updates the UserFormula.text of the specified field. This method is preferred over setting the 'text' property directly because it also updates any component dependencies and recalculates the field. If the formula text 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:
      field - field owning the formula
      See Also:
    • setUserFormulaText

      public void setUserFormulaText(ListGridField field, String text)
      Updates the UserFormula.text of the specified field. This method is preferred over setting the 'text' property directly because it also updates any component dependencies and recalculates the field. If the formula text 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:
      field - field owning the formula
      text - optional formula text to install
      See Also:
    • setUserSummary

      public void setUserSummary(ListGridField field)
      Updates the userSummary 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:
      field - field owning the summary
      See Also:
    • setUserSummary

      public void setUserSummary(String field)
      Updates the userSummary 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:
      field - field owning the summary
      See Also:
    • setUserSummary

      public void setUserSummary(ListGridField field, UserSummary userSummary)
      Updates the userSummary 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:
      field - field owning the summary
      userSummary - optional summary to install
      See Also:
    • setUserSummaryText

      public void setUserSummaryText(ListGridField field)
      Updates the UserSummary.text of the specified field. This method is preferred over setting the 'text' property directly because it also updates any component dependencies and recomputes the field. If the summary text 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 formula for this field
      • any generated field that references the field's computed values
      Parameters:
      field - field owning the summary
      See Also:
    • setUserSummaryText

      public void setUserSummaryText(String field)
      Updates the UserSummary.text of the specified field. This method is preferred over setting the 'text' property directly because it also updates any component dependencies and recomputes the field. If the summary text 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 formula for this field
      • any generated field that references the field's computed values
      Parameters:
      field - field owning the summary
      See Also:
    • setUserSummaryText

      public void setUserSummaryText(ListGridField field, String text)
      Updates the UserSummary.text of the specified field. This method is preferred over setting the 'text' property directly because it also updates any component dependencies and recomputes the field. If the summary text 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 formula for this field
      • any generated field that references the field's computed values
      Parameters:
      field - field owning the summary
      text - optional summary text to install
      See Also:
    • shouldIncludeHiliteInSummaryField

      public boolean shouldIncludeHiliteInSummaryField(String summaryFieldName, String usedFieldName)
      When assembling a value for a summary field, if a referenced field is hilited, should the hilite HTML be included in the summary field value?

      Example use case: Consider a grid containing a numeric field, and a summary field which contains some string value, plus the contents of the numeric field. If a hilite is defined for the grid which turns the numeric field text red when the value is negative, this property will govern whether the number will also be rendered in red within the summary field cells. Any other text in the summary field cells would not be effected by this hilite.

      Default implementation returns includeHilitesInSummaryFields.

      To control hilites showing in group summaries, see showHilitesInGroupSummary.

      Parameters:
      summaryFieldName - name of the summary field
      usedFieldName - name of the field referenced by this summary
      Returns:
      Return true to include hilites from the used field in the generated summary field value.
    • showAIFilterWindow

      public void showAIFilterWindow()
      Shows the aiFilterWindow, which allows the user to ask the AI to filter data by describing which records should be included.
    • showAIHiliteWindow

      public void showAIHiliteWindow()
      Shows the aiFilterWindow, which allows the user to ask the AI to filter data by describing which records should be included.
    • showDragHandles

      public void showDragHandles()
      Shows an additional field near the beginning of the field list (after any row number field) that can be dragged to drag the current selection. This feature is useful in touch environments where both touch scrolling and dragging are needed on the same grid, and allows scrolling to be triggered on the other fields so that both operations are available. Targeted touch environments include both mobile devices, and Windows hardware that supports Dual Input Mode such as Microsoft Surface.

      Note that the drag handle field will never be shown unless canReorderRecords or canDragRecordsOut are true.

      In IE11 or Microsoft Edge, dragging a record in a grid may not be possible using a touch device without enabling drag handles, or disabling native touch scrolling by setting  window.isc_useNativeTouchScrolling = false  before Smart GWT is loaded.

      Background

      One alternative to adding a drag handle field would be to use long touch to start a drag (with normal touch triggering scrolling). However, this is unsupportable in IE11 or Edge on Microsoft Surface (with native scrolling) because native scrolling cannot be canceled on the fly using Event.preventDefault(), but instead must be disabled by applying the appropriate CSS at rendering time. (Such limitations are not present elsewhere, such as on Android or IPhone browsers.)

      For more details, some links are provided below. Note that while IE10 is mentioned in some of the links, the reasoning is still relevant now for IE11 and Edge as the limitations remain:

      See Also:
    • showField

      public void showField(String field)
      Force a field to be shown. This method does not add new fields to the grid, it simply changes field visibility. If a field.showIf expression exists, it will be destroyed.

      Note: for showing multiple fields it is more efficient to call showFields() than to call this method repeatedly.

      Parameters:
      field - field to show
      See Also:
    • showField

      public void showField(String field, boolean suppressRelayout)
      Force a field to be shown. This method does not add new fields to the grid, it simply changes field visibility. If a field.showIf expression exists, it will be destroyed.

      Note: for showing multiple fields it is more efficient to call showFields() than to call this method repeatedly.

      Parameters:
      field - field to show
      suppressRelayout - If passed, don't resize non-explicitly sized columns to fill the available space.
      See Also:
    • showFields

      public void showFields(String... field)
      Force an array of fields to be shown. This method does not add new fields to the grid, it simply changes field visibility. If a field.showIf expression exists, it will be destroyed.

      Note: for showing multiple fields it is more efficient to call this method than to call showField() repeatedly.

      Parameters:
      field - Fields to show.
      See Also:
    • showFields

      public void showFields(ListGridField... field)
      Force an array of fields to be shown. This method does not add new fields to the grid, it simply changes field visibility. If a field.showIf expression exists, it will be destroyed.

      Note: for showing multiple fields it is more efficient to call this method than to call showField() repeatedly.

      Parameters:
      field - Fields to show.
      See Also:
    • showFields

      public void showFields(String[] field, boolean suppressRelayout)
      Force an array of fields to be shown. This method does not add new fields to the grid, it simply changes field visibility. If a field.showIf expression exists, it will be destroyed.

      Note: for showing multiple fields it is more efficient to call this method than to call showField() repeatedly.

      Parameters:
      field - Fields to show.
      suppressRelayout - If passed, don't resize non-explicitly sized columns to fill the available space.
      See Also:
    • showFilterWindow

      public void showFilterWindow()
      Shows the dialog for filterWindowCriteria allowing end-users to edit the advanced filter. This method can be called directly but it is also used to show the dialog when allowFilterWindow is enabled and the user chooses the "Advanced Filtering" menu option.

      Note: this feature requires Smart GWT Pro or better.

    • sort

      public Boolean sort()
      Sort this grid's data, with the option to explicitly specify a single field to sort by and sort direction.

      If sortField is not provided and listGrid.sortField is undefined, the data will be sorted by the first sortable column according to ListGridField.sortDirection if specified, or sortDirection.

      ListGrids also support multiple-field sorting. See setSort() for details.

      Note that for editable grids, sorting is performed by underlying data values, not for unsaved pending edit values. When the user saves edits in a sorted grid, the grid will automatically be unsorted. See Editing for further details.

      Returns:
      sorting worked
      See Also:
    • sort

      public Boolean sort(String sortField)
      See Also:
    • sort

      public Boolean sort(String sortField, SortDirection sortDirection)
      Sort this grid's data, with the option to explicitly specify a single field to sort by and sort direction.

      If sortField is not provided and listGrid.sortField is undefined, the data will be sorted by the first sortable column according to ListGridField.sortDirection if specified, or sortDirection.

      ListGrids also support multiple-field sorting. See setSort() for details.

      Note that for editable grids, sorting is performed by underlying data values, not for unsaved pending edit values. When the user saves edits in a sorted grid, the grid will automatically be unsorted. See Editing for further details.

      Parameters:
      sortField - the field name or column number to sort by
      sortDirection - the direction to sort in
      Returns:
      sorting worked
      See Also:
    • addSortChangedHandler

      public HandlerRegistration addSortChangedHandler(SortChangedHandler handler)
      Add a sortChanged handler.

      Notification method executed when the sort specifiers change for this grid.

      Specified by:
      addSortChangedHandler in interface HasSortChangedHandlers
      Parameters:
      handler - the sortChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addSorterClickHandler

      public HandlerRegistration addSorterClickHandler(SorterClickHandler handler)
      Add a sorterClick handler.

      Notification method fired when the user clicks on the corner sort button. Call SorterClickEvent.cancel() from within SorterClickHandler.onSorterClick(com.smartgwt.client.widgets.grid.events.SorterClickEvent) to suppress the sort.

      Specified by:
      addSorterClickHandler in interface HasSorterClickHandlers
      Parameters:
      handler - the sorterClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addSorterContextClickHandler

      public HandlerRegistration addSorterContextClickHandler(SorterContextClickHandler handler)
      Add a sorterContextClick handler.

      Notification method fired when the user right-clicks on the corner sort button. Call SorterContextClickEvent.cancel() from within SorterContextClickHandler.onSorterContextClick(com.smartgwt.client.widgets.grid.events.SorterContextClickEvent) to suppress the default behavior of showing the sorter's context menu.

      Specified by:
      addSorterContextClickHandler in interface HasSorterContextClickHandlers
      Parameters:
      handler - the sorterContextClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • startEditing

      public Boolean startEditing()
      Start inline editing at the provided coordinates.

      Invoked when a cell is editable and the editEvent occurs on that cell. Can also be invoked explicitly.

      If this method is called while editing is already in progress, the value from the current editCell will either be stored locally as a temporary edit value, or saved via 'saveEdits()' depending on this.saveByCell, and the position of the new edit cell.
      Will update the UI to show the editor for the new cell, and put focus in it unless explicitly suppressed by the optional suppressFocus parameter.

      Returns:
      true if we are editing the cell, false if not editing for some reason
      See Also:
    • startEditing

      public Boolean startEditing(Integer rowNum)
      See Also:
    • startEditing

      public Boolean startEditing(Integer rowNum, Integer colNum)
      See Also:
    • startEditing

      public Boolean startEditing(Integer rowNum, Integer colNum, Boolean suppressFocus)
      Start inline editing at the provided coordinates.

      Invoked when a cell is editable and the editEvent occurs on that cell. Can also be invoked explicitly.

      If this method is called while editing is already in progress, the value from the current editCell will either be stored locally as a temporary edit value, or saved via 'saveEdits()' depending on this.saveByCell, and the position of the new edit cell.
      Will update the UI to show the editor for the new cell, and put focus in it unless explicitly suppressed by the optional suppressFocus parameter.

      Parameters:
      rowNum - Row number of the cell to edit. Defaults to first editable row
      colNum - Column number of the cell to edit. Defaults to first editable column
      suppressFocus - If passed this parameter suppresses the default behavior of focusing in the edit form item when the editor is shown.
      Returns:
      true if we are editing the cell, false if not editing for some reason
      See Also:
    • startEditingNew

      public void startEditingNew()
      Start editing a new row, after the last pre-existing record in the current set of data.

      This new row will be saved via the "add" DataSource\n operation.

      See the Grid Editing overview and also the Editing Unsaved Records overview for context about how unsaved records behave.

      You can optionally pass newValues which are the initial values for the newly added record. See also ListGridField.defaultValue as a means of setting default values every time the user begins editing a new record, for instance, by pressing downArrow on the last normal record in the grid when listEndEditAction is "next".

      If editing is already underway elsewhere in the grid, startEditingNew() behaves just like startEditing().

      See Also:
    • startEditingNew

      public void startEditingNew(Map newValues)
      See Also:
    • startEditingNew

      public void startEditingNew(Map newValues, Boolean suppressFocus)
      Start editing a new row, after the last pre-existing record in the current set of data.

      This new row will be saved via the "add" DataSource\n operation.

      See the Grid Editing overview and also the Editing Unsaved Records overview for context about how unsaved records behave.

      You can optionally pass newValues which are the initial values for the newly added record. See also ListGridField.defaultValue as a means of setting default values every time the user begins editing a new record, for instance, by pressing downArrow on the last normal record in the grid when listEndEditAction is "next".

      If editing is already underway elsewhere in the grid, startEditingNew() behaves just like startEditing().

      Parameters:
      newValues - Optional initial set of properties for the new record
      suppressFocus - Whether to suppress the default behavior of moving focus to the newly shown editor.
      See Also:
    • stopHover

      public void stopHover()
      Notification that the user is no longer hovering over some cell. Hides the current hover canvas if one is showing.
    • summaryUpdated

      public void summaryUpdated(ListGridField field, UserSummary summary)
      Notification fired when a user either creates a new summary field or edits an existing summary field.
      Parameters:
      field - the summary field
      summary - the new or updated summary definition
    • toggleSort

      public void toggleSort(String fieldName)
      Toggles the sort-direction of the field with the passed name and resorts the grid.
      Parameters:
      fieldName - The name of a field, visible, hidden or existing only in the dataSource
    • unfreezeField

      public void unfreezeField(ListGridField field)
      Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs.
      Parameters:
      field - field or fields to unfreeze. fields may be specified as ListGridField objects, field names or colNum.
      See Also:
    • unfreezeField

      public void unfreezeField(Integer field)
      Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs.
      Parameters:
      field - field or fields to unfreeze. fields may be specified as ListGridField objects, field names or colNum.
      See Also:
    • unfreezeField

      public void unfreezeField(String field)
      Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs.
      Parameters:
      field - field or fields to unfreeze. fields may be specified as ListGridField objects, field names or colNum.
      See Also:
    • unfreezeField

      public void unfreezeField(String[] field)
      Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs.
      Parameters:
      field - field or fields to unfreeze. fields may be specified as ListGridField objects, field names or colNum.
      See Also:
    • ungroup

      public void ungroup()
      Removes the grouping from the listGrid, restoring its original data
    • unmarkRecordRemoved

      public void unmarkRecordRemoved(int rowNum)
      Reverses a previous call to markRecordRemoved().

      Note that a record that is marked for removal and then un-marked retains any uncommitted edits from before it was marked for removal. These can be discarded with discardEdits().

      Parameters:
      rowNum - index of record to clear the 'removed'
      See Also:
    • unsort

      public void unsort()
      Turn sorting off, typically because data has changed and is no longer sorted.

      Calling unsort() disables visual indication of which columns are sorted, and calls unsort() on the underlying dataset if supported.

      Note that a grid viewing a paged dataset may not be able to support ResultSet.unsort() because the sort order is what establishes the row numbering that allows data to be fetched in batches. In this case the dataset will be explicitly sorted to an empty array which may cause the cache to be invalidated and a new fetch.

      unsort() is automatically called in response to edits or changes to the data set that would cause records to be reordered. See Editing for further details on editing records in a sorted ListGrid.

    • updateData

      public void updateData(Record updatedRecord)
      Perform a DataSource "update" operation to update existing records in this component's DataSource.
      Parameters:
      updatedRecord - updated record
      See Also:
    • updateData

      public void updateData(Record updatedRecord, DSCallback callback)
      See Also:
    • updateData

      public void updateData(Record updatedRecord, DSCallback callback, DSRequest requestProperties)
      Perform a DataSource "update" operation to update existing records in this component's DataSource.
      Parameters:
      updatedRecord - updated record
      callback - method to call on operation completion
      requestProperties - additional properties to set on the DSRequest that will be issued
      See Also:
    • updateRecordComponent

      public Canvas updateRecordComponent(ListGridRecord record, Integer colNum, Canvas component, boolean recordChanged)
      When showRecordComponents is true, this method is called to update components created by createRecordComponent() when they are to be applied to a different record in the grid. See the record components overview for more information on recordComponents.

      The colNum parameter is applicable only when showRecordComponentsByCell is true. Note that if poolComponentsPerColumn is set to false, the component may have been generated by a createRecordComponent() call applied to a different field.

      Return null to avoid re-adding the component to the row or cell.

      Parameters:
      record - record to which the passed component applies
      colNum - cell to which the passed component applies
      component - the component to update
      recordChanged - was the passed component previously embedded in a different record?
      Returns:
      return the component to embed in the passed record
    • userSelectAllRecords

      public void userSelectAllRecords()
      Selects every user-selectable record in the grid. Unlike selectAllRecords(), if a record is unselectable, this method will not attempt to select it.
    • validateCell

      public Boolean validateCell(int rowNum, String fieldName)
      Validate the current edit value for the cell in question. Called when the user moves to a new edit cell if validateByCell is true.
      This method may also be called directly to perform cell level validation at any time.
      Parameters:
      rowNum - index of row to be validated.
      fieldName - field name (or column index) of field to be validated
      Returns:
      returns true if validation was successful (no errors encountered), false otherwise.
      See Also:
    • validateRow

      public Boolean validateRow(int rowNum)
      Validate the current set of edit values for the row in question.

      Called when the user moves to a new edit row, or when an edited record is to be saved if client side validation is enabled for this grid.

      This method may also be called directly to perform row level validation at any time.

      Parameters:
      rowNum - index of row to be validated.
      Returns:
      returns true if validation was successful (no errors encountered), false otherwise.
      See Also:
    • addViewStateChangedHandler

      public HandlerRegistration addViewStateChangedHandler(ViewStateChangedHandler handler)
      Add a viewStateChanged handler.

      Notification method executed whenever the viewState of this grid changes. View state is accessible via ListGrid.getViewState(), and contains field state information, sort information, selection information, hiliting information and grouping information.

      Specified by:
      addViewStateChangedHandler in interface HasViewStateChangedHandlers
      Parameters:
      handler - the viewStateChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • willFetchData

      public Boolean willFetchData(Criteria newCriteria)
      Compares the specified criteria with the current criteria applied to this component's data object and determines whether the new criteria could be satisfied from the currently cached set of data, or if a new filter/fetch operation will be required.

      This is equivalent to calling this.data.willFetchData(...). Always returns true if this component is not showing a set of data from the dataSource.

      Note that to predict correctly the decision that will be made by filter/fetch, you'll need to pass the same TextMatchStyle that will be used by the future filter/fetch. Fetching manually (e.g. fetchData()) will by default use "exact" while filtering (e.g. filterData()) will by default use "substring". If the component is configured for autofetch (i.e. autoFetchData: true), that will use autoFetchTextMatchStyle, which defaults to "substring". If nothing/null is passed for the style, this method assumes you want the style from the last filter/fetch.

      To determine what TextMatchStyle is being used, check the RPC Tab of the Smart GWT Developer Console and check the relevant DSRequest.

      Parameters:
      newCriteria - new criteria to test.
      Returns:
      true if server fetch would be required to satisfy new criteria.
      See Also:
    • willFetchData

      public Boolean willFetchData(Criteria newCriteria, TextMatchStyle textMatchStyle)
      Compares the specified criteria with the current criteria applied to this component's data object and determines whether the new criteria could be satisfied from the currently cached set of data, or if a new filter/fetch operation will be required.

      This is equivalent to calling this.data.willFetchData(...). Always returns true if this component is not showing a set of data from the dataSource.

      Note that to predict correctly the decision that will be made by filter/fetch, you'll need to pass the same TextMatchStyle that will be used by the future filter/fetch. Fetching manually (e.g. fetchData()) will by default use "exact" while filtering (e.g. filterData()) will by default use "substring". If the component is configured for autofetch (i.e. autoFetchData: true), that will use autoFetchTextMatchStyle, which defaults to "substring". If nothing/null is passed for the style, this method assumes you want the style from the last filter/fetch.

      To determine what TextMatchStyle is being used, check the RPC Tab of the Smart GWT Developer Console and check the relevant DSRequest.

      Parameters:
      newCriteria - new criteria to test.
      textMatchStyle - New text match style. If not passed assumes textMatchStyle will not be modified.
      Returns:
      true if server fetch would be required to satisfy new criteria.
      See Also:
    • setDefaultProperties

      public static void setDefaultProperties(ListGrid listGridProperties)
      Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

      Parameters:
      listGridProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • onInit

      protected void onInit()
      Overrides:
      onInit in class Layout
    • onInit_ListGrid

      protected void onInit_ListGrid()
    • setAutoChildProperties

      public void setAutoChildProperties(String autoChildName, ListGridField properties)
      Sets the properties for creating a ListGridField AutoChild named autoChildName.

      NOTE: Overrides at override points are not applied to AutoChildren created from properties; that is, if the Java Class of properties overrides a Smart GWT override point, the custom method implementation will not be called.

      See Also:
    • displayHeaderContextMenu

      protected Boolean displayHeaderContextMenu(Canvas target, int[] position)
      If showHeaderContextMenu is true this method is fired when the user right-clicks on the header for this grid.
      Default implementation will display a menu with entries derived from ListGrid.getHeaderContextMenuItems for the appropriate column.
      Parameters:
      target - which button in the header received the right-click event (may be the sorter button)
      position - Optional 2-element array specifying position at which the menu should be shown. If this is not passed in the menu will be shown at the mouseEvent position (default context menu behavior).
      Returns:
      whether to bubble the event (false suppresses bubbling)
      See Also:
    • getTotalRows

      public int getTotalRows()
      Return the total number of rows in the grid.

      Note that, when creating new rows via inline editing, this can be more than the total number of rows in the dataset (that is, grid.data.getLength())

      Note : this is an override point.

      Returns:
      total number of rows in the grid
    • getValueIcon

      public String getValueIcon(ListGridField field, Object value, ListGridRecord record)
      Returns the appropriate valueIcon for a cell based on the field and the data value for the cell. Default implementation returns null if suppressValueIcon is true otherwise looks at valueIcons.
      Parameters:
      field - field associated with the cell
      value - data value for the cell's record in this field.
      record - record associated with this cell Note : This is an override point
      Returns:
      the value icon
    • getRowSpan

      public int getRowSpan(ListGridRecord record, int rowNum, int colNum)
      Return how many rows this cell should span. Default is 1.

      When using row spanning, consider setting useRowSpanStyling to enable row-span-sensitive styling behaviors.

      When using row spanning:

      More generally, the ListGrid has a data model of one Record per row, and spanning cells doesn't fit well with this model, meaning that many ListGrid features are incompatible with rowSpanning. Note : This is an override point

      Parameters:
      record - cell record as returned by getCellRecord
      rowNum - row number for the cell
      colNum - column number of the cell
      Returns:
      number of cells to span
    • getRemoveFieldDefaults

      public JavaScriptObject getRemoveFieldDefaults()
      Returns a JavaScriptObject containing default ListGridField attributes of remove fields.
    • removeEmbeddedComponent

      public void removeEmbeddedComponent(Canvas component)
      Removes an embedded component from a grid. The record in which the component is embedded is automatically derived from the Component passed in. If destroyOnUnEmbed is true for the component, it will also be destroyed.
      Parameters:
      component - the embedded component
    • showRecordComponent

      protected boolean showRecordComponent(ListGridRecord record, Integer colNum)
      When showRecordComponents is true, return false from this method to prevent showRecordComponent behavior for the passed record.

      The second parameter is only applicable if showRecordComponentsByCell is true.

      Parameters:
      record - record being processed
      colNum - column index of the cell in which the record component may be shown. Will be null unless showRecordComponentsByCell is true.
      Returns:
      return false to cancel showRecordComponent behavior
    • canSelectRecord

      public boolean canSelectRecord(ListGridRecord record)
      If selectionType is not set to "none", this method will be called for each record the user attempts to select. If it returns false, the record will not be selected.

      Note this method will not be called at all if canSelectCells is true.

      Parameters:
      record - the record being selected Note : this is an override point.
      Returns:
      return false to disallow selection
    • setHeaderHoverFormatter

      public void setHeaderHoverFormatter(HeaderHoverFormatter formatter)
      Provide a custom implementation of headerHoverHTML(int,java.lang.String).

      The HeaderHoverFormatter should return the HTML to display in the hover canvas that is displayed by default if a registered HeaderHoverHandler does not cancel a HeaderHoverEvent. The formatter can return null or an empty string to cancel the hover.

      Parameters:
      formatter - the header hover formatter
    • setRowNumberFieldProperties

      public void setRowNumberFieldProperties(ListGridField rowNumberFieldProperties)
      Set the properties generated field that displays the current row number when showRowNumbers is true. For example you can change the default width of the row number column if you have data that exceeds 4 digits to accommodate the width of, say, 10000.
      Parameters:
      rowNumberFieldProperties - the row number field properties
    • setDataProperties

      public ListGrid setDataProperties(ResultSet resultSetProperties)
      For databound ListGrids, this attribute can be used to customize the ResultSet object created for this grid when data is fetched.

      Note : This is an advanced setting

      Class overrides for ResultSet cannot be applied to the grid using this API. Instead, consider setting the resultSetClass property in the file defining your DataSource. Your class must be registered for reflection.
      Parameters:
      dataProperties - Default value is null
      Returns:
      ListGrid instance, for chaining setter calls
      See Also:
    • setData

      public ListGrid setData(Record[] data)
      See Also:
    • setData

      public ListGrid setData(RecordList data)
      See Also:
    • getDataAsRecordList

      public RecordList getDataAsRecordList()
      Return the grid data as a RecordList. If the component is bound to a DataSource, the actual type of the RecordList instance will be a ResultSet.
      Returns:
      the data
    • setRecords

      public void setRecords(ListGridRecord[] records)
      Parameters:
      records - the records
    • getRecords

      public ListGridRecord[] getRecords()
      Returns the current set of records displayed in this grid as an array of ListGridRecord objects. Note that if the ListGrid is grouped, you can call getGroupTree() to get the underlying Tree data representation. You can call isGrouped() to test whether the ListGrid is grouped on a field.

      If this is a DataBound grid this method will return an empty array unless the entire set of data for the current criteria has been loaded into the client, in which case all matching rows will be returned. For DataBound grids, you can call getResultSet() to retrieve the current data set as a ResultSet object.

      Returns:
      an array or records.
    • isGrouped

      public boolean isGrouped()
      Return true if the ListGrid is grouped on a field.
      Returns:
      true if grouped
    • setSortField

      public void setSortField(int fieldIndex)
      Specifies the field by which this grid should be initially sorted. Note that if sortField is initially specified as a number, it will be converted to a string (field name) after list grid initialization.
      Parameters:
      fieldIndex - the field index
    • getGroupByFields

      public String[] getGroupByFields()
      Get the current grouping of this listGrid as an array of fieldNames.

      This method returns an array containing the names of the field(s) by which this grid is grouped (either from setGroupByField(String...field) or or from a call to groupBy(String...)). If this grid is not currently grouped, this method will return null.

      Returns:
      Current group by field names.
    • setGroupStartOpen

      public void setGroupStartOpen(GroupStartOpen group)
      Describes the default state of ListGrid groups when groupBy is called. Possible values are:
      • "all": open all groups
      • "first": open the first group
      • "none": start with all groups closed
      • Array of values that should be opened
      Parameters:
      group - the group
    • setGroupStartOpen

      public void setGroupStartOpen(Object... groupValues)
      Parameters:
      groupValues - Array of values that should be opened
    • setSelectionCanvasProperties

      public void setSelectionCanvasProperties(Canvas selectionCanvasProperties) throws IllegalStateException
      Properties to apply to the auto-generated selectionCanvas AutoChild when its use is enabled.
      Parameters:
      selectionCanvasProperties - the selectionCanvas properties
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setSelectionUnderCanvasProperties

      public void setSelectionUnderCanvasProperties(Canvas selectionUnderCanvasProperties) throws IllegalStateException
      Properties to apply to the auto-generated selectionUnderCanvas AutoChild when its use is enabled.
      Parameters:
      selectionUnderCanvasProperties - the selectionUnderCanvas properties
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setRollOverCanvasProperties

      public void setRollOverCanvasProperties(Canvas rollOverCanvasProperties) throws IllegalStateException
      Properties to apply to the auto-generated rollOverCanvas AutoChild when its use is enabled.
      Parameters:
      rollOverCanvasProperties - the rollOverCanvas properties
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setRollUnderCanvasProperties

      public void setRollUnderCanvasProperties(Canvas rollUnderCanvasProperties) throws IllegalStateException
      Properties to apply to the auto-generated rollUnderCanvas AutoChild when its use is enabled.
      Parameters:
      rollUnderCanvasProperties - the rollUnderCanvas properties
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setDataSource

      public void setDataSource(DataSource dataSource, ListGridField... fields)
      Bind to a DataSource.

      Binding to a DataSource means that the component will use the DataSource to provide default data for its fields.

      When binding to a new DataSource, if the component has any existing "fields" or has a dataset, these will be discarded by default, since it is assumed the new DataSource may represent a completely unrelated set of objects. If the old "fields" are still relevant, pass them to setDataSource().

      Parameters:
      dataSource -
      fields -
    • setDetailDS

      public void setDetailDS(DataSource detailDS)
      If canExpandRecords is true and listGrid.expansionMode is "related", this property specifies the dataSource for the related records grid to be shown embedded in expanded records.

      This property may also be specified on a per-record basis - see recordDetailDSProperty

      Parameters:
      detailDS - detail datasource
    • setCheckboxFieldProperties

      public void setCheckboxFieldProperties(ListGridField checkboxFieldProperties)
      Standard properties to apply to the automatically generated checkbox field, shown when selectionAppearance is set to "checkbox".

      Any properties applied to the ListGridField passed in will be overlaid onto the automatically generated checkbox field, allowing the developer to customize this field - for example modifying the appearance for skinning purposes, or setting shouldPrint to include the field in the print-view of the grid.

      Parameters:
      checkboxFieldProperties - properties to apply to the checkbox field
    • scrollBodyTo

      public void scrollBodyTo(Integer left, Integer top)
      Scroll the body of the grid to the specified coordinates.
      Parameters:
      left - the left position
      top - the top position
    • getBodyScrollLeft

      public Integer getBodyScrollLeft()
      Get the current scrollLeft for the body of this ListGrid
      Returns:
      left scroll coordinate. May be null if this component has not been drawn.
    • getBodyScrollTop

      public Integer getBodyScrollTop()
      Get the current scrollTop for the body of this ListGrid
      Returns:
      top scroll coordinate. May be null if this component has not been drawn.
    • startEditingNew

      public void startEditingNew(Record defaultRecordValue)
      Start editing a new row, after the last pre-existing record in the current set of data. This new row will be saved via the "add" DataSource operation. If editing is already underway elsewhere in the grid, startEditingNew() behaves just like startEditing().
      Parameters:
      defaultRecordValue - the default field values for the new record
    • getSelection

      public ListGridRecord[] getSelection()
      Deprecated.
      The selection associated with the listGrid.
      Returns:
      the selection
    • getSelection

      public ListGridRecord[] getSelection(boolean excludePartialSelections)
      Deprecated.
      The selection associated with the listGrid.
      Parameters:
      excludePartialSelections - when true, partially selected records will not be returned. Otherwise, both fully and partially selected records are returned.
      Returns:
      the selection
    • getEditFormItem

      public FormItem getEditFormItem(Integer field)
      Method to retrieve a live edit form item for an editable ListGrid. This is the automatically generated editor displayed in a cell while editing the grid.

      Note that this is an advanced method and developers should be aware of the following issues:

      • Edit form items are only present while a user is actually editing a cell. This method will return null if the user is not editing the grid or the field in question is not editable or not visible. Note that due to incremental rendering columns which are not currently scrolled into view may be unrendered, in which case they may have no associated edit item until the user scrolls them into view.
      • The items' values are managed by the ListGrid through the edit-values subsystem. If you want to change an edit value for a field, call ListGrid.setEditValue and the grid will handle updating the value in the live item if necessary. You should not need to call setValue(); directly on the item and doing so will not always update the edit value for the grid.
      In general - bear in mind that this is an advanced usage and if there is an equivalent API available on the ListGrid it is always preferable to use that.
      Parameters:
      field - fieldName or colNum to get the edit item for.
      Returns:
      the live edit item for the current edit row and specified field, or null if the grid is not currently showing any editors.
    • getEditFormItem

      public FormItem getEditFormItem(String field)
      Method to retrieve a live edit form item for an editable ListGrid. This is the automatically generated editor displayed in a cell while editing the grid.

      Note that this is an advanced method and developers should be aware of the following issues:

      • Edit form items are only present while a user is actually editing a cell. This method will return null if the user is not editing the grid or the field in question is not editable or not visible. Note that due to incremental rendering columns which are not currently scrolled into view may be unrendered, in which case they may have no associated edit item until the user scrolls them into view.
      • The items' values are managed by the ListGrid through the edit-values subsystem. If you want to change an edit value for a field, call ListGrid.setEditValue and the grid will handle updating the value in the live item if necessary. You should not need to call setValue(); directly on the item and doing so will not always update the edit value for the grid.
      In general - bear in mind that this is an advanced usage and if there is an equivalent API available on the ListGrid it is always preferable to use that.
      Parameters:
      field - fieldName or colNum to get the edit item for.
      Returns:
      the live edit item for the current edit row and specified field, or null if the grid is not currently showing any editors.
    • openRecordDetailGrid

      public void openRecordDetailGrid(ListGridRecord record, DataSource detailDataSource)
      Open the current record detail grid inline,
      Parameters:
      record - the record
      detailDataSource - the detail data source
    • closeRecord

      public void closeRecord(ListGridRecord record)
      Close the inline detail grid associated with the record.
      Parameters:
      record - the record
    • openRecordEditor

      public void openRecordEditor(ListGridRecord record)
      Open the record editor associated with the record.
      Parameters:
      record - the record
    • groupBy

      public void groupBy(String... fields)
      Display the current set of records grouped by their values for the given field or fields. With no arguments, disables all grouping.

      Grouping transforms the current dataset into a Tree on the fly, then provides a familiar tree interface for exploring the grouped data.

      Grouping works automatically with any dataset, providing simple default grouping based on each field's declared type. However, you can use the com.smartgwt.client.widgets.grid.ListGridField#getGroupValue API to control how records are grouped, and the com.smartgwt.client.widgets.grid.ListGridField#getGroupTitle API to control how groups are titled.

      Grouping can be performed programmatically via this API, or you can set canGroupBy to enable menus that allow the user to performing grouping. To group a grid automatically, instantiate the grid with a groupByField setting.

      While grouped, the automatically created Tree is available as groupTree and the original dataset is available as originalData.

    • sort

      public Boolean sort(int sortCol, SortDirection sortDirection)
      Parameters:
      sortCol - the column number to sort by
      sortDirection - the direction to sort in
      Returns:
      sorting worked
      See Also:
    • saveAllEdits

      public boolean saveAllEdits()
      Save a number of outstanding edits for this ListGrid. If no rows are specified, all outstanding edits will be saved.
      Returns:
      true if a save has been initiated (at least one row had changes, passed client-side validation, and a save has been attempted). false otherwise
    • saveAllEdits

      public boolean saveAllEdits(Function callback)
      Save a number of outstanding edits for this ListGrid. If no rows are specified, all outstanding edits will be saved.
      Parameters:
      callback - this callback will be fired on a successful save. Note that if there are no pending edits to be saved this callback will not fire - you can check for this condition using hasChanges() or #rowHasChanges(). Use addEditFailedHandler(EditFailedHandler) to find out about failures encountered during saving (on a per-row basis).
      Returns:
      true if a save has been initiated (at least one row had changes, passed client-side validation, and a save has been attempted). false otherwise
    • saveAllEdits

      public boolean saveAllEdits(Function callback, int[] rows)
      Save a number of outstanding edits for this ListGrid. If no rows are specified, all outstanding edits will be saved.
      Parameters:
      callback - this callback will be fired on a successful save of the specified rows. Note that if there are no pending edits to be saved this callback will not fire - you can check for this condition using hasChanges() or #rowHasChanges(). Use addEditFailedHandler(EditFailedHandler) to find out about failures encountered during saving (on a per-row basis).
      rows - specify which rows to save
      Returns:
      true if a save has been initiated (at least one row had changes, passed client-side validation, and a save has been attempted). false otherwise
    • freezeFields

      public void freezeFields(int[] colNums)
      See Also:
      • #freezeField(int)
    • freezeFields

      public void freezeFields(String[] fieldNames)
      See Also:
    • unfreezeFields

      public void unfreezeFields(int[] colNums)
      See Also:
      • #unfreezeField(int)
    • unfreezeFields

      public void unfreezeFields(String[] fieldNames)
      See Also:
    • refreshCell

      public void refreshCell(int rowNum, int colNum, boolean refreshingRow, boolean allowEditCellRefresh)
      Refresh an individual cell without redrawing the grid.

      The cell's value, CSS class, and CSS text will be refreshed, to the current values returned by getCellValue(), getCellStyle() and getCellCSSText() respectively.

      Parameters:
      rowNum - row number of cell to refresh
      colNum - column number of cell to refresh
    • getVisibleRows

      public Integer[] getVisibleRows()
      Get the rows that are currently visible in the viewport, as an array of [firstRowNum, lastRowNum]. If the grid contains no records, will return [-1,-1];
      Returns:
      the visible rows
    • getDrawnRows

      public Integer[] getDrawnRows()
      Get the rows that are currently drawn (exist in the DOM), as an array of [firstRowNum, lastRowNum].

      The drawn rows differ from the getVisibleRows() because of drawAheadRatio. The drawn rows are the apppropriate range to consider if you need to, eg, using refreshCell(int, int) to update all the cells in a column.

      If the grid is undrawn or the emptyMessage is currently shown, returns [null,null];

      Returns:
      the drawn rows
    • fetchRelatedData

      public void fetchRelatedData(Record record, DataSource dataSource)
      Parameters:
      record - the DataSource record
      dataSource - the schema of the DataSource record
      See Also:
    • fetchRelatedData

      public void fetchRelatedData(Record record, DataSource dataSource, DSCallback callback, DSRequest requestProperties)
      Parameters:
      record - the DataSource record
      dataSource - the schema of the DataSource record
      callback - callback to invoke on completion
      requestProperties - additional properties to set on the DSRequest that will be issued
      See Also:
    • getBody

      public GridRenderer getBody()
      Returns the primary body, which, when there are frozen fields, is the com.smartgwt.client.grid.GridRenderer used to render the non-frozen portion of the dataset; otherwise, the primary body (the only body) is the GridRenderer used to render the entire dataset.
      Returns:
      the primary body or null if this ListGrid has not been drawn yet.
    • getGridRenderer

      public GridRenderer getGridRenderer()
      Synonym of getBody().
    • getEditedCell

      public Object getEditedCell(int rowNum, String fieldName)
      See Also:
    • getEditedCell

      public Object getEditedCell(Record record, String fieldName)
      See Also:
    • getEditedCell

      public Object getEditedCell(Record record, int colNum)
      See Also:
    • getEditedRecord

      public Record getEditedRecord(int rowNum)
      Returns the combination of unsaved edits (if any) and original values (if any) for a given row being edited.

      The returned value is never null, and can be freely modified.

      Parameters:
      rowNum - the row num
      Returns:
      A copy of the record with unsaved edits included
    • setEditValue

      public void setEditValue(int rowNum, int colNum, Object value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, String value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, Date value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, double value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, boolean value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, Boolean value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, float value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, int value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, Integer value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, Record value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, Record[] value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      colNum - column number of cell
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, int colNum, JavaScriptObject value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, String value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, Date value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, double value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, boolean value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, Boolean value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, float value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, int value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, Integer value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, Record value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, Record[] value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, JavaScriptObject value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • setEditValue

      public void setEditValue(int rowNum, String fieldName, Object value)
      Modifies a field value being tracked as an unsaved user edit.
      Parameters:
      rowNum - row number
      fieldName - the field name
      value - new value for the appropriate field
    • getEditValue

      public Object getEditValue(int rowNum, String fieldName)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      fieldName - field name for which value should be returned
      Returns:
      edit value for the field in question
    • getEditValueAsString

      public String getEditValueAsString(int rowNum, String fieldName)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      fieldName - field name for which value should be returned
      Returns:
      edit value for the field in question
    • getEditValueAsInt

      public Integer getEditValueAsInt(int rowNum, String fieldName)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      fieldName - field name for which value should be returned
      Returns:
      edit value for the field in question
    • getEditValueAsFloat

      public Float getEditValueAsFloat(int rowNum, String fieldName)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      fieldName - field name for which value should be returned
      Returns:
      edit value for the field in question
    • getEditValueAsDate

      public Date getEditValueAsDate(int rowNum, String fieldName)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      fieldName - field name for which value should be returned
      Returns:
      edit value for the field in question
    • getEditValueAsBoolean

      public Boolean getEditValueAsBoolean(int rowNum, String fieldName)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      fieldName - field name for which value should be returned
      Returns:
      edit value for the field in question
    • getEditValueAsRecord

      public Record getEditValueAsRecord(int rowNum, String fieldName)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      fieldName - field name for which value should be returned
      Returns:
      edit value for the field in question
    • getEditValueAsRecordArray

      public Record[] getEditValueAsRecordArray(int rowNum, String fieldName)
      Returns the current temporary locally stored edit value for some field within a record being edited.
      Parameters:
      rowNum - index of the row for which the editValue should be returned
      fieldName - field name for which value should be returned
      Returns:
      edit value for the field in question
    • getEditValues

      public Map getEditValues(int rowNum)
      Returns the current set of unsaved edits for a given row being edited.
      Parameters:
      rowNum - rowNum of the record being edited
      Returns:
      current editValues object for the row. This contains the current edit values in {fieldName1:value1, fieldName2:value2} format
    • getEditValues

      public Map getEditValues(Record record)
      Returns the current set of unsaved edits for a given row being edited.
      Parameters:
      record - an Object containing values for all the record's primary keys
      Returns:
      current editValues object for the row. This contains the current edit values in {fieldName1:value1, fieldName2:value2} format
    • setSort

      public ListGrid setSort(SortSpecifier... sortSpecifiers)
      Sort the grid on one or more fields.

      Pass in an array of SortSpecifiers to have the grid's data sorted by the fields in each specifier.property and in the directions specified. The grid can be sorted by any combination of fields, including fields specified in the fields array, whether visible or hidden, and unused fields from the underlying dataSource, if there is one.

      If multiple fields are sorted, those that are visible show a directional icon and a small sort-numeral indicating that field's index in the sort configuration.

      If setSort() is called on a ListGrid which doesn't yet have a SmartClient widget, the widget will not be created; instead, the initial sort for the ListGrid will be set as if by setInitialSort(com.smartgwt.client.data.SortSpecifier...).

      See addSort() and toggleSort() APIs for information on making changes to the current sort configuration.

      Specified by:
      setSort in interface DataBoundComponent
      Parameters:
      sortSpecifiers - Array of SortSpecifier objects
    • setRowErrors

      public void setRowErrors(int rowNum, Map errors)
      Set the validation errors for some row (replacing any pre-existent validation errors)
      Parameters:
      rowNum - row to add validation error for
      errors - validation errors for the row. The key of the map must be the field name, and the value can either be a String error message or an array of Strings for multiple errors
    • setFieldError

      public void setFieldError(int rowNum, String fieldName, String[] errorMessages)
      Parameters:
      rowNum - row index of cell to add validation error for
      fieldName - field name of cell to add validation error for
      errorMessages - validation error messages
      See Also:
      • #setFieldError(int, int, String)
    • selectSingleRecord

      public void selectSingleRecord(Record record)
      Select a single Record passed in explicitly, or by index, and deselect everything else. When programmatic selection of records is a requirement and selectionType is "single", use this method rather than selectRecord(com.smartgwt.client.data.Record) to enforce mutually-exclusive record-selection.
      Parameters:
      record - record to select
    • selectSingleRecord

      public void selectSingleRecord(int rowNum)
      Select a single Record passed in explicitly, or by index, and deselect everything else. When programmatic selection of records is a requirement and selectionType is "single", use this method rather than selectRecord(com.smartgwt.client.data.Record) to enforce mutually-exclusive record-selection.
      Parameters:
      rowNum - rowNum (or row number) to select
    • getFormulaFieldValue

      public Double getFormulaFieldValue(ListGridField field, Record record)
      Get the computed value of a canAddFormulaFields. Returns null for a bad formula or where the result is not a valid number.
      Parameters:
      field - field that has a formula
      record - record to use to compute formula value
      Returns:
      formula result
    • setCriteria

      public void setCriteria(Criteria criteria)
      Sets this component's filter criteria. Default implementation calls this.data.setCriteria()
      Parameters:
      criteria - new criteria to show
    • validateCell

      public Boolean validateCell(int rowNum, int colIndex)
      Validate the current edit value for the cell in question. Called when the user moves to a&#010 new edit cell if validateByCell is true.
      &#010 This method may also be called directly to perform cell level validation at any time.&#010
      Parameters:
      rowNum - index of row to be validated.
      colIndex - column index of field to be validated
      Returns:
      returns true if validation was successful (no errors encountered), false otherwise.
    • cellHasErrors

      public Boolean cellHasErrors(int rowNum, int colIndex)
      Given a rowNum and a colNum or fieldName, determine whether we currently have stored &#010 validation errors for the record/field in question.&#010
      Parameters:
      rowNum - index of row to check for validation errors
      colIndex - index of column to check for validation errors
      Returns:
      true if we have validation errors for the row/col in question
    • clearFieldError

      public void clearFieldError(int rowNum, String fieldName)
      Parameters:
      rowNum - row index of cell to add validation error for
      fieldName - field name of cell to add validation error for
      See Also:
    • setValueMap

      public void setValueMap(String fieldName, LinkedHashMap valueMap)
      Set the value map for a field.&#010 See also the setEditorValueMap(java.lang.String, java.util.LinkedHashMap)&#010 and com.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap methods which allow further &#010 customization of the valueMap displayed while the field is in edit mode.&#010&#010
      Parameters:
      fieldName - Name of field to update
      valueMap - ValueMap for the field
    • setValueMap

      public void setValueMap(String fieldName, String... valueMap)
      Set the value map for a field.&#010 See also the setEditorValueMap(java.lang.String, java.util.LinkedHashMap)&#010 and com.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap methods which allow further &#010 customization of the valueMap displayed while the field is in edit mode.&#010&#010
      Parameters:
      fieldName - Name of field to update
      valueMap - ValueMap for the field
    • setEditorValueMap

      public void setEditorValueMap(String fieldName, LinkedHashMap valueMap)
      Set a valueMap to display for this field while editing.
      This method sets the +link{ListGridField.editorValueMap, field.editorValueMap} property and may be called at runtime while editing the grid.
      Parameters:
      fieldName - Name of field to update
      valueMap - ValueMap for the field
    • setEditorValueMap

      public void setEditorValueMap(String fieldName, String... valueMap)
      Set a valueMap to display for this field while editing.
      This method sets the +link{ListGridField.editorValueMap, field.editorValueMap} property and may be called at runtime while editing the grid.
      Parameters:
      fieldName - Name of field to update
      valueMap - ValueMap for the field
    • getDisplayValue

      public Object getDisplayValue(String fieldName, int value)
      Given a field with a specified valueMap or displayField, this method will return the display value for any underlying data value.
      Parameters:
      fieldName - Name of the field for which the displayValue is required
      value - data value for the field
    • getDisplayValue

      public Object getDisplayValue(String fieldName, float value)
      Given a field with a specified valueMap or displayField, this method will return the display value for any underlying data value.
      Parameters:
      fieldName - Name of the field for which the displayValue is required
      value - data value for the field
    • getDisplayValue

      public Object getDisplayValue(String fieldName, String value)
      Given a field with a specified valueMap or displayField, this method will return the display value for any underlying data value.
      Parameters:
      fieldName - Name of the field for which the displayValue is required
      value - data value for the field
    • getDisplayValue

      public Object getDisplayValue(String fieldName, boolean value)
      Given a field with a specified valueMap or displayField, this method will return the display value for any underlying data value.
      Parameters:
      fieldName - Name of the field for which the displayValue is required
      value - data value for the field
    • getDisplayValue

      public Object getDisplayValue(String fieldName, Date value)
      Given a field with a specified valueMap or displayField, this method will return the display value for any underlying data value.
      Parameters:
      fieldName - Name of the field for which the displayValue is required
      value - data value for the field
    • getGroupSummaryData

      public ListGridRecord[] getGroupSummaryData(Record[] records, GroupNode groupNode)
      If this grid is grouped, and showGroupSummary is true, this method will return the group summary data displayed at the end of the group.

      This method may return multiple records if more than one summary row per group is desired.

      Parameters:
      records - the records in the group, for which the summary values are being calculated
      groupNode - object with specified groupValue and groupName for this group
      Returns:
      summary record(s)
    • getGroupSummaryData

      public ListGridRecord[] getGroupSummaryData(Record[] records, GroupNode groupNode, Boolean recalculate)
      If this grid is grouped, and showGroupSummary is true, this method will return the group summary data displayed at the end of the group.

      This method may return multiple records if more than one summary row per group is desired.

      Parameters:
      records - the records in the group, for which the summary values are being calculated
      groupNode - object with specified groupValue and groupName for this group
      recalculate - if set to false and the node has existing summary data, returns the stored summary data, rather than recalculating
      Returns:
      summary record(s)
    • clearEditValue

      public void clearEditValue(int rowNum, String fieldName)
      &#010 Clear a field value being tracked as an unsaved user edit.

      &#010 The saved record value will be displayed in the the appropriate cell instead.&#010 Will also discard any validation errors for the specified field / row.&#010&#010

      Parameters:
      rowNum - the row number
      fieldName - name of field for which the value is to be cleared
    • willAcceptDrop

      public Boolean willAcceptDrop()
      This method overrides Canvas.willAcceptDrop() and works as follows:
      • If Canvas.willAcceptDrop() (the superclass definition) returns false, this method always returns false. This allows dragType and dropTypes to be used to configure eligibility for drop. By default, a ListGrid has no dropTypes configured and so this check will not prevent a drop.
      • If this is a self-drop, that is, the user is dragging a record within this list, this is an attempted drag-reorder. If canReorderRecords is false, this method returns false.
      • If the EventHandler.getDragTarget() is another widget, if canAcceptDroppedRecords is false this method returns false.
      • If a call to getDragData() on the dragTarget fails to return an record object or an array of records, this method returns false.
      • If a the drop target record is disabled or has canAcceptDrop set to false, return false.
      Note that this method may be called repeatedly during a drag-drop interaction to update the UI and notify the user as to when they may validly drop data. Note : This is an override point
      Overrides:
      willAcceptDrop in class Canvas
      Returns:
      true if this component will accept a drop of the dragData
    • preloadImages

      public static void preloadImages()
      Preload primary ListGrid skin images.
    • getFieldWidth

      public Integer getFieldWidth(String fieldName)
      Returns a numeric value for the width of some field within this ListGrid.
      Parameters:
      fieldName - Name of the field for which the width is to be determined.
      Returns:
      width of the field in px, or null if the width can't be determined.
    • getOriginalResultSet

      public ResultSet getOriginalResultSet()
      Return the underlying, ungrouped data of this ListGrid as a ResultSet. Use this method to access the data when the grid is grouped.

      Note that this method should only be called after initial data has been fetched by this DataBoundComponent.

      Returns:
      ResultSet, or null if the underlying ungrouped data is not a ResultSet
      See Also:
    • getOriginalRecordList

      public RecordList getOriginalRecordList()
      Return the underlying, ungrouped data of this DataBoundComponent as a RecordList.

      If this grid is grouped, DataBoundComponent.getRecordList() will return the grouped data as a Tree. Use this method to return the underlying Array of Records or ResultSet, as if the grid was ungrouped:

      isGrouped() ? getOriginalRecordList() : getRecordList()
      Returns:
      the RecordList
    • setCellFormatter

      public void setCellFormatter(CellFormatter formatter)
      Sets a formatter that returns the HTML to display in each cell of the grid, given the raw cell value. Can be overridden by defining ListGridField.setCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter).
      Parameters:
      formatter - formatter to apply to the cell values
      See Also:
    • setCellCSSTextCustomizer

      public void setCellCSSTextCustomizer(CellCSSTextCustomizer customizer)
      Sets a customizer that returns additional CSS-text for styling a given cell.
      Parameters:
      customizer - customizer to return the additional cell CSS
      See Also:
    • setInactiveCellFormatter

      public void setInactiveCellFormatter(CellFormatter formatter)
      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. Examples of cases where this can happen include:

      • dragTracker HTML for a row when dragTrackerMode is set to "record"
      • measurement HTML used for sizing columns during autoFit
      • measurement HTML used for sizing rows when fixedRecordHeights is false and the grid has both frozen and unfrozen fields
      May also be overridden at the field level (see com.smartgwt.client.widgets.grid.ListGridField#setInactiveCellFormatterfield).

      This is useful for cases where it would not be appropriate to render the standard formatted cell value outside of the body of the grid. An example might be if the formatted value contains a DOM element with a specified ID - an approach sometimes used for integrating third party components into Smart GWT listGrid cells. In this case developers will wish to avoid having the framework render an element with the same ID outside of the grid, and should instead return HTML that would render at the same size, with an appropriate appearance.

      Parameters:
      formatter - formatter for inactive cells
      See Also:
    • setCellValueHoverFormatter

      public void setCellValueHoverFormatter(CellValueHoverFormatter formatter)
      Provide a custom implementation of cellValueHoverHTML(ListGridRecord, int, int, String).

      The CellValueHoverFormatter should return the HTML to display in the hover canvas that is displayed by default if a registered CellValueHoverHandler does not cancel a CellValueHoverEvent. The formatter can return null or an empty string to cancel the hover.

      Parameters:
      formatter - the cell value hover formatter
    • setCellContextMenuItemsCustomizer

      public void setCellContextMenuItemsCustomizer(CellContextMenuItemsCustomizer customizer)
      If showCellContextMenus is true, this method is fired when the user right-clicks a cell in this grid.
      Default implementation will display a menu with entries derived from ListGrid.getCellContextMenuItems for the appropriate cell.
      Parameters:
      customizer - the CellContextMenuItemsCustomizer
    • setDragTrackerIconCustomizer

      public void setDragTrackerIconCustomizer(DragTrackerIconCustomizer dragTrackerIconCustomizer)
      HTML to be shown in hovers over cells in the column described by this field. Note that the "value" passed to the HoverCustomizer callback will be null when the HoverCustomizer is applied to the ListGrid. However when applied to a ListGridField, the appropriate field value will be passed.
      Parameters:
      dragTrackerIconCustomizer - the dragTrackerIcon customizer
    • setSortNumeralHTMLCustomizer

      public void setSortNumeralHTMLCustomizer(SortNumeralHTMLCustomizer customizer)
      This customizer is called to generate the HTML for the sortNumeral displayed next to a field's title when it is included in the current sort specification.
      Parameters:
      customizer - the sortNumeralHTML customizer
    • setCanSelectRecordCustomizer

      public void setCanSelectRecordCustomizer(CanSelectRecordCustomizer customizer)
      This customizer is called to determine whether a given record can be selected in this grid.
      Parameters:
      customizer - the CanSelectRecordCustomizer customizer
    • setDragTrackerTitleCustomizer

      public void setDragTrackerTitleCustomizer(DragTrackerTitleCustomizer dragTrackerTitleCustomizer)
      Return "title" HTML to display as a drag tracker when the user drags some record.
      Default implementation will display the cell value for the title field (see +link{listGrid.getTitleField()}) for the record(s) being dragged (including any icons / custom formatting / styling, etc).

      Note: Only called if +link{listGrid.dragTrackerMode} is set to "title".

      Parameters:
      dragTrackerIconCustomizer - the dragTrackerIcon customizer
    • setHoverCustomizer

      public void setHoverCustomizer(HoverCustomizer hoverCustomizer)
      HTML to be shown in hovers over cells in the column described by this field.
      Parameters:
      hoverCustomizer - the hover customizer
      See Also:
    • setEditorCustomizer

      public void setEditorCustomizer(ListGridEditorCustomizer customizer)
      This method allows developers to dynamically customize the form item displayed in an editable grid, based on the cell being edited. Note that ListGridField#setEditorType() allows a simpler static customization of FormItem properties for a specific field.
      Parameters:
      customizer -
    • hideFields

      public void hideFields(ListGridField[] fields, boolean suppressRelayout)
      Parameters:
      fields - fields to hide
      suppressRelayout - if passed, don't relayout non-explicit sized fields to fit the available space
      See Also:
    • showFields

      public void showFields(ListGridField[] fields, boolean suppressRelayout)
      Parameters:
      field - Fields to show.
      suppressRelayout - If passed, don't resize non-explicitly sized columns to fill the available space.
      See Also:
    • getSelectedCellData

      public RecordList getSelectedCellData()
      Returns the selected cells as a series of Records where each field value is stored under it's offset from the top-left of the selection. For example, a 2x2 cell selection starting from the first column would return two Records, each with two values stored under the names "0" and "1".

      If canSelectCells is not enabled, this API always returns null.

      Returns:
      list of Records as described above
    • setFilterEditorProperties

      public void setFilterEditorProperties(ListGrid filterEditorProperties) throws IllegalStateException
      Properties to apply to the automatically generated filterEditor if showFilterEditor is true.
      Parameters:
      filterEditorProperties - filterEditorProperties Default value is null
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • findNextEditCell

      public int[] findNextEditCell(int rowNum, int colNum, boolean searchForward, boolean stepThroughFields, boolean checkStartingCell)
      Method to find the next editable cell given a starting row/col, and a direction, either iterating through fields within each row, or checking the same field in each row.

      Note, this is potentially an expensive method. For example, consider a listGrid where the user can add rows but not edit any existing rows; in this case, canEditCell() would inspect and reject every row in the dataSet before returning true for the last row. Consider this before making use of this method on grids with large dataSets

      Parameters:
      rowNum - Index of starting row
      colNum - Index of starting column
      searchForward - true if searching forward for the next edit cell, false if searching backwards
      stepThroughFields - true if we should check every field in each row; false if we should check the same field in each row
      checkStartingCell - Should we check whether the starting cell is editable? Pass false to skip the starting cell
      Returns:
      2 element array containing [rowNum,colNum] for the next editable cell, or null if no editable cell is found.
    • setMultiSortDialogDefaults

      public void setMultiSortDialogDefaults(MultiSortDialog multiSortDialogDefaults) throws IllegalStateException
      Class level defaults to apply to the MultiSortDialog which gets automatically generated when askForSort() is called.

      See also showHeaderSpanTitlesInSortEditor and sortEditorSpanTitleSeparator

      Parameters:
      multiSortDialogDefaults - Default value is null
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setMultiSortDialogProperties

      public void setMultiSortDialogProperties(MultiSortDialog multiSortDialogProperties) throws IllegalStateException
      Properties to apply to the MultiSortDialog which gets automatically generated when askForSort() is called.

      See also showHeaderSpanTitlesInSortEditor and sortEditorSpanTitleSeparator

      Parameters:
      multiSortDialogProperties - Default value is null
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCriteria

      public Criteria getCriteria()
      Retrieves a copy of the current criteria for this component (may be null).

      Note: if showFilterEditor is true, the criteria returned by this method may not match the values currently displayed in the filter editor, since the user may have entered values which have not yet been applied to our data. getFilterEditorCriteria() may be used to retrieve the current criteria displayed in the filterEditor.

      Returns:
      current filter criteria
      See Also:
    • getGroupMembers

      public ListGridRecord[] getGroupMembers(GroupNode node, boolean recordsOnly)
      For a grouped grid, returns all the direct children of the supplied node in the groupTree if recordsOnly false. Otherwise, if recordsOnly is true, returns instead a list of all descendants under the supplied node that are actual records from the grid's original data - i.e. that are not other group nodes (for multi-grouping) or summary records.

      Note that null may be returned if the grid is not currently grouped or the supplied node is not a valid GroupNode.

      Parameters:
      node - node from groupTree
      recordsOnly - true to return all descendants that are actual records from the grid's original data, or false to return all immediate children of the supplied group node
      Returns:
      records under the supplied node, as specified above, or null if we're not grouping or the node isn't a group node.
    • setGroupSortNormalizer

      public void setGroupSortNormalizer(GroupSortNormalizer customizer)
      When sortByGroupFirst is active, sets the GroupNode value normalizer used for implicit sorting by the field(s) used for grouping.

      No default implementation.

      Parameters:
      GroupSortNormalizer - customizer
      See Also:
    • getFilterEditorCriteriaAsAdvancedCriteria

      public AdvancedCriteria getFilterEditorCriteriaAsAdvancedCriteria()
    • setDataPageSize

      public ListGrid setDataPageSize(int dataPageSize)
      Description copied from interface: DataBoundComponent
      When using data paging, how many records to fetch at a time. If set to a positive integer, dataPageSize will override the default resultSize for ResultSets automatically created when you call fetchData() (and similarly for the resultSize of ResultTrees). The default of 0 means to just use the default page size of the data container.

      Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords:true, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

      Specified by:
      setDataPageSize in interface DataBoundComponent
      Parameters:
      dataPageSize - dataPageSize Default value is 0
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getDataPageSize

      public int getDataPageSize()
      Description copied from interface: DataBoundComponent
      When using data paging, how many records to fetch at a time. If set to a positive integer, dataPageSize will override the default resultSize for ResultSets automatically created when you call fetchData() (and similarly for the resultSize of ResultTrees). The default of 0 means to just use the default page size of the data container.

      Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords:true, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

      Specified by:
      getDataPageSize in interface DataBoundComponent
      Returns:
      int
      See Also:
    • setUseAllDataSourceFields

      public ListGrid setUseAllDataSourceFields(Boolean useAllDataSourceFields)
      Description copied from interface: DataBoundComponent
      If true, the set of fields given by the "default binding" (see &#010 fields) is used, with any fields specified in&#010 component.fields acting as overrides that can suppress or modify the&#010 display of individual fields, without having to list the entire set of fields that&#010 should be shown.&#010

      &#010 If component.fields contains fields that are not found in the DataSource,&#010 they will be shown after the most recently referred to DataSource field. If the new&#010 fields appear first, they will be shown first.

      Specified by:
      setUseAllDataSourceFields in interface DataBoundComponent
      Parameters:
      useAllDataSourceFields - useAllDataSourceFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getUseAllDataSourceFields

      public Boolean getUseAllDataSourceFields()
      Description copied from interface: DataBoundComponent
      If true, the set of fields given by the "default binding" (see &#010 fields) is used, with any fields specified in&#010 component.fields acting as overrides that can suppress or modify the&#010 display of individual fields, without having to list the entire set of fields that&#010 should be shown.&#010

      &#010 If component.fields contains fields that are not found in the DataSource,&#010 they will be shown after the most recently referred to DataSource field. If the new&#010 fields appear first, they will be shown first.

      Specified by:
      getUseAllDataSourceFields in interface DataBoundComponent
      Returns:
      Boolean
    • setSparseFieldState

      public ListGrid setSparseFieldState(Boolean sparseFieldState)
      Description copied from interface: DataBoundComponent
      If true, getFieldState() and setFieldState(java.lang.String) will omit state information for hidden fields by default.
      Specified by:
      setSparseFieldState in interface DataBoundComponent
      Parameters:
      sparseFieldState - sparseFieldState Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getSparseFieldState

      public Boolean getSparseFieldState()
      Description copied from interface: DataBoundComponent
      If true, getFieldState() and setFieldState(java.lang.String) will omit state information for hidden fields by default.
      Specified by:
      getSparseFieldState in interface DataBoundComponent
      Returns:
      Boolean
    • setShowHiddenFields

      public ListGrid setShowHiddenFields(Boolean showHiddenFields)
      Description copied from interface: DataBoundComponent
      Whether to show fields marked hidden:true when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 The hidden property is used on DataSource fields to mark fields that are&#010 never of meaning to an end user.

      Specified by:
      setShowHiddenFields in interface DataBoundComponent
      Parameters:
      showHiddenFields - showHiddenFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getShowHiddenFields

      public Boolean getShowHiddenFields()
      Description copied from interface: DataBoundComponent
      Whether to show fields marked hidden:true when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 The hidden property is used on DataSource fields to mark fields that are&#010 never of meaning to an end user.

      Specified by:
      getShowHiddenFields in interface DataBoundComponent
      Returns:
      Boolean
    • setShowComplexFields

      public ListGrid setShowComplexFields(Boolean showComplexFields)
      Description copied from interface: DataBoundComponent
      Whether to show fields of non-atomic types when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 If true, the component will show fields that declare a complex type, for example, a&#010 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a&#010 DataSource that declares the fields of a shipping address (city, street name, etc).&#010

      &#010 Such fields may need custom formatters or editors in order to create a usable interface,&#010 for example, an Address field in a ListGrid might use a custom formatter to combine the&#010 relevant fields of an address into one column, and might use a pop-up dialog for&#010 editing.

      Note : This is an advanced setting

      Specified by:
      setShowComplexFields in interface DataBoundComponent
      Parameters:
      showComplexFields - showComplexFields Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getShowComplexFields

      public Boolean getShowComplexFields()
      Description copied from interface: DataBoundComponent
      Whether to show fields of non-atomic types when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 If true, the component will show fields that declare a complex type, for example, a&#010 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a&#010 DataSource that declares the fields of a shipping address (city, street name, etc).&#010

      &#010 Such fields may need custom formatters or editors in order to create a usable interface,&#010 for example, an Address field in a ListGrid might use a custom formatter to combine the&#010 relevant fields of an address into one column, and might use a pop-up dialog for&#010 editing.

      Specified by:
      getShowComplexFields in interface DataBoundComponent
      Returns:
      Boolean
    • setFetchOperation

      public ListGrid setFetchOperation(String fetchOperation)
      Description copied from interface: DataBoundComponent
      Operation ID this component should use when performing fetch operations.
      Specified by:
      setFetchOperation in interface DataBoundComponent
      Parameters:
      fetchOperation - fetchOperation Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getFetchOperation

      public String getFetchOperation()
      Description copied from interface: DataBoundComponent
      Operation ID this component should use when performing fetch operations.
      Specified by:
      getFetchOperation in interface DataBoundComponent
      Returns:
      String
    • setUpdateOperation

      public ListGrid setUpdateOperation(String updateOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing update operations.
      Specified by:
      setUpdateOperation in interface DataBoundComponent
      Parameters:
      updateOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getUpdateOperation

      public String getUpdateOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing update operations.
      Specified by:
      getUpdateOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setAddOperation

      public ListGrid setAddOperation(String addOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing add operations.
      Specified by:
      setAddOperation in interface DataBoundComponent
      Parameters:
      addOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getAddOperation

      public String getAddOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing add operations.
      Specified by:
      getAddOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setRemoveOperation

      public ListGrid setRemoveOperation(String removeOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing remove operations.
      Specified by:
      setRemoveOperation in interface DataBoundComponent
      Parameters:
      removeOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getRemoveOperation

      public String getRemoveOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing remove operations.
      Specified by:
      getRemoveOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setExportFields

      public ListGrid setExportFields(String[] exportFields)
      Description copied from interface: DataBoundComponent
      The list of field-names to export. If provided, the field-list in the exported output is &#010 limited and sorted as per the list.&#010

      &#010 If exportFields is not provided, the exported output includes all visible fields &#010 from this component, sorted as they appear.

      Specified by:
      setExportFields in interface DataBoundComponent
      Parameters:
      exportFields - exportFields Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportFields

      public String[] getExportFields()
      Description copied from interface: DataBoundComponent
      The list of field-names to export. If provided, the field-list in the exported output is &#010 limited and sorted as per the list.&#010

      &#010 If exportFields is not provided, the exported output includes all visible fields &#010 from this component, sorted as they appear.

      Specified by:
      getExportFields in interface DataBoundComponent
      Returns:
      the list of field-names to export.
    • setExportAll

      public ListGrid setExportAll(Boolean exportAll)
      Description copied from interface: DataBoundComponent
      Setting exportAll to true prevents the component from passing its list of fields to the &#010 export call. The result is the export of all visible fields from fields.&#010

      &#010 If exportAll is false, an export operation will first consider &#010 exportFields, if it's set, and fall back on all visible fields from&#010 fields otherwise.

      Specified by:
      setExportAll in interface DataBoundComponent
      Parameters:
      exportAll - exportAll Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportAll

      public Boolean getExportAll()
      Description copied from interface: DataBoundComponent
      Setting exportAll to true prevents the component from passing its list of fields to the &#010 export call. The result is the export of all visible fields from fields.&#010

      &#010 If exportAll is false, an export operation will first consider &#010 exportFields, if it's set, and fall back on all visible fields from&#010 fields otherwise.

      Specified by:
      getExportAll in interface DataBoundComponent
      Returns:
      Boolean
    • setExportIncludeSummaries

      public ListGrid setExportIncludeSummaries(Boolean exportIncludeSummaries)
      Description copied from interface: DataBoundComponent
      If Summary rows exist for this component, whether to include them when exporting client data. Defaults to true if not set
      Specified by:
      setExportIncludeSummaries in interface DataBoundComponent
      Parameters:
      exportIncludeSummaries - exportIncludeSummaries Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportIncludeSummaries

      public Boolean getExportIncludeSummaries()
      Description copied from interface: DataBoundComponent
      If Summary rows exist for this component, whether to include them when exporting client data. Defaults to true if not set
      Specified by:
      getExportIncludeSummaries in interface DataBoundComponent
      Returns:
      Boolean
    • setPreventDuplicates

      public ListGrid setPreventDuplicates(Boolean preventDuplicates) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If set, detect and prevent duplicate records from being transferred to this component, either via&#010 drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected,&#010 a dialog will appear showing the duplicateDragMessage.&#010

      &#010 If the component either does not have a DataSource or has a DataSource with no&#010 primaryKey declared, duplicate checking is off by&#010 default. If duplicate checking is enabled, it looks for an existing record in the dataset&#010 that has all of the properties of the dragged record, and considers that a duplicate.&#010

      &#010 For DragDataAction:"copy" where the target DataSource is related to the source&#010 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current&#010 criteria, already has a record whose value for the foreignKey field matches the&#010 primaryKey of the record being transferred.&#010

      &#010 For example, consider dragging "employees" to "teams", where "teams" has a field&#010 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target&#010 grid has search criteria causing it to show all the members of one team. A duplicate -&#010 adding an employee to the same team twice - is when the target grid's dataset contains an&#010 record with "employeeId" matching the "id" field of the dropped employee.

      Specified by:
      setPreventDuplicates in interface DataBoundComponent
      Parameters:
      preventDuplicates - preventDuplicates Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPreventDuplicates

      public Boolean getPreventDuplicates()
      Description copied from interface: DataBoundComponent
      If set, detect and prevent duplicate records from being transferred to this component, either via&#010 drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected,&#010 a dialog will appear showing the duplicateDragMessage.&#010

      &#010 If the component either does not have a DataSource or has a DataSource with no&#010 primaryKey declared, duplicate checking is off by&#010 default. If duplicate checking is enabled, it looks for an existing record in the dataset&#010 that has all of the properties of the dragged record, and considers that a duplicate.&#010

      &#010 For DragDataAction:"copy" where the target DataSource is related to the source&#010 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current&#010 criteria, already has a record whose value for the foreignKey field matches the&#010 primaryKey of the record being transferred.&#010

      &#010 For example, consider dragging "employees" to "teams", where "teams" has a field&#010 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target&#010 grid has search criteria causing it to show all the members of one team. A duplicate -&#010 adding an employee to the same team twice - is when the target grid's dataset contains an&#010 record with "employeeId" matching the "id" field of the dropped employee.

      Specified by:
      getPreventDuplicates in interface DataBoundComponent
      Returns:
      Boolean
    • setDuplicateDragMessage

      public ListGrid setDuplicateDragMessage(String duplicateDragMessage) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Message to show when a user attempts to transfer duplicate records into this component, and&#010 preventDuplicates is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.
      Specified by:
      setDuplicateDragMessage in interface DataBoundComponent
      Parameters:
      duplicateDragMessage - duplicateDragMessage Default value is "Duplicates not allowed"
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDuplicateDragMessage

      public String getDuplicateDragMessage()
      Description copied from interface: DataBoundComponent
      Message to show when a user attempts to transfer duplicate records into this component, and&#010 preventDuplicates is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.
      Specified by:
      getDuplicateDragMessage in interface DataBoundComponent
      Returns:
      String
    • setAddDropValues

      public ListGrid setAddDropValues(Boolean addDropValues)
      Description copied from interface: DataBoundComponent
      Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.

      If this value is true and this component is databound, DataBoundComponent.getDropValues() will be called for every databound item dropped on this grid, and an update performed on the item

      Specified by:
      setAddDropValues in interface DataBoundComponent
      Parameters:
      addDropValues - addDropValues Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddDropValues

      public Boolean getAddDropValues()
      Description copied from interface: DataBoundComponent
      Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.

      If this value is true and this component is databound, DataBoundComponent.getDropValues() will be called for every databound item dropped on this grid, and an update performed on the item

      Specified by:
      getAddDropValues in interface DataBoundComponent
      Returns:
      Boolean
    • setDropValues

      public ListGrid setDropValues(Map dropValues)
      Description copied from interface: DataBoundComponent
      When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.

      If this property is not defined, Smart GWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.

      Note : This is an advanced setting

      Specified by:
      setDropValues in interface DataBoundComponent
      Parameters:
      dropValues - dropValues Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDropValues

      public Map getDropValues()
      Description copied from interface: DataBoundComponent
      When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.

      If this property is not defined, Smart GWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.

      Note : This is an advanced setting

      Specified by:
      getDropValues in interface DataBoundComponent
      Returns:
      Returns the "drop values" to apply to a record dropped on this component prior to update. Only&#010 applicable to databound components - see dropValues for more details. If multiple records &#010 are being dropped, this method is called for each of them in turn.&#010

      &#010 This method returns the following:&#010

        &#010
      • Nothing, if addDropValues is false
      • &#010
      • dropValues, if that property is set. If the component's criteria object is applicable (as explained&#010 in the next item), it is merged into dropValues, with properties in dropValues taking precedence.
      • &#010
      • The component's criteria object, if the most recent textMatchStyle for the component was "exact" &#010 and it is simple criteria (ie, not an AdvancedCriteria object)
      • &#010
      • Otherwise nothing
      • &#010
      &#010

      &#010 You can override this method if you need more complex setting of drop values than can be &#010 provided by simply supplying a dropValues object.&#010 &#010

    • setProgressiveLoading

      public ListGrid setProgressiveLoading(Boolean progressiveLoading)
      Indicates whether or not this component will load its data progressively
      Parameters:
      progressiveLoading -
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getProgressiveLoading

      public Boolean getProgressiveLoading()
      Indicates whether or not this component will load its data progressively
      Returns:
      See Also:
    • setUseFlatFields

      public ListGrid setUseFlatFields(Boolean useFlatFields) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      The useFlatFields flag causes all simple type fields anywhere in a nested&#010 set of DataSources to be exposed as a flat list for form binding. &#010

      &#010 useFlatFields is typically used with imported metadata, such as &#010 XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a &#010 XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML&#010 nesting that aren't meaningful in a user interface, without the cumbersome and fragile&#010 process of mapping form fields to XML structures.&#010

      &#010 For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message&#010 schema for a web service operation whose input message looks like this:&#010

      &#010 <FindServices>&#010     <searchFor>search text</searchFor>&#010     <Options>&#010         <caseSensitive>false</caseSensitive>&#010     </Options>&#010     <IncludeInSearch>&#010         <serviceName>true</serviceName>&#010         <documentation>true</documentation>&#010         <keywords>true</keywords>&#010     </IncludeInSearch>&#010 </FindServices>&#010 
      &#010 Setting useFlatFields on a DynamicForm that is bound to this input&#010 message schema would result in 5 FormItem reflecting the 5 simple type&#010 fields in the message.&#010

      &#010 For this form, the result of DynamicForm.getValues() might look&#010 like:&#010

      &#010

      {&#010    searchFor: "search text",&#010    caseSensitive: false,&#010    serviceName: true,&#010    documentation : true,&#010    keywords : true&#010 }
      &#010 When contacting a WebService, these values can be automatically&#010 mapped to the structure of the input message for a web service operation by setting&#010 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting&#010 useFlatFields (for use with a DataSource that is&#010 'bound to a WSDL web service' via&#010 wsOperation). &#010

      &#010 Using these two facilities in conjunction (component.useFlatFields and&#010 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user&#010 presentation and when providing the data for XML messages.&#010

      &#010 You can also set useFlatFields to automatically enable &#010 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a&#010 particular operationType.&#010

      &#010 Note that useFlatFields is not generally recommended for use with structures&#010 where multiple simple type fields exist with the same name, however if used with such a&#010 structure, the first field to use a given name wins. "first" means the first field&#010 encountered in a depth first search. "wins" means only the first field will be present as a&#010 field when data binding.

      Specified by:
      setUseFlatFields in interface DataBoundComponent
      Parameters:
      useFlatFields - useFlatFields Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseFlatFields

      public Boolean getUseFlatFields()
      Description copied from interface: DataBoundComponent
      The useFlatFields flag causes all simple type fields anywhere in a nested&#010 set of DataSources to be exposed as a flat list for form binding. &#010

      &#010 useFlatFields is typically used with imported metadata, such as &#010 XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a &#010 XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML&#010 nesting that aren't meaningful in a user interface, without the cumbersome and fragile&#010 process of mapping form fields to XML structures.&#010

      &#010 For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message&#010 schema for a web service operation whose input message looks like this:&#010

      &#010 <FindServices>&#010     <searchFor>search text</searchFor>&#010     <Options>&#010         <caseSensitive>false</caseSensitive>&#010     </Options>&#010     <IncludeInSearch>&#010         <serviceName>true</serviceName>&#010         <documentation>true</documentation>&#010         <keywords>true</keywords>&#010     </IncludeInSearch>&#010 </FindServices>&#010 
      &#010 Setting useFlatFields on a DynamicForm that is bound to this input&#010 message schema would result in 5 FormItem reflecting the 5 simple type&#010 fields in the message.&#010

      &#010 For this form, the result of DynamicForm.getValues() might look&#010 like:&#010

      &#010

      {&#010    searchFor: "search text",&#010    caseSensitive: false,&#010    serviceName: true,&#010    documentation : true,&#010    keywords : true&#010 }
      &#010 When contacting a WebService, these values can be automatically&#010 mapped to the structure of the input message for a web service operation by setting&#010 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting&#010 useFlatFields (for use with a DataSource that is&#010 'bound to a WSDL web service' via&#010 wsOperation). &#010

      &#010 Using these two facilities in conjunction (component.useFlatFields and&#010 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user&#010 presentation and when providing the data for XML messages.&#010

      &#010 You can also set useFlatFields to automatically enable &#010 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a&#010 particular operationType.&#010

      &#010 Note that useFlatFields is not generally recommended for use with structures&#010 where multiple simple type fields exist with the same name, however if used with such a&#010 structure, the first field to use a given name wins. "first" means the first field&#010 encountered in a depth first search. "wins" means only the first field will be present as a&#010 field when data binding.

      Specified by:
      getUseFlatFields in interface DataBoundComponent
      Returns:
      Boolean
    • setHiliteProperty

      public ListGrid setHiliteProperty(String hiliteProperty)
      Description copied from interface: DataBoundComponent
      Marker that can be set on a record to flag that record as hilited. Should be set to a value&#010 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.
      Specified by:
      setHiliteProperty in interface DataBoundComponent
      Parameters:
      hiliteProperty - hiliteProperty Default value is "_hilite"
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getHiliteProperty

      public String getHiliteProperty()
      Description copied from interface: DataBoundComponent
      Marker that can be set on a record to flag that record as hilited. Should be set to a value&#010 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.
      Specified by:
      getHiliteProperty in interface DataBoundComponent
      Returns:
      String
    • editFields

      public void editFields()
      Shows a FieldPicker interface allowing end-users to rearrange the order and visibiility of the fields in the associated DataBoundComponent.
    • editHilites

      public void editHilites()
      Description copied from interface: DataBoundComponent
      Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.
      Specified by:
      editHilites in interface DataBoundComponent
    • getHiliteState

      public String getHiliteState()
      Description copied from interface: DataBoundComponent
      Get the current hilites encoded as a String, for saving.
      Specified by:
      getHiliteState in interface DataBoundComponent
      Returns:
      the hilite state
    • setHiliteState

      public ListGrid setHiliteState(String hiliteState)
      Description copied from interface: DataBoundComponent
      Set the current hilites based on a hiliteState String previously returned from getHilitesState.
      Specified by:
      setHiliteState in interface DataBoundComponent
      Parameters:
      hiliteState - hilites state encoded as a String
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setHilites

      public ListGrid setHilites(Hilite[] hilites)
      Description copied from interface: DataBoundComponent
      Accepts an array of hilite objects and applies them to this DataBoundComponent. See also getHilites for a method of retrieving the hilite array for storage, including hilites manually added by the user.

      NOTE: This is only supported on ListGrid for now.

      Specified by:
      setHilites in interface DataBoundComponent
      Parameters:
      hilites - array of hilite objects
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getHilites

      public Hilite[] getHilites()
      Description copied from interface: DataBoundComponent
      Return the set of hilite-objects currently applied to this DataBoundComponent. These can be saved for storage and then restored to a component later via setHilites().
      Specified by:
      getHilites in interface DataBoundComponent
      Returns:
      array of hilite objects
    • setDragDataAction

      public ListGrid setDragDataAction(DragDataAction dragDataAction)
      Description copied from interface: DataBoundComponent
      Indicates what to do with data dragged into another DataBoundComponent. See&#010 DragDataAction type for details.
      Specified by:
      setDragDataAction in interface DataBoundComponent
      Parameters:
      dragDataAction - dragDataAction Default value is Canvas.MOVE
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDragDataAction

      public DragDataAction getDragDataAction()
      Description copied from interface: DataBoundComponent
      Indicates what to do with data dragged into another DataBoundComponent. See&#010 DragDataAction type for details.
      Specified by:
      getDragDataAction in interface DataBoundComponent
      Returns:
      DragDataAction
    • setDragTrackerStyle

      public ListGrid setDragTrackerStyle(String dragTrackerStyle)
      Description copied from interface: DataBoundComponent
      CSS Style to apply to the drag tracker when dragging occurs on this component.
      Specified by:
      setDragTrackerStyle in interface DataBoundComponent
      Parameters:
      dragTrackerStyle - dragTrackerStyle Default value is "gridDragTracker"
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDragTrackerStyle

      public String getDragTrackerStyle()
      Description copied from interface: DataBoundComponent
      CSS Style to apply to the drag tracker when dragging occurs on this component.
      Specified by:
      getDragTrackerStyle in interface DataBoundComponent
      Returns:
      String
    • setCanAddFormulaFields

      public ListGrid setCanAddFormulaFields(Boolean canAddFormulaFields)
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.&#010

      &#010 User-added formula fields can be persisted via getFieldState() and &#010 setFieldState(java.lang.String).

      Specified by:
      setCanAddFormulaFields in interface DataBoundComponent
      Parameters:
      canAddFormulaFields - canAddFormulaFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • addSummaryField

      public void addSummaryField()
      Description copied from interface: DataBoundComponent
      Convenience method to display a {@link com.smartgwt.client..SummaryBuilder} to create a new Summary Field. This &#010 is equivalent to calling DataBoundComponentGen#editSummaryField with &#010 no parameter.&#010&#010
      Specified by:
      addSummaryField in interface DataBoundComponent
    • addFormulaField

      public void addFormulaField()
      Description copied from interface: DataBoundComponent
      Convenience method to display a {@link com.smartgwt.client..FormulaBuilder} to create a new Formula Field. This &#010 is equivalent to calling DataBoundComponentGen#editFormulaField with &#010 no parameter.&#010&#010
      Specified by:
      addFormulaField in interface DataBoundComponent
    • getCanAddFormulaFields

      public Boolean getCanAddFormulaFields()
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.&#010

      &#010 User-added formula fields can be persisted via getFieldState() and &#010 setFieldState(java.lang.String).

      Specified by:
      getCanAddFormulaFields in interface DataBoundComponent
      Returns:
      Boolean
    • setAddFormulaFieldText

      public ListGrid setAddFormulaFieldText(String addFormulaFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      setAddFormulaFieldText in interface DataBoundComponent
      Parameters:
      addFormulaFieldText - addFormulaFieldText Default value is "Add formula column..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddFormulaFieldText

      public String getAddFormulaFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      getAddFormulaFieldText in interface DataBoundComponent
      Returns:
      String
    • setEditFormulaFieldText

      public ListGrid setEditFormulaFieldText(String editFormulaFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit a formula field
      Specified by:
      setEditFormulaFieldText in interface DataBoundComponent
      Parameters:
      editFormulaFieldText - editFormulaFieldText Default value is "Edit formula..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getEditFormulaFieldText

      public String getEditFormulaFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit a formula field
      Specified by:
      getEditFormulaFieldText in interface DataBoundComponent
      Returns:
      String
    • setCanAddSummaryFields

      public ListGrid setCanAddSummaryFields(Boolean canAddSummaryFields)
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 text field that can contain both user-defined text and the formatted values present in other &#010 fields, using the {@link com.smartgwt.client..SummaryBuilder}.&#010

      &#010 User-added summary fields can be persisted via getFieldState() and &#010 setFieldState(java.lang.String).

      Specified by:
      setCanAddSummaryFields in interface DataBoundComponent
      Parameters:
      canAddSummaryFields - canAddSummaryFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getCanAddSummaryFields

      public Boolean getCanAddSummaryFields()
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 text field that can contain both user-defined text and the formatted values present in other &#010 fields, using the {@link com.smartgwt.client..SummaryBuilder}.&#010

      &#010 User-added summary fields can be persisted via getFieldState() and &#010 setFieldState(java.lang.String).

      Specified by:
      getCanAddSummaryFields in interface DataBoundComponent
      Returns:
      Boolean
    • setAddSummaryFieldText

      public ListGrid setAddSummaryFieldText(String addSummaryFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      setAddSummaryFieldText in interface DataBoundComponent
      Parameters:
      addSummaryFieldText - addSummaryFieldText Default value is "Add summary column..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddSummaryFieldText

      public String getAddSummaryFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      getAddSummaryFieldText in interface DataBoundComponent
      Returns:
      String
    • setEditSummaryFieldText

      public ListGrid setEditSummaryFieldText(String editSummaryFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit the formatter for a field
      Specified by:
      setEditSummaryFieldText in interface DataBoundComponent
      Parameters:
      editSummaryFieldText - editSummaryFieldText Default value is "Edit summary format..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getEditSummaryFieldText

      public String getEditSummaryFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit the formatter for a field
      Specified by:
      getEditSummaryFieldText in interface DataBoundComponent
      Returns:
      String
    • setSavedSearchId

      public ListGrid setSavedSearchId(String savedSearchId)
      Description copied from interface: DataBoundComponent
      Optional identifier for saved searches that should be applied to this component.

      By default SavedSearches are associated with a component via its local ID and DataSource ID. This property allows developers to override this behavior and explicitly associate a component with a set of saved searches. This can provide a couple of benefits:
      Firstly this ensures that saved searches will be unambiguously associated with the particular component even if the page changes such that a stored minimal locator would no longer applied to the component, without requiring an explicit Canvas.ID.
      Secondly this allows the same set of saved searches to be applied to more than one component on a page. This may be valueable for cases where the same information from the same dataSource is presented to users in multiple places.

      Note: This is an advanced setting.

      Specified by:
      setSavedSearchId in interface DataBoundComponent
      Parameters:
      savedSearchId - New savedSearchId value. Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getSavedSearchId

      public String getSavedSearchId()
      Description copied from interface: DataBoundComponent
      Optional identifier for saved searches that should be applied to this component.

      By default SavedSearches are associated with a component via its local ID and DataSource ID. This property allows developers to override this behavior and explicitly associate a component with a set of saved searches. This can provide a couple of benefits:
      Firstly this ensures that saved searches will be unambiguously associated with the particular component even if the page changes such that a stored minimal locator would no longer applied to the component, without requiring an explicit Canvas.ID.
      Secondly this allows the same set of saved searches to be applied to more than one component on a page. This may be valueable for cases where the same information from the same dataSource is presented to users in multiple places.

      Specified by:
      getSavedSearchId in interface DataBoundComponent
      Returns:
      Current savedSearchId value. Default value is null
    • setShowSavedSearchesByDS

      public ListGrid setShowSavedSearchesByDS(boolean showSavedSearchesByDS) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Whether to associate saved searches by default with the current DataSource of a component when a savedSearchId is not provided. If this property is true, then when the DataSource is changed, existing saved searches will disappear and only be available if the DataSource is set back to its original value.

      If this property is false, saved searches will persist across DataSource changes so that searches that aren't applicable to the current DataSource might still be shown.

      Note: This is an advanced setting

      Specified by:
      setShowSavedSearchesByDS in interface DataBoundComponent
      Parameters:
      showSavedSearchesByDS - New showSavedSearchesByDS value. Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowSavedSearchesByDS

      public boolean getShowSavedSearchesByDS()
      Description copied from interface: DataBoundComponent
      Whether to associate saved searches by default with the current DataSource of a component when a savedSearchId is not provided. If this property is true, then when the DataSource is changed, existing saved searches will disappear and only be available if the DataSource is set back to its original value.

      If this property is false, saved searches will persist across DataSource changes so that searches that aren't applicable to the current DataSource might still be shown.

      Specified by:
      getShowSavedSearchesByDS in interface DataBoundComponent
      Returns:
      Current showSavedSearchesByDS value. Default value is true
    • findAll

      public Record[] findAll(AdvancedCriteria adCriteria)
      Filters all objects according to the AdvancedCriteria passed
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      all matching Objects or null if none found
    • find

      public Record find(AdvancedCriteria adCriteria)
      Filters all objects according to the AdvancedCriteria passed and returns the first matching object or null if not found
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      first matching object or null if not found
    • findIndex

      public int findIndex(AdvancedCriteria adCriteria)
      Finds the index of the first Record that matches with the AdvacendCriteria passed.
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      index of the first matching Record or -1 if not found
    • findNextIndex

      public int findNextIndex(int startIndex, AdvancedCriteria adCriteria, int endIndex)
      Like RecordList.findIndex(java.util.Map), but considering the startIndex and endIndex parameters.
      Parameters:
      startIndex - first index to consider
      adCriteria - AdvancedCriteria to use to filter results
      endIndex - last index to consider
      Returns:
      index of the first matching Record or -1 if not found
    • findNextIndex

      public int findNextIndex(int startIndex, AdvancedCriteria adCriteria)
      Like RecordList.findIndex(java.util.Map), but considering the startIndex parameter.
      Parameters:
      startIndex - first index to consider
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      index of the first matching Record or -1 if not found
    • selectRecord

      public void selectRecord(Record record)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
    • selectRecord

      public void selectRecord(int record)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
    • selectRecord

      public void selectRecord(int record, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
      newState - new selection state (if null, defaults to true)
    • selectRecord

      public void selectRecord(Record record, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
      newState - new selection state (if null, defaults to true)
    • selectRecords

      public void selectRecords(int[] records)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
    • selectRecords

      public void selectRecords(int[] records, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
      newState - new selection state
    • selectRecords

      public void selectRecords(Record[] records)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
    • selectRecords

      public void selectRecords(Record[] records, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
      newState - new selection state (if null, defaults to true)
    • deselectRecord

      public void deselectRecord(Record record)
      Description copied from interface: DataBoundComponent
      Deselect a Record passed in explicitly, or by index.

      Synonym for selectRecord(record, false)

      Specified by:
      deselectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to deselect
    • deselectRecord

      public void deselectRecord(int record)
      Description copied from interface: DataBoundComponent
      Deselect a Record passed in explicitly, or by index.

      Synonym for selectRecord(record, false)

      Specified by:
      deselectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to deselect
    • deselectRecords

      public void deselectRecords(int[] records)
      Description copied from interface: DataBoundComponent
      Deselect a list of Records passed in explicitly, or by index.

      Synonym for selectRecords(records, false)

      Specified by:
      deselectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to deselect
    • deselectRecords

      public void deselectRecords(Record[] records)
      Description copied from interface: DataBoundComponent
      Deselect a list of Records passed in explicitly, or by index.

      Synonym for selectRecords(records, false)

      Specified by:
      deselectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to deselect
    • selectAllRecords

      public void selectAllRecords()
      Description copied from interface: DataBoundComponent
      Select all records&#010&#010
      Specified by:
      selectAllRecords in interface DataBoundComponent
    • deselectAllRecords

      public void deselectAllRecords()
      Description copied from interface: DataBoundComponent
      &#010 Deselect all records&#010&#010
      Specified by:
      deselectAllRecords in interface DataBoundComponent
    • anySelected

      public Boolean anySelected()
      Description copied from interface: DataBoundComponent
      Whether at least one item is selected&#010
      Specified by:
      anySelected in interface DataBoundComponent
      Returns:
      true == at least one item is selected false == nothing at all is selected
    • enableHilite

      public void enableHilite(String hiliteID)
      Description copied from interface: DataBoundComponent
      Enable / disable a hilites&#010&#010
      Specified by:
      enableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to enable
    • enableHilite

      public void enableHilite(String hiliteID, boolean enable)
      Description copied from interface: DataBoundComponent
      Enable / disable a hilites&#010&#010
      Specified by:
      enableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to enable
      enable - new enabled state to apply - if null, defaults to true
    • disableHilite

      public void disableHilite(String hiliteID)
      Description copied from interface: DataBoundComponent
      Disable a hilite&#010&#010
      Specified by:
      disableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to disable
    • enableHiliting

      public void enableHiliting()
      Description copied from interface: DataBoundComponent
      Enable all hilites.&#010&#010
      Specified by:
      enableHiliting in interface DataBoundComponent
    • enableHiliting

      public void enableHiliting(boolean enable)
      Description copied from interface: DataBoundComponent
      Enable all hilites.&#010&#010
      Specified by:
      enableHiliting in interface DataBoundComponent
      Parameters:
      enable - new enabled state to apply - if null, defaults to true
    • disableHiliting

      public void disableHiliting()
      Description copied from interface: DataBoundComponent
      Disable all hilites.&#010&#010
      Specified by:
      disableHiliting in interface DataBoundComponent
    • getDragData

      public Record[] getDragData()
      Description copied from interface: DataBoundComponent
      During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.

      This method is consulted by&#010 willAcceptDrop().

      Specified by:
      getDragData in interface DataBoundComponent
      Returns:
      Array of Records that are currently selected.
    • transferSelectedData

      public void transferSelectedData(DataBoundComponent source)
      Description copied from interface: DataBoundComponent
      Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by calling DataBoundComponent.getDropValues() for each dropped record.

      To transfer all data in, for example, a ListGrid, call grid.selection.selectAll() first.

      Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to transferSelectedData() and/or the drop() method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, use HasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler). See the Dragging documentation for an overview of list grid drag/drop data transfer.

      Specified by:
      transferSelectedData in interface DataBoundComponent
      Parameters:
      source - source component from which the records will be tranferred
    • transferSelectedData

      public void transferSelectedData(DataBoundComponent source, int index)
      Description copied from interface: DataBoundComponent
      Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by calling DataBoundComponent.getDropValues() for each dropped record.

      To transfer all data in, for example, a ListGrid, call grid.selection.selectAll() first.

      Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to transferSelectedData() and/or the drop() method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, use HasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler). See the Dragging documentation for an overview of list grid drag/drop data transfer.

      Specified by:
      transferSelectedData in interface DataBoundComponent
      Parameters:
      source - source component from which the records will be transferred
      index - target index (drop position) of the rows within this grid.
    • getRecordIndex

      public int getRecordIndex(Record record)
      Description copied from interface: DataBoundComponent
      Get the index of the provided record.&#010

      &#010 Override in subclasses to provide more specific behaviour, for instance, when data holds a&#010 large number of records&#010&#010

      Specified by:
      getRecordIndex in interface DataBoundComponent
      Parameters:
      record - the record whose index is to be retrieved
      Returns:
      indexindex of the record, or -1 if not found
    • getTitleFieldValue

      public String getTitleFieldValue(Record record)
      Description copied from interface: DataBoundComponent
      Get the value of the titleField for the passed record&#010

      &#010 Override in subclasses &#010&#010

      Specified by:
      getTitleFieldValue in interface DataBoundComponent
      Parameters:
      record - the record whose index is to be retrieved
      Returns:
      valuethe value of the titleField for the passed record
    • setTitleField

      public ListGrid setTitleField(String titleField)
      Description copied from interface: DataBoundComponent
      Sets the best field to use for a user-visible title for an individual record from this component.
      Specified by:
      setTitleField in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getTitleField

      public String getTitleField()
      Description copied from interface: DataBoundComponent
      Method to return the fieldName which represents the "title" for records in this&#010 Component.
      &#010 If this.titleField is explicitly specified it will always be used.&#010 Otherwise, default implementation will check titleField for databound&#010 components.
      &#010 For non databound components returns the first defined field name of "title", &#010 "name", or "id". If we dont find any field-names that match these&#010 titles, the first field in the component will be used instead.&#010
      Specified by:
      getTitleField in interface DataBoundComponent
      Returns:
      fieldName the title field for this component.
    • getDataSource

      public DataSource getDataSource()
      Description copied from interface: DataBoundComponent
      The DataSource that this component should bind to for default fields and for performing DataSource requests.
      Specified by:
      getDataSource in interface DataBoundComponent
      Returns:
      DataSource
    • setAutoFetchData

      public ListGrid setAutoFetchData(Boolean autoFetchData) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() . Criteria for this fetch may be picked up from initialCriteria and textMatchStyle may be specified via DataBoundComponent.getAutoFetchTextMatchStyle().

      NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only initialCriteria and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.

      Specified by:
      setAutoFetchData in interface DataBoundComponent
      Parameters:
      autoFetchData - autoFetchData
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchData

      public Boolean getAutoFetchData()
      Description copied from interface: DataBoundComponent
      If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() . Criteria for this fetch may be picked up from initialCriteria and textMatchStyle may be specified via DataBoundComponent.getAutoFetchTextMatchStyle().

      NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only initialCriteria and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.

      Specified by:
      getAutoFetchData in interface DataBoundComponent
      Returns:
      autoFetchData autoFetchData
    • setAutoFetchTextMatchStyle

      public ListGrid setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
      Specified by:
      setAutoFetchTextMatchStyle in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchTextMatchStyle

      public TextMatchStyle getAutoFetchTextMatchStyle()
      Description copied from interface: DataBoundComponent
      If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
      Specified by:
      getAutoFetchTextMatchStyle in interface DataBoundComponent
      Returns:
      autoFetchTextMatchStyle autoFetchTextMatchStyle
    • setAutoFetchAsFilter

      public ListGrid setAutoFetchAsFilter(Boolean autoFetchAsFilter) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
      Specified by:
      setAutoFetchAsFilter in interface DataBoundComponent
      Parameters:
      autoFetchAsFilter - autoFetchAsFilter
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchAsFilter

      public Boolean getAutoFetchAsFilter()
      Description copied from interface: DataBoundComponent
      If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
      Specified by:
      getAutoFetchAsFilter in interface DataBoundComponent
      Returns:
      auto fetch as filter
    • setInitialCriteria

      public ListGrid setInitialCriteria(Criteria initialCriteria) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
      Specified by:
      setInitialCriteria in interface DataBoundComponent
      Parameters:
      initialCriteria - the initial criteria
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getInitialCriteria

      public Criteria getInitialCriteria()
      Description copied from interface: DataBoundComponent
      Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
      Specified by:
      getInitialCriteria in interface DataBoundComponent
      Returns:
      the criteria
    • setImplicitCriteria

      public ListGrid setImplicitCriteria(Criteria implicitCriteria)
      Description copied from interface: DataBoundComponent
      Criteria that are never shown to or edited by the user and are cumulative with any criteria provided via DataBoundComponent.initialCriteria, DataBoundComponent.setCriteria() etc.
      Specified by:
      setImplicitCriteria in interface DataBoundComponent
      Parameters:
      implicitCriteria - New implicitCriteria value. Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setImplicitCriteria

      public Boolean setImplicitCriteria(Criteria implicitCriteria, DSCallback callback)
    • setImplicitCriteria

      public Boolean setImplicitCriteria(Criteria criteria, DSCallback callback, Boolean initialFetch)
    • getImplicitCriteria

      public Criteria getImplicitCriteria()
      Description copied from interface: DataBoundComponent
      Criteria that are never shown to or edited by the user and are cumulative with any criteria provided via DataBoundComponent.initialCriteria, DataBoundComponent.setCriteria() etc.
      Specified by:
      getImplicitCriteria in interface DataBoundComponent
      Returns:
      Current implicitCriteria value. Default value is null
    • fetchData

      public void fetchData()
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
    • fetchData

      public void fetchData(Criteria criteria)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
    • fetchData

      public void fetchData(Criteria criteria, DSCallback callback)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required
    • fetchData

      public void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required
      requestProperties - additional properties to set on the DSRequest that will be issued
    • filterData

      public void filterData()
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
    • filterData

      public void filterData(Criteria criteria)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
    • filterData

      public void filterData(Criteria criteria, DSCallback callback)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required; see DataBoundComponent.fetchData() for details
    • filterData

      public void filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required; see DataBoundComponent.fetchData() for details
      requestProperties - for databound components only - optional additional properties to set on the DSRequest that will be issued
    • invalidateCache

      public void invalidateCache()
      Description copied from interface: DataBoundComponent
      Invalidate the current data cache for this databound component via a call to the dataset's invalidateCache() method, for example, ResultSet.invalidateCache().

      NOTE: there is no need to call invalidateCache() when a save operation is performed on a DataSource. Automatic cache synchronization features will automatically update caches - see ResultSet for details. If automatic cache synchronization isn't working, troubleshoot the problem using the steps suggested in the FAQ rather than just calling invalidateCache(). Calling invalidateCache() unnecessarily causes extra server load and added code complexity.

      Calling invalidateCache() will automatically cause a new fetch to be performed with the current set of criteria if data had been previously fetched and the component is currently drawn with data visible - there is no need to manually call fetchData() after invalidateCache() and this could result in duplicate fetches.

      While data is being re-loaded after a call to invalidateCache(), the widget is in a state similar to initial data load - it doesn't know the total length of the dataset and any APIs that act on records or row indices will necessarily fail and should not be called. To detect that the widget is in this state, call ResultSet.lengthIsKnown().

      invalidateCache() only has an effect if this component's dataset is a data manager class that manages a cache (eg ResultSet or ResultTree). If data was provided as a simple Array or List, invalidateCache() does nothing.

      Specified by:
      invalidateCache in interface DataBoundComponent
      See Also:
    • getResultSet

      public ResultSet getResultSet()
      Description copied from interface: DataBoundComponent
      Return the underlying data of this DataBoundComponent as a ResultSet.

      Note that this method should only be called after initial data has been fetched by this DataBoundComponent.

      Specified by:
      getResultSet in interface DataBoundComponent
      Returns:
      ResultSet, or null if the underlying data is not a ResultSet
      See Also:
    • getRecordList

      public RecordList getRecordList()
      Description copied from interface: DataBoundComponent
      Return the underlying data of this DataBoundComponent as a RecordList.

      Depending on the component configuration, the actual JavaScript instance of the returned RecordList may be one of several types:

      • If the component is not bound to a DataSource, the instance is generally an Array of Record.
      • If the component is bound to a DataSource, the instance is a ResultSet.
      • If the component is a grouped ListGrid, the instance is a Tree. To access the ungrouped record list regardless of grouping status, use
        isGrouped() ? getOriginalRecordList() : getRecordList()
      • If the component is a TreeGrid, the instance is a ResultTree.
      The underlying type determines the structure of the returned data. An Array or ResultSet represents a list of records, but a Tree or ResultTree represents a list of open rows in the tree, including groups or other nodes which contain no records.
      Specified by:
      getRecordList in interface DataBoundComponent
      Returns:
      the RecordList
    • getDataAsJSList

      public JavaScriptObject getDataAsJSList()
      Specified by:
      getDataAsJSList in interface DataBoundComponent
    • exportData

      public void exportData()
      Description copied from interface: DataBoundComponent
      Specified by:
      exportData in interface DataBoundComponent
    • exportData

      public void exportData(DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Specified by:
      exportData in interface DataBoundComponent
    • exportData

      public void exportData(DSRequest requestProperties, RPCCallback callback)
      Description copied from interface: DataBoundComponent
      Uses a "fetch" operation on the current DataSource to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.

      A variety of DSRequest settings, such as exportAs and exportFilename, affect the exporting process: see exportResults for further detail.

      Note that data exported via this method does not include any client-side formatting and relies on both the Smart GWT server and server-side DataSources. To export client-data with formatters applied, see exportClientData, which still requires the Smart GWT server but does not rely on server-side DataSources.

      For more information on exporting data, see DataSource.exportData.

      Specified by:
      exportData in interface DataBoundComponent
      Parameters:
      requestProperties - additional properties to set on DSRequest that will be issued
      callback - Optional callback. Note that this parameter only applies if you specify exportToClient: false in the request properties, because file downloads don't provide ordinary framework callbacks
      See Also:
    • addFetchDataHandler

      public HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
      Add a fetchData handler.

      Notification function fired on fetchData() or filterData()

      Specified by:
      addFetchDataHandler in interface HasFetchDataHandlers
      Parameters:
      handler - the filterData handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDropCompleteHandler

      public HandlerRegistration addDropCompleteHandler(DropCompleteHandler handler)
      Add a com.smartgwt.client.widgets.DropCompleteHandler. See that class's documentation for a definition of "drop complete", and how it differs from "drag complete" (com.smartgwt.client.widgets.DragCompleteHandler).
      Specified by:
      addDropCompleteHandler in interface HasDropCompleteHandlers
      Parameters:
      handler - the DropCompleteHandler
      Returns:
      HandlerRegistration used to remove this handler
    • addDragCompleteHandler

      public HandlerRegistration addDragCompleteHandler(DragCompleteHandler handler)
      Add a com.smartgwt.client.widgets.DragCompleteHandler. See that class's documentation for a definition of "drag complete", and how it differs from "drop complete" (com.smartgwt.client.widgets.DropCompleteHandler).
      Specified by:
      addDragCompleteHandler in interface HasDragCompleteHandlers
      Parameters:
      handler - the DropCompleteHandler
      Returns:
      HandlerRegistration used to remove this handler
    • getFieldAlignments

      public Alignment[] getFieldAlignments()
      Description copied from interface: DataBoundComponent
      Returna an array of field alignments for this grid
      Specified by:
      getFieldAlignments in interface DataBoundComponent
      Returns:
      array of Alignments
    • getDeepCloneOnEdit

      public Boolean getDeepCloneOnEdit()
      Description copied from interface: DataBoundComponent
      Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. See DataSource.getDeepCloneOnEdit() for details of what this means.

      If this value is not explicitly set, it defaults to the DataSource deepCloneOnEdit value. This value can also be overridden per-field with DataSourceField.setDeepCloneOnEdit(java.lang.Boolean).

      Like the other deepCloneOnEdit settings, this flag only has an effect if you are editing a values object that contains nested objects or arrays, using Canvas.setDataPath(java.lang.String)

      Specified by:
      getDeepCloneOnEdit in interface DataBoundComponent
    • setDeepCloneOnEdit

      public ListGrid setDeepCloneOnEdit(Boolean deepCloneOnEdit)
      Description copied from interface: DataBoundComponent
      Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. See DataSource.getDeepCloneOnEdit() for details of what this means.

      If this value is not explicitly set, it defaults to the DataSource deepCloneOnEdit value. This value can also be overridden per-field with DataSourceField.setDeepCloneOnEdit(java.lang.Boolean).

      Like the other deepCloneOnEdit settings, this flag only has an effect if you are editing a values object that contains nested objects or arrays, using Canvas.setDataPath(java.lang.String)

      Specified by:
      setDeepCloneOnEdit in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setFields

      public ListGrid setFields(JavaScriptObject... fields)
      Description copied from interface: DataBoundComponent
      Field setter variant (alternative to setFields(FormItem...), setFields(ListGridField...), etc.) that will accept an array of JavaScriptObject, rather than an array of SmartGWT Java wrappers of the field class type (e.g. FormItem, ListGridField, etc.) This is an advanced method and only for cases where you have the JavaScriptObject for each field but want to avoid having to create each associated SmartGWT Java wrapper.

      Note: use toArray() to create a Java array of JavaScriptObject if you only have the array itself as a single JavaScriptObject.

      Specified by:
      setFields in interface DataBoundComponent
      Parameters:
      fields - the component fields
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getFieldsAsJavaScriptObjects

      public JavaScriptObject[] getFieldsAsJavaScriptObjects()
      Description copied from interface: DataBoundComponent
      Return the fields as JavaScriptObjects rather than as SmartGWT Java wrappers of the field class type (e.g. FormItem, ListGridField, etc.) This avoids building the SmartGWT Java wrappers for the fields in situations where they aren't needed - and for FormItems in particular - where there may not be enough information to determine the correct subclass, such as before the SmartClient instance underlying the DynamicForm has been created.
      Specified by:
      getFieldsAsJavaScriptObjects in interface DataBoundComponent
      Returns:
      the component fields
    • getFieldCount

      public int getFieldCount()
      Description copied from interface: DataBoundComponent
      Return the number of fields.
      Specified by:
      getFieldCount in interface DataBoundComponent
      Returns:
      the number of fields
    • transferRecords

      public void transferRecords(Record[] records, Record targetRecord, Integer index, Canvas sourceWidget, TransferRecordsCallback callback)
      Description copied from interface: DataBoundComponent
      Transfer a list of Records from another component (does not have to be a databound component) into this component. This method is only applicable to list-type components, such as ListGrid or com.smartgwt.client.widgets.tile.TileGridTileGrid. Notably, it does not apply to TreeGrid; the equivalent for treeGrids is transferNodes.

      This method implements the automatic drag-copy and drag-move behaviors of components like ListGrid, and calling it is equivalent to completing a drag and drop of the dropRecords (the default record drop behavior is simply to call transferRecords(), passing in the dropped nodes)

      Note that this method is asynchronous - it may need to perform server turnarounds to prevent duplicates in the target component's data. If you wish to be notified when the transfer process has completed, you can either pass a non-null callback to this method or add a DropCompleteHandler to this component.

      See also transferSelectedData()

      Specified by:
      transferRecords in interface DataBoundComponent
      Parameters:
      records - Recordss to transfer to this component
      targetRecord - The target record (eg, of a drop interaction), for context
      index - Insert point relative to the target record for the transferred records
      sourceWidget - The databound or non-databound component from which the records are to be transferred.
      callback - optional TransferRecordsCallback to be fired when the transfer process has completed (pass null if your code does not need to be called back). The callback will be passed the list of records actually transferred to this component
    • setDragDataCustomizer

      public ListGrid setDragDataCustomizer(DragDataCustomizer customizer)
      During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.

      This method is consulted by willAcceptDrop().

      Parameters:
      DragDataCustomizer - customizer
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(ListGridLogicalStructure s)
      Setter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
    • getLogicalStructure

      public LogicalStructureObject getLogicalStructure()
      Getter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
      Specified by:
      getLogicalStructure in interface LogicalStructure
      Overrides:
      getLogicalStructure in class VLayout