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
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
-
Field Summary
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd a bodyKeyPress handler.addCellClickHandler
(CellClickHandler handler) Add a cellClick handler.Add a cellContextClick handler.Add a cellDoubleClick handler.Add a cellErrorIconHover handler.Add a cellErrorIconOut handler.Add a cellErrorIconOver handler.addCellHoverHandler
(CellHoverHandler handler) Add a cellHover handler.Add a cellMouseDown handler.addCellMouseUpHandler
(CellMouseUpHandler handler) Add a cellMouseUp handler.addCellOutHandler
(CellOutHandler handler) Add a cellOut handler.addCellOverHandler
(CellOverHandler handler) Add a cellOver handler.addCellSavedHandler
(CellSavedHandler handler) Add a cellSaved handler.Add a cellSelectionChanged handler.Add a cellValueHover handler.Add a criteriaChanged handler.void
Perform a DataSource "add" operation to add new records to this component's DataSource.void
addData
(Record newRecord, DSCallback callback) void
addData
(Record newRecord, DSCallback callback, DSRequest requestProperties) Perform a DataSource "add" operation to add new records to this component's DataSource.addDataArrivedHandler
(DataArrivedHandler handler) Add a dataArrived handler.addDataChangedHandler
(DataChangedHandler handler) Add a dataChanged handler.Add acom.smartgwt.client.widgets.DragCompleteHandler
.Add a drawAreaChanged handler.Add acom.smartgwt.client.widgets.DropCompleteHandler
.Add a editComplete handler.addEditFailedHandler
(EditFailedHandler handler) Add a editFailed handler.addEditorEnterHandler
(EditorEnterHandler handler) Add a editorEnter handler.addEditorExitHandler
(EditorExitHandler handler) Add a editorExit handler.void
addEmbeddedComponent
(Canvas component, ListGridRecord record) Attaches the component to the provided record.void
addEmbeddedComponent
(Canvas component, ListGridRecord record, Integer rowNum) void
addEmbeddedComponent
(Canvas component, ListGridRecord record, Integer rowNum, Integer colNum) void
addEmbeddedComponent
(Canvas component, ListGridRecord record, Integer rowNum, Integer colNum, EmbeddedPosition position) Attaches the component to the provided record.addFetchDataHandler
(FetchDataHandler handler) Add a fetchData handler.Add a fieldStateChanged handler.Add a filterEditorSubmit handler.void
Convenience method to display a {@link com.smartgwt.client..FormulaBuilder} to create a new Formula Field.Add a formulaUpdated handler.Add a groupByComplete handler.addGroupByHandler
(GroupByHandler handler) Add a groupBy handler.Add a groupStateChanged handler.Add a groupTreeChanged handler.addHeaderClickHandler
(HeaderClickHandler handler) Add a headerClick handler.Add a headerDoubleClick handler.addHeaderHoverHandler
(HeaderHoverHandler handler) Add a headerHover handler.Add a hilitesChanged handler.addRecordClickHandler
(RecordClickHandler handler) Add a recordClick handler.Add a recordCollapse handler.Add a recordDoubleClick handler.addRecordDropHandler
(RecordDropHandler handler) Add a recordDrop handler.Add a recordExpand handler.addRegroupHandler
(RegroupHandler handler) Add a regroup handler.Add a removeRecordClick handler.Add a rowContextClick handler.Add a rowEditorEnter handler.Add a rowEditorExit handler.addRowHoverHandler
(RowHoverHandler handler) Add a rowHover handler.Add a rowMouseDown handler.addRowMouseUpHandler
(RowMouseUpHandler handler) Add a rowMouseUp handler.addRowOutHandler
(RowOutHandler handler) Add a rowOut handler.addRowOverHandler
(RowOverHandler handler) Add a rowOver handler.Add a selectionChanged handler.Add a selectionUpdated handler.addSetSortHandler
(SetSortHandler handler) Add a setSort handler.void
addSort
(SortSpecifier sortSpecifier) Adds anotherSortSpecifier
to this grid's sort configuration and resorts.addSortChangedHandler
(SortChangedHandler handler) Add a sortChanged handler.addSorterClickHandler
(SorterClickHandler handler) Add a sorterClick handler.Add a sorterContextClick handler.void
Convenience method to display a {@link com.smartgwt.client..SummaryBuilder} to create a new Summary Field.Add a viewStateChanged handler.Whether at least one item is selected
void
applyCellData
(RecordList cellData) Applies a set of Records containing coordinate-based data as returned bygetSelectedCellData()
and applies the data at the current selection.void
applyRecordData
(RecordList recordData) Applies a list of Records as changes to the current selection.void
applySortToData
(SortSpecifier... sortSpecifiers) Sort the grid's data to reflect the parameter sortSpecifiers.void
Show a dialog to configure the sorting of multiple fields on this component.int
autoFitField
(String fieldName) Programmatically cause a field to auto-fit horizontally to it's contents or title.void
Perform a one-time horizontal auto-fit of the fields passed.void
autoFitFields
(ListGridField... fields) Perform a one-time horizontal auto-fit of the fields passed.void
Cancel the current edit without saving.boolean
canEditCell
(int rowNum, int colNum) Can this cell be edited?boolean
canExpandRecord
(ListGridRecord record, int rowNum) Indicates whether a given record or rowNum can be expanded.boolean
canSelectCell
(int rowNum, int colNum) IfcanSelectCells
is set totrue
then, whenever an end-user or programmatic cell-selection is attempted, this method is called for each cell in the selection.boolean
canSelectRecord
(ListGridRecord record) IfselectionType
is not set to"none"
, this method will be called for each record the user attempts to select.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.cellHasErrors
(int rowNum, int colIndex) Given a rowNum and a colNum or fieldName, determine whether we currently have stored 
 validation errors for the record/field in question.
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.cellValueHoverHTML
(ListGridRecord record, int rowNum, int colNum, String defaultHTML) Returns the HTML that is displayed by the default cellValueHover handler.cellValueIsClipped
(int rowNum, int colNum) Is the value in a given cell clipped?static void
changeAutoChildDefaults
(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName
.static void
changeAutoChildDefaults
(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName
.Chart the data in this listGrid as a multi-series chart.chartData
(String labelField, String[] dataFields, ListGridRecord... dataRows) chartData
(String labelField, String[] dataFields, ListGridRecord[] dataRows, FacetChart chartProperties) chartData
(String labelField, String[] dataFields, ListGridRecord[] dataRows, FacetChart chartProperties, boolean labelFieldFirst) Chart the data in this listGrid as a multi-series chart.void
This method, the equivalent of the builtinClear Filter menu-item
, clears all user-visible criteria applied to this grid, including values and filter-operators in thefilter-row
and criteria in theadvanced filter window
, and issues a re-filter.void
Clear the current criteria used to filter data.void
clearCriteria
(DSCallback callback) void
clearCriteria
(DSCallback callback, DSRequest requestProperties) Clear the current criteria used to filter data.void
clearEditValue
(int rowNum, String fieldName) 
 Clear a field value being tracked as an unsaved user edit.void
clearFieldError
(int rowNum, int fieldName) Clears any validation errors for some cell.void
clearFieldError
(int rowNum, String fieldName) void
clearFieldSearchOperator
(String fieldName, Boolean suppressFilter) Clears the current search operator from a field in the grid'sfilter row
.void
Clears criteria applied to this grid via theadvanced filter window
and issues a re-filter.void
clearRowErrors
(int rowNum) Clear any stored validation errors for some rowvoid
Clear this grid's auto-savedview state
as described inautoPersistViewState
.void
This method clears any existing sort on this grid by callingsetSort()
with a null parameter.boolean
closeGroup
(Record record) Closes the node represented by the "record" parameter, if it is a folder and is not already closed.void
closeRecord
(ListGridRecord record) Deprecated.void
collapseRecord
(ListGridRecord record) Collapses a givenrecord
which has been previously expanded usingexpandRecord()
.void
collapseRecords
(ListGridRecord... records) Collapses the passed list of expandedrecords
.void
Open a MultiGroupDialog to configure the fields used for grouping.protected JavaScriptObject
create()
protected Canvas
createRecordComponent
(ListGridRecord record, Integer colNum) WhenshowRecordComponents
is true, this method is called to create per-row or per-cell embedded components to display in the grid.void
Notification method fired when thegrid data has changed
.void
dataChangedComplete
(String operationType) Notification method fired when thegrid data has changed
.void

 Deselect all records

void
deselectRange
(int startRow, int endRow) Deselect a contiguous range of records by index.void
deselectRecord
(int record) Deselect aRecord
passed in explicitly, or by index.void
deselectRecord
(Record record) Deselect aRecord
passed in explicitly, or by index.void
deselectRecords
(int[] records) Deselect a list ofRecord
s passed in explicitly, or by index.void
deselectRecords
(Record[] records) Deselect a list ofRecord
s passed in explicitly, or by index.void
disableHilite
(String hiliteID) Disable a hilite

void
Disable all hilites.

void
Cancel outstanding edits, discarding edit values, and hiding editors for the record[s] passed in if appropriate.void
discardAllEdits
(int[] rows) void
discardAllEdits
(int[] rows, boolean dontHideEditor) Cancel outstanding edits, discarding edit values, and hiding editors for the record[s] passed in if appropriate.void
discardEdits
(int rowNum, int colNum) Cancel outstanding edits for the specified rows, discarding edit values, and hiding editors if appropriate.void
discardEdits
(int rowNum, int colNum, Boolean dontHideEditor) Cancel outstanding edits for the specified rows, discarding edit values, and hiding editors if appropriate.protected Boolean
displayHeaderContextMenu
(Canvas target, int[] position) IfshowHeaderContextMenu
istrue
this method is fired when the user right-clicks on the header for this grid.
Default implementation will display a menu with entries derived fromListGrid.getHeaderContextMenuItems
for the appropriate column.void
displaySort
(SortSpecifier... sortSpecifiers) Modify the grid UI to reflect the parameter sortSpecifiers.boolean
drop()
Handle a drop event.void
Start inline editing at a record identified by criteria.void
editExistingRecord
(Criteria criteria) Start inline editing at a record identified by criteria.void
Shows a FieldPicker interface allowing end-users to rearrange the order and visibiility of the fields in the associated DataBoundComponent.void
Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.void
enableHilite
(String hiliteID) Enable / disable ahilites


void
enableHilite
(String hiliteID, boolean enable) Enable / disable ahilites


void
Enable all hilites.

void
enableHiliting
(boolean enable) Enable all hilites.

void
Complete the current edit by storing the value and hiding the inline editor.void
expandRecord
(ListGridRecord record) Expands a givenrecord
by creating a subcomponent and inserting it in to the record's grid-row.void
expandRecords
(ListGridRecord... records) Expands the passed list ofrecords
by creating a subcomponent for each record and inserting them it in to the record's grid-row.void
Exports this component's data with client-side formatters applied, so is suitable for direct display to users, using the specifiedexport format
.void
exportClientData
(DSRequest requestProperties) 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 specifiedexport format
.void
void
exportData
(DSRequest requestProperties) void
exportData
(DSRequest requestProperties, RPCCallback callback) Uses a "fetch" operation on the currentDataSource
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.void
Retrieves data from the DataSource that matches the specified criteria.void
Retrieves data from the DataSource that matches the specified criteria.void
fetchData
(Criteria criteria, DSCallback callback) Retrieves data from the DataSource that matches the specified criteria.void
fetchData
(Criteria criteria, DSCallback callback, DSRequest requestProperties) Retrieves data from the DataSource that matches the specified criteria.void
fetchRelatedData
(Record record, DataSource dataSource) void
fetchRelatedData
(Record record, DataSource dataSource, DSCallback callback, DSRequest requestProperties) 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.void
fetchRelatedData
(ListGridRecord record, Canvas schema, DSCallback callback) 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.void
For databound grids, method will fall through toResultSet.fetchRowCount()
, allowing developers to request an accurate row count from the dataSource whenprogressive loading is active
.void
fetchRowCount
(RowCountCallback callback) void
fetchRowCount
(RowCountCallback callback, DSRequest dsRequest) For databound grids, method will fall through toResultSet.fetchRowCount()
, allowing developers to request an accurate row count from the dataSource whenprogressive loading is active
.boolean
fieldIsEditable
(int field) Can the field be edited? This method looks atcanEdit
for the grid as well as theListGridField.canEdit
value, to determine whether editing is allowed.boolean
fieldIsEditable
(ListGridField field) Can the field be edited? This method looks atcanEdit
for the grid as well as theListGridField.canEdit
value, to determine whether editing is allowed.boolean
fieldIsEditable
(String field) Can the field be edited? This method looks atcanEdit
for the grid as well as theListGridField.canEdit
value, to determine whether editing is allowed.boolean
fieldIsVisible
(String field) Check whether a field is currently visiblevoid
If the filter editor (showFilterEditor
) is visible for this grid, this method will perform a filter based on the current values in the editor.void
Retrieves data that matches the provided criteria and displays the matching data in this component.void
filterData
(Criteria criteria) Retrieves data that matches the provided criteria and displays the matching data in this component.void
filterData
(Criteria criteria, DSCallback callback) Retrieves data that matches the provided criteria and displays the matching data in this component.void
filterData
(Criteria criteria, DSCallback callback, DSRequest requestProperties) Retrieves data that matches the provided criteria and displays the matching data in this component.find
(AdvancedCriteria adCriteria) Filters all objects according to the AdvancedCriteria passed and returns the first matching object or null if not foundRecord[]
findAll
(AdvancedCriteria adCriteria) Filters all objects according to the AdvancedCriteria passedint
findIndex
(AdvancedCriteria adCriteria) Finds the index of the first Record that matches with the AdvacendCriteria passed.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.int
findNextIndex
(int startIndex, AdvancedCriteria adCriteria) LikeRecordList.findIndex(java.util.Map)
, but considering the startIndex parameter.int
findNextIndex
(int startIndex, AdvancedCriteria adCriteria, int endIndex) LikeRecordList.findIndex(java.util.Map)
, but considering the startIndex and endIndex parameters.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.void
If the filter editor (showFilterEditor
) is visible for this grid, this method will explicitly put focus into the specified field in the filter editor.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.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.void
freezeField
(ListGridField field) Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs.void
freezeField
(Integer field) Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs.void
freezeField
(String field) Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs.void
freezeField
(String[] field) Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs.void
freezeFields
(int[] colNums) void
freezeFields
(String[] fieldNames) 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.Text for a menu item allowing users to add a formula fieldoperationId
this component should use when performing add operations.Text for a menu item allowing users to add a formula fieldint
WhenuseAdvancedFieldPicker
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.If we're showing aheaderContextMenu
for this grid, and afilter-editor
is visible andallowFilterWindow
is enabled, this attribute will be shown as the menu item title to configure advanced filtering.Instance ofAIWindow
that allows a user to enter a description of how they would like the AI to filter this grid.The inline hint-text displayed in the user-entry area in theaiFilterWindow
.The descriptive text displayed above the user-entry area in theaiFilterWindow
.The title for theAI-driven filter window
.Instance ofAIWindow
that allows a user to enter a description of how they would like the AI to filter this grid.Optional prefix for the AI-generated hover text displayed when hovering over fields specifying anaiHoverRequest
.Minimum number of milliseconds to wait before retrying to generate hover contents via AI.The message to show when a user asks the AI to sort more than themaximum allowed records
.Dialog that shows progress after requesting AI-sorting of a field.int[]
Returns an array of every rowNum for which we have pending (unsubmitted) edits.Get the complete array of fields for this ListGrid, including fields that are not currently visible or were specified implicitly viadataSource
.For use withshowFilterEditor
:true, allows simple search expressions to be entered into filter fields, as thoughDynamicForm.allowExpressions
were true.Causes a menu item titled"Filter using"
to appear in theheaderContextMenu
that allows the end user to pick an advancedsearch operator
to use for this field.Adds the ability for a user to define additional criteria above and beyond those expressed in thefilter editor
via aFilterBuilder
which appears in a modal Window over the grid and can be accessed by various menus within the grid or triggered by external controls.Should cells in this grid be allowed to span multiple rows? If set totrue
, thegetRowSpan()
method will be called for every cell when rendering out the listGrid to determine how many rows the cell should span.Optional css style to apply to the body ifalternateRecordStyles
is true for this grid.int
The number of consecutive columns to draw in the same style before alternating, whenalternateColumnStyles
is true.boolean
Whether alternating columns (or blocks of columns, depending onGridRenderer.alternateColumnFrequency
) should be drawn in alternating styles, in order to create a vertical "ledger" effect for easier reading.Suffix to append toalternate columns
.int
The number of consecutive rows to draw in the same style before alternating, whenalternateRowStyles
is true.Whether alternating rows (or blocks of rows, depending onGridRenderer.alternateRowFrequency
) should be drawn in alternating styles, in order to create a "ledger" effect for easier reading.Suffix to append toalternate rows
.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 wheneditByCell
is false.WhenallowFilterOperators
is enabled, whether to show theoperatorIcon
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.When animating folder opening / closing, this property can be set to apply an animated acceleration effect.IfanimateFolders
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.If true, when folders are opened / closed children will be animated into view.int
When animating folder opening / closing, this property designates the speed of the animation in pixels shown (or hidden) per second.int
When animating folder opening / closing, ifTreeGrid.animateFolderSpeed
is not set, this property designates the duration of the animation in ms.WhencanRemoveRecords
is enabled, should records be animated out of view when they are removed by the user?int
Whenanimating record removal
, this property designates the speed of the animation in pixels per second.int
When animating record removal(see animateRemoveRecord)
, ifanimateRemoveSpeed
is not set, this property designates the duration of the animation in ms.If therollOverCanvas
is enabled, setting this property totrue
ensures that when therollOverCanvas
is displayed it is animated into view viaCanvas.animateShow()
.If therollUnderCanvas
is enabled, setting this property totrue
ensures that when therollUnderCanvas
is displayed it is animated into view viaCanvas.animateShow()
.If theselectionCanvas
is enabled, setting this property totrue
ensures that when theselectionCanvas
is displayed it is animated into view viaCanvas.animateShow()
.If theselectionUnderCanvas
is enabled, setting this property totrue
ensures that when theselectionUnderCanvas
is displayed it is animated into view viaCanvas.animateShow()
.IfListGridField.userFormula
is set for some field, and this grid is showinggroup summaries
or agrid summary
, this property determines what field value should be present in those summary rows.This property allows developers to explicitly setResultSet.applyRowCountToLength
for this grid's data object.boolean
ARIA role for this ListGrid ifscreen reader mode
is enabled.Dynamically retrieves the aria properties to write out for this listGrid inscreen reader mode
.Retrieves dynamically calculated defaultARIA state mapping
properties for this listGrid.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.What to do when a user hits arrow key while editing a field?
If not explicitly specifiedgetArrowKeyEditAction()
will return an appropriate action depending on the field type.The value to display for cells when an error occurred during asynchronous computation.The prompt to display while interactivity is blocked duringasynchronous grouping
.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.Whether to do inline autoComplete in text fields during inline editing
Overridden byListGridField.autoComplete
if specified.For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded by default.IfDataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be performed viaDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
If true, when this component is first drawn, automatically callDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
depending onDataBoundComponent.getAutoFetchAsFilter()
.If true, for fields whereListGridField.optionDataSource
is specified, a valueMap will be automatically created by making aDataSource.fetchData()
call against the specified dataSource and extracting a valueMap from the returned records based on the displayField and valueField.boolean
Depending on whetherDataSource.progressiveLoading
is active, the exact count of available rows may not be available as part of the standard data fetch response - settingautoFetchRowCount:true
will cause a fetch for an accurate row count to be issued as soon as data arrives (from aprogressive dataSource response
) without an accurate row count.IfautoFetchData
istrue
, this attribute allows the developer to specify a textMatchStyle for the initialDataBoundComponent.fetchData()
call.If we're showing aheaderContextMenu
for this grid, andcanAutoFitFields
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 theautoFitField()
method.String[]
IfautoFitFieldWidths
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.Should this ListGrid automatically expand to accommodate the size of records and fields?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 bydefaultDateFieldWidth
, (ordefaultEditableDateFieldWidth
for editable fields).The field to expand ifautoFitFieldWidths
andautoFitFieldsFillViewport
are enabled and auto-fitting will not fill all available horizontal space.IfautoFitData
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.IfautoFitFieldWidths
is enabled, and extra space is available after autofitting all fields, should the grid automatically expand one field to fill the extra space.If we're showing aheaderContextMenu
for this grid, and user-driven auto fit of fields is enabled viaListGridField.canAutoFitWidth
orcanAutoFitFields
, 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 toautoFitField()
.Should ListGrid fields autofit their widths to titles or content? This property may be overridden on a per-field basis viaListGridField.autoFitWidth
.If this property is set to true, header buttons for eitherfields
orheader spans
will automatically expand to accommodate their titles vertically.Smart GWT listGrids have special logic to automatically size fields that are displayed as an icon - that is fields withtype:"icon"
, fields displaying onlyvalue icons
, and boolean fields (which are rendered as a checkmark type icon by default.int
IfautoFitData
is set to"horizontal"
or"both"
this property provides the maximum number of columns for which the ListGrid will expand.IfautoFitData
is set to"vertical"
or"both"
this property provides an upper limit on how far the ListGrid will expand vertically to accommodate its content.int
IfautoFitData
is set to"vertical"
or"both"
this property provides the maximum number of records for which the ListGrid will expand.IfautoFitData
is set to"horizontal"
or"both"
this property provides an upper limit on how far the ListGrid will expand horizontally to accommodate its content.IfautoFitData
is set to"horizontal"
or"both"
this property provides an upper limit on how far the ListGrid will expand horizontally to accommodate its content.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 bydefaultTimeFieldWidth
.When a user requests column autofitting via theheader context menu
or via amouse gesture
, what autofit approach is used.Setting this property to a non-null value will enable automatic saving ofview state
to offline storage.If this ListGrid is editable, should edits be saved out when the user finishes editing a row (or a cell ifsaveByCell
is true).If this listGrid has specifiedheaderSpans
, setting this attribute to true will cause spans to expand to accommodate long titles if necessary.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.If the result of a formula evaluation is invalid (specifically, if isNaN(result)==true), badFormulaResultValue is displayed instead.base cell style
for this listGrid.protected String
getBaseStyle
(ListGridRecord record, int rowNum, int colNum) Return the base styleName for this cell.If specified, this attribute will be applied to this grid'sdata object
for dataBound grids.getBody()
Returns the primary body, which, when there are frozen fields, is thecom.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.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.Overflow setting for the "body", that is, the area of the grid where data values are rendered.Get the current scrollLeft for the body of this ListGridGet the current scrollTop for the body of this ListGridCSS style used for the body of this grid.An optional CSS style to apply to the checkbox image.Image to display for a false value in a boolean field.int
int
Image to display for a partially true value in a boolean field (typically selection).Image to display for a true value in a boolean field.Dynamic String specifying the format for therow range summary value
whenRowRangeDisplayStyle
is set to"brief"
.Indicates whether records can be dropped into this listGrid.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.Adds an item to the header context menu allowing users to launch a dialog to define a new
 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.
Adds an item to the header context menu allowing users to launch a dialog to define a new
 text field that can contain both user-defined text and the formatted values present in other 
 fields, using the {@link com.smartgwt.client..SummaryBuilder}.
Can the user perform one-time autofit for specific columns in this grid?If this is an editable listGrid, andthis.confirmCancelEditing
is true this property is used as the message to display in the confirmation dismissal prompt.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 (seecollapseGroupOnRowClick
); When false the group icon is not shown and clicking on the row does not change group state.Indicates whether records can be dragged from this listGrid and dropped elsewhere.If this property is true, users can drag the mouse to select several rows or cells.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 withrearranging rows or cells by dragging
, and withdrag selection of rows
.If set to false, dropping over an empty part of the grid body is disallowed and the no-drop indicator is displayed.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 ofcanEditCell()
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.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.boolean
Adds an item to the header context menu allowing users to launch a dialog to define grid hilites using theHiliteEditor
.boolean
If set to true, theadvanced field picker
provides an interface allowing users to modify fields' titles.WhencanExpandRecords
is true, this property indicates whether multiple records can be expanded simultaneously.Property name on a record that will be checked to determine whether a record can be expanded.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.boolean
If the listGrid is empty, should the user be able to put focus into the grid body by tabbing to it?Whether an interface should be shown to allow user is allowed to dynamically "freeze" or "unfreeze" columns with respect to horizontally scrolling.If false, grouping via context menu will be disabled.When set totrue
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.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 hasshowHover
set to false.boolean
When true, indicates that this ListGrid supports grouping on multiple fields.When true, indicates that this ListGrid supports sorting on multiple fields.Indicates whether the field picker item and submenu should be present in the header context menu.If true, thefield picker menu
will include entries for all dataSource fields, including those not included in the specifiedfields array
.If set, provide UI for the user to remove records from the grid as an additional field showing theremoveIcon
, which, when clicked, will callremoveRecordClick()
which removes the row from the data set (or ifdeferRemoval
is true changes themarkRecordRemoved()
status for the record).Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields.Indicates whether records can be reordered by dragging within thisListGrid
.boolean
Depending on whetherDataSource.progressiveLoading
is active, the exact count of available rows may not be known, andcanRequestRowCount
controls whether the end user may explicitly request it by clicking theRowRangeDisplay
label.Indicates whether fields in this listGrid can be resized by dragging header fields.boolean
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.Controls whether a checkbox for selecting all records appears in the header withselectionAppearance
set to "checkbox"Enables cell-level selection behavior as well ascell-level rollover
.boolean
Controls whether a checkbox for selectinggroups
appears in the group node ifSelectionAppearance
is set to"checkbox"
boolean
Whether to allow selection of the summary row, for example by clicking on the record.boolean
Should a menu item allowing the user to show or hide thefilter editor
be displayed in theheaderContextmenu
?Enables or disables interactive sorting behavior for this listGrid.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 ifSC.setScreenReaderMode()
is called.Should thecorner sort button
be included in the tab-order for the page?getCellAriaState
(Integer rowNum, Integer colNum, ListGridRecord record, String role) Returns a map ofWAI ARIA state attribute values
to be written into cells within this grid.The menu displayed when a cell is right clicked on.MenuItem[]
getCellContextMenuItems
(Integer record, Integer rowNum, Integer colNum) IfshowCellContextMenus
istrue
this method returns the menu items to be displayed in the default cell context menu.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.String[]
getCellErrors
(int rowNum, String fieldName) Returns the current set of errors for this cell.int
Default height for each row in pixels.protected Canvas
getCellHoverComponent
(Record record, Integer rowNum, Integer colNum) WhenshowHoverComponents
is set, this method is called to get the component to show as a hover for the current cell.int
The amount of empty space, in pixels, surrounding each value in its cell.Integer[]
getCellPageRect
(int rowNum, int colNum) Returns the page offsets and size of the cell at the passed row and column.Returns the default WAI ARIA role for cells within this listGrid.int
getCellRowSpan
(int rowNum, int colNum) When usingrow spanning
, returns the number of cells spanned by the cell at the given coordinates.WhencanSelectCells
is active, returns theCellSelection
object that tracks and manages the current selection.int
getCellStartRow
(int rowNum, int colNum) When usingrow spanning
, returns the row number where a row-spanning cell starts.protected String
getCellStyle
(ListGridRecord record, int rowNum, int colNum) Return the CSS class for a cell.Name of the Smart GWT Class to be used when creating charts.Default type of chart to plot.IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for an unselected row.IfselectionAppearance
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.IfselectionAppearance
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.IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for a partially selected row.IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for a selected row.ForexpansionModes
that show another grid or tree, what the child's expansionMode should be.If we're showing aheaderContextMenu
for this grid, this attribute will be shown as the menu item title to clear any existing sort on all fields.boolean
When set to false, this attribute prevents user-criteria in thefilterEditor
from being cleared when the user hides it.If we're showing aheaderContextMenu
for this grid, and afilter-editor
is visible, this attribute will be shown as the menu item title to clear any existing filter.Title for the menu-item displayed in this component's header context-menu whenAI-assisted filtering
is allowed and an AI filter in already in effect.If we're showing aheaderContextMenu
for this grid, this attribute will be shown as the menu item title to clear an existing sort on this field.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 onhover
.boolean
IfcanCollapseGroup
is true, will a click anywhere on the group row toggle the group's expanded state? If false, the user must click thegroupIcon
directly to toggle the group.getColumnLeft
(Integer colNum) Return the left offset (in local coordinate space) of a particular column.getColumnPageLeft
(Integer colNum) Return the left coordinate for a given column number as a GLOBAL coordinategetColumnWidth
(int colNum) Return the width of a particular column.If we're showing aheaderContextMenu
for this grid, and multi-grouping is enabled, this attribute is used as the title for a menu item that opens aMultiGroupDialog
to configure the grouping for this grid.If we're showing aheaderContextMenu
for this grid, and multi-sorting is enabled, this attribute is used as the title for a menu item that opens aMultiSortDialog
to configure the sort-specification for this grid.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?For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded.Ifthis.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.Retrieves a copy of the current criteria for this component (may be null).The color of thefilterWindow criteria indicator
.The color of thefilterWindow criteria indicator
when shown on thesorter button
or the lastheader button
in the grid header.Returns the expansion component derived fromgetExpansionComponent()
currently visible in some record, or null if the specified record is not showing an expansion component.getCurrentExpansionComponent
(Integer record) Returns the expansion component derived fromgetExpansionComponent()
currently visible in some record, or null if the specified record is not showing an expansion component.Integer[]
Returns an array of widths of the visible fields in thisListGrid
, in px.A ListGrid is adataArity
:multiple component.Return the grid data as aRecordList
.Delay in milliseconds before fetching data.How to fetch and manage records retrieve from the server.int
When usingdata paging
, how many records to fetch at a time.The DataSource that this component should bind to for default fields and for performingDataSource requests
.How should Date type values be displayed in this ListGrid by default?Display format to use for fields specified as type 'datetime'.Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values.Default width for date type fields.Default width for datetime type fields.Default width for editable date type fields.Default width for editable datetime type fields.An array of listGrid field configuration objects.Defaultfilter operator
to use for text-based fields in this grid'sfilter editor
, when producingAdvancedCriteria
.Text to show after the name of the default filterOperator in theheaderContextMenu
whenallowFilterOperators
is enabled.getDefaultFormattedFieldValue
(Record record, ListGridField field) Get a field value for some record with default field formatters applied.getDefaultFormattedFieldValue
(Record record, ListGridField field, int rowNum) getDefaultFormattedFieldValue
(Record record, ListGridField field, int rowNum, int colNum) Get a field value for some record with default field formatters applied.getDefaultFormattedValue
(Record record, int rowNum, int colNum) Get the value for some cell with default formatters applied.Default width for time type fields.When enabled, the field shown bycanRemoveRecords
causes records to be marked for future removal viamarkRecordRemoved()
instead of immediately being removed.Should partially selected checkbox be deselected or selected on click? This setting affectsheader selection checkbox
,group\n checkboxes
and folder checkbox selection in a Tree data set.IfcanExpandRecords
is true andlistGrid.expansionMode
is"related"
, this property specifies the dataSource for the related records grid to be shown embedded in expanded records.The field whose contents to show in the expanded portion of a record whencanExpandRecords
istrue
andlistGrid.expansionMode
isdetailField
.Prompt to indicate that grouping is disabled as the data set size exceedsgroupByMaxRecords
.boolean
If a user is editing acanEdit: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?IfconfirmDiscardEdits
is true this is the title for the save button appearing in the lost edits confirmation dialog.getDisplayValue
(String fieldName, boolean value) Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.getDisplayValue
(String fieldName, float value) Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.getDisplayValue
(String fieldName, int value) Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.getDisplayValue
(String fieldName, String value) Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.getDisplayValue
(String fieldName, Date value) Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.Record[]
During a drag-and-drop interaction, this method returns the set of records being dragged out of the component.Indicates what to do with data dragged into another DataBoundComponent.An automatically generated field that can be dragged to drag the current selection (where otherwise the grid itself might be scrolled).The title to use for thedrag handle field
.Default icon to show in thedrag handle field
..int
Default width and height ofdrag handle icons
for this ListGrid.int
LikescrollRedrawDelay
, but applies when the component is being drag-scrolled (via a scrollbar).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.CSS Style to apply to the drag tracker when dragging occurs on this component.float
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.int
If drawing all rows would cause less thandrawAllMaxCells
cells to be rendered, the full dataset will instead be drawn even ifshowAllRecords
is false and the viewport size anddrawAheadRatio
setting would normally have caused incremental rendering to be used.Integer[]
Returns the extents of the rows and columns currently visible in this grid's viewport.int
getDrawnRowHeight
(int rowNum) Get the drawn height of a row.Integer[]
Get the rows that are currently drawn (exist in the DOM), as an array of [firstRowNum, lastRowNum].When an item is dropped on this component, andaddDropValues
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.Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled.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.int
Returns the index of the column being edited or -1 if there is no current edit column.getEditedCell
(int record, int field) Returns the current value of a cell.getEditedCell
(int rowNum, String fieldName) getEditedCell
(Record record, int colNum) getEditedCell
(Record record, String fieldName) getEditedRecord
(int rowNum) Returns the combination of unsaved edits (if any) and original values (if any) for a given row being edited.Event that will trigger inline editing, seeListGridEditEvent
for options.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 fromthis.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, usethis.editFailedBaseStyle
instead.getEditFormItem
(Integer field) Method to retrieve a live edit form item for aneditable
ListGrid.getEditFormItem
(String field) Method to retrieve a live edit form item for aneditable
ListGrid.Text for a menu item allowing users to edit a formula fieldShould we start editing when the widget has focus and the user presses the "f2" key (if this ListGrid supports editing)?Should we start editing when this widget receives focus (if this ListGrid supports editing)?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.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 usethis.editPendingBaseStyle
instead.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 byeditPendingCSSText
oreditPendingBaseStyle
.Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.int
Returns the index of the row being edited or -1 if there is no current edit row.IfselectOnEdit
is true, what should be the edit-selection behavior be?Text for a menu item allowing users to edit the formatter for a fieldgetEditValue
(int rowNum, int colNum) Returns the current temporary locally stored edit value for some field within a record being edited.getEditValue
(int rowNum, String fieldName) Returns the current temporary locally stored edit value for some field within a record being edited.getEditValueAsBoolean
(int rowNum, String fieldName) Returns the current temporary locally stored edit value for some field within a record being edited.getEditValueAsDate
(int rowNum, String fieldName) Returns the current temporary locally stored edit value for some field within a record being edited.getEditValueAsFloat
(int rowNum, String fieldName) Returns the current temporary locally stored edit value for some field within a record being edited.getEditValueAsInt
(int rowNum, String fieldName) Returns the current temporary locally stored edit value for some field within a record being edited.getEditValueAsRecord
(int rowNum, String fieldName) Returns the current temporary locally stored edit value for some field within a record being edited.Record[]
getEditValueAsRecordArray
(int rowNum, String fieldName) Returns the current temporary locally stored edit value for some field within a record being edited.getEditValueAsString
(int rowNum, String fieldName) Returns the current temporary locally stored edit value for some field within a record being edited.getEditValues
(int rowNum) Returns the current set of unsaved edits for a given row being edited.getEditValues
(Record record) Returns the current set of unsaved edits for a given row being edited.This is the pixel-amount by which child components are offset within the grid-body, by default from the left, or from the right whenRTL
is in effect.This is the space to apply as margin around child-components embedded in this grid.Hover contents to use when the AI-generated hover text is empty.The value to display for cells whose value is null or the empty string after applyingformatting
and valueMap (if any).The string to display in the body of a listGrid with an empty data array, if showEmptyMessage is true.The CSS style name applied to theemptyMessage
if displayed.Row range summary display value
when the grid is empty.For performance reasons, even whenfixedRecordHeights
is set, vertical clipping is not enforced by default for some kinds of content (such as images) on all browsers.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.In a ListGrid that has a DataSource and has filter criteria that include values for fields declared astype "enum"
in the DataSource, by default a newly edited row will use those filter criteria as initial values.Height of the error icon, if we're showing icons when validation errors occur.Src of the image to show as an error icon, if we're showing icons when validation errors occur.Height of the error icon, if we're showing icons when validation errors occur.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).int
Returns the column number of the provided X-coordinate, or the most recent mouse event if an X-coordinate is not provided.int
Returns the column number of the provided X-coordinate, or the most recent mouse event if an X-coordinate is not provided.int
Returns the row number of the provided Y-coordinate, or the most recent mouse event if a Y-coordinate is not provided.int
Returns the row number of the provided Y-coordinate, or the most recent mouse event if a Y-coordinate is not provided.ForexpansionModes
that show another grid or tree, is that component editable?protected Canvas
getExpansionComponent
(ListGridRecord record) WhencanExpandRecords
is true, gets the embedded-component to show as a given record's expansionComponent.The method ofcomponent-pooling
to employ forexpansionComponents
.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.WhenExpansionMode
is editor, should the row be collapsed following a save initiated by the expansion-component'ssave button
.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.The title for theexpansionEditorSaveButton
.WhencanExpandRecords
is true andexpansionMode
is editor, the prompt to display in a dialog when an expanded row is collapsed while it's nested editor has changed values.WhencanExpandRecords
is true andexpansionMode
is editor, whether a dialog should be displayed when an expanded row is collapsed while it's nested editor has changed values.The field providing the facility to expand and collapse rows.IfcanExpandRecords
is set totrue
, this property determines the image to display in the expansion field for collapsed rows.IfcanExpandRecords
is set totrue
, this property may be set to govern the height of the expansion image displayed to indicate whether a row is expanded.boolean
If this grid is in RTL mode, should an "_rtl" suffix be added to theexpansionFieldTrueImage
andexpansionFieldFalseImage
image URLs? This should only be enabled if RTL media for the true and false expansion field images are available.boolean
Should a "_selected" suffix be added to theexpansionFieldTrueImage
andexpansionFieldFalseImage
image URLs for selected rows?Custom style to apply to the image in theexpansionField
displayed in collapsible rows whencanExpandRecords
is true.IfcanExpandRecords
is set totrue
, this property may be set to govern the width of the expansion image displayed to indicate whether a row is expanded.IfcanExpandRecords
is set totrue
, this property determines the image to display in the expansion field for expanded rows.WhencanExpandRecords
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 whenRTL
is in effect.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.TheExpansionMode
for records in this grid.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.Screen to create (viacreateScreen()
) in lieu of callinggetExpansionComponent()
.int
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.Setting exportAll to true prevents the component from passing its list of fields to the 
 export call.When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, background color to use for even-numbered rows, to create a "banded" or "ledger" effect.getExportBGColor
(int rowNum, int colNum, Record record) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, background color to use for the cell at the given rowNum and colNum.getExportColumnBGColor
(int colNum) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, background color to use for the given colNum.Default background color to use when exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
.boolean
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, whether fieldhorizontal header alignments
anddata value alignments
should be replicated in the resulting spreadsheet.String[]
The list of field-names to export.boolean
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, whether widths of fields should be replicated in the resulting spreadsheet.boolean
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, causes theheaderHeight
andheaderSpan heights
to be applied to the corresponding cells in the spreadsheet.int
Width to size non-visible fields (which may be specified withexportFields
orDSRequest.exportFields
) duringexportData()
orexportClientData()
, if they have no defined numericwidth
.If Summary rows exist for this component, whether to include them when exporting client data.Dictates whether numeric values should be exported as raw numbers instead of formatted values when usingexportClientData()
.Dictates whether the data in this grid should be exported raw byexportClientData()
.getExportRowBGColor
(int rowNum, Record record) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, background color to use for the given rowNum.getExportTextColor
(int rowNum, int colNum, Record record) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, text color to use for the cell at the given rowNum and colNum.double
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.boolean
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, whether titles in theListGrid header
andheaderSpans
should be allowed to wrap.int
If we're showing the filterEditor (showFilterEditor
is true), andfilterByCell
orfilterOnKeypress
are enabled, this property is the delay in milliseconds between the user changing the filter and the filter request being sent to the server.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.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.Operation ID this component should use when performing fetch operations.IfautoFetchData
istrue
, this attribute allows the developer to declaratively specifyDSRequest
properties for the initialfetchData()
call.getField
(int colNum) Given a column number or field name, return the field definition of a field which is visible in the grid.Given a column number or field name, return the field definition of a field which is visible in the grid.Returna an array of field alignments for this gridgetFieldByName
(String fieldName) Given a field name, return the appropriate field definition.Returns the pixel width of the content of a visible field in this grid.int
Return the number of fields.The field criteria prefix to show in filter editor field hover before the descriptive version of the field's criteria, if any.getFieldName
(int colNum) Given a column number or field id, return the field name of a field.int
getFieldNum
(int fieldID) Given a field or field id, return it's index in the fields arrayint
getFieldNum
(String fieldID) Given a field or field id, return it's index in the fields arrayString[]
Names of properties onListGridField
for which theFieldPicker
should show an editing interface, for convenience.When set to false, sample values of the FieldPicker are never shown.Instance ofFieldPickerWindow
used ifuseAdvancedFieldPicker
is set.An array of field objects, specifying the order, layout, formatting, and sorting behavior of each field in the listGrid object.Return the fields as JavaScriptObjects rather than as SmartGWT Java wrappers of the field class type (e.g.void
getFieldSearchOperator
(String fieldName) Returns the current search-operator applied to criteria for a given field in this grid'sfilter row
.Initialfield state
for the grid.getFieldTitle
(int fieldId) Return the title of a field, specified by name or index.getFieldTitle
(String fieldId) Return the title of a field, specified by name or index.If we're showing aheaderContextMenu
for this grid, andthis.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.getFieldWidth
(int fieldNum) Returns a numeric value for the width of some field within thisListGrid
.getFieldWidth
(String fieldName) Returns a numeric value for the width of some field within thisListGrid
.The prompt to show when the mouse hovers over the Filter button in the FilterEditor.IfshowFilterEditor
is true, this attribute may be used to customize the filter button shown to the right of the filterEditor row.boolean
If we're showing thefilterEditor
, 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.IfshowFilterEditor
is set to true, thefilterEditor
is automatically created as an AutoChild.IfshowFilterEditor
is true, this method will return the criteria currently displayed in thefilterEditor
.getFilterEditorCriteria
(Boolean omitHiddenFields) IfshowFilterEditor
is true, this method will return the criteria currently displayed in thefilterEditor
.Same asgetFilterEditorCriteria()
but returns anAdvancedCriteria
.getFilterEditorCriterion
(String fieldName) Extracts and returns the criteria for the passed field from thefilterEditor
.int
Height for the filterEditor, if shown.Properties to apply to the automatically generatedfilterEditor
ifshowFilterEditor
is true.Causes filtering to be performed against the local data set, even when adataSource
is provided.boolean
When this attribute is true and this component has been assigned asearchForm
or is showing thefilterEditor
, data will be filtered automatically as users change values in those components.Text for the menu item shown in theheaderContextMenu
whenallowFilterOperators
is enabled.If filtering of the grid is enabled, filtering-via-AI can also be enabled by setting theAIServiceMode
to use.The instruction text to display above the "Filter via AI" text box.Title for the menu-item displayed in this component's header context-menu whenAI-assisted filtering
is allowed.Advanced filtering criteria, eithersimple
oradvanced
, that is combined with thefilter editor criteria
during filtering.Instance ofCanvas
used to show visual indicator thatfilterWindowCriteria
is configured.The instruction text to display at the top of thefilterWindow
.The title for theadvanced filtering window
.The style to apply to the first cell in each row, whenstyledRowEnds
is true.Should we horizontally clip cell contents, or allow columns to expand horizontally to show all contents?Should we vertically clip cell contents, or allow rows to expand vertically to show all contents?Get the row that currently has keyboard focus.Returns thecurrent total row count
for this grid as a formatted string.Uses therowRangeFormat
to return a formatted display value showing the currently visible set of rows in the listGrid viewport.If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInFormulaBuilder
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.getFormulaFieldValue
(ListGridField field, Record record) Get the computed value of acanAddFormulaFields
.If we're showing aheaderContextMenu
for this grid andthis.canFreezeFields
is true, this string will be shown as the title for the menu item to freeze a currently unfrozen field.If this listGrid contains any frozen fields, this property can be used to apply a custom baseStyle to all cells in those frozen fields.Maximum width available for anyfrozen fields
shown in this grid.Maximum width available for anyfrozen fields
shown in this grid.If this listGrid contains any frozen fields, this property can be used to apply a custom headerBaseStyle to the frozen set of fields.If this listGrid contains any frozen fields, this property can be used to apply a custom headerTitleStyle to the frozen set of fields.protected Canvas
getFrozenRollOverCanvas
(Integer rowNum, Integer colNum) For grids with frozen columns, this method is called to retrieve thefrozenRollOverCanvas
when the user moves over a new row or cell ifshowRollOverCanvas
is true, or when the user moves over the selected record ifshowSelectedRollOverCanvas
is true.protected Canvas
getFrozenRollUnderCanvas
(Integer rowNum, Integer colNum) For grids with frozen columns, this method is called to retrieve thefrozenRollUnderCanvas
whenshowing a rollUnder canvas
or showing arollUnder canvas for the selected record
.Dynamic String specifying the format for therow range summary value
whenRowRangeDisplayStyle
is set to"full"
.If true, when the user navigates to a cell using arrow keys and hits Enter, the cell will respond to a click event.If true, when the user navigates to a cell using arrow keys and hits space, the cell will respond to a click event.If true, when the user navigates to a cell using arrow keys and hits Enter, the cell will respond to a double click event.If true, when the user navigates to a cell using arrow keys and hits Space, the cell will respond to a double click event.The additional criteria prefix to show in filter editor field hover, the filter action button or the sorter button before the descriptive version of thefilterWindowCriteria
, if any.Array of components that make up this grid.Synonym ofgetBody()
.getGridSummary
(ListGridField field) WhenshowGridSummary
istrue
this method is called for each field which will show a grid summary value (as described inListGridField.showGridSummary
) to get the summary value to display below the relevant column.This method returns the data displayed in thesummaryRow
whenshowGridSummary
is true.IfshowGridSummary
is true, this attribute will be set to true on the record object representing the grid summary row.int
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.String[]
Get the current grouping of this listGrid as an array of fieldNames.String[]
If this grid isgrouped
, andshowGroupSummary
is true, this attribute may be set to an array of groupBy field names for which group summaries should appear.int
Maximum number of records to which a groupBy can be applied.Warning shown to the user when a grouping attempt failed as the data set length exceedsgroupByMaxRecords
.If we're showing aheaderContextMenu
for this grid andthis.canGroupBy
is true, this string will be shown as the title for the menu item to toggle the group by setting for a field.int
getGroupedRecordIndex
(ListGridRecord record) Returns the true row index for a grouped record excluding group and summary records.The URL of the base icon for the group icons in this listGrid.int
Default width and height of group icons for this ListGrid.Custom style to apply to thegroupIcon
displayed in collapsible rows whencanGroupBy
is true.int
Default number of pixels by which to indent subgroups relative to parent group.int
Default number of pixels by which to indent all groups.getGroupMembers
(GroupNode node, boolean recordsOnly) For agrouped
grid, returns all the direct children of the supplied node in thegroupTree
ifrecordsOnly
false.Base style
forgroup
rows.The CSS style thatgroup
rows will have.WhensortByGroupFirst
is active, the sorting direction applied for implicit sorting by the field(s) used for grouping.Initial group state for the grid.getGroupSummaryData
(Record[] records, Record groupNode) If this grid isgrouped
, andshowGroupSummary
is true, this method will return the group summary data displayed at the end of the group.getGroupSummaryData
(Record[] records, Record groupNode, Boolean recalculate) If this grid isgrouped
, andshowGroupSummary
is true, this method will return the group summary data displayed at the end of the group.getGroupSummaryData
(Record[] records, GroupNode groupNode) If this grid isgrouped
, andshowGroupSummary
is true, this method will return the group summary data displayed at the end of the group.getGroupSummaryData
(Record[] records, GroupNode groupNode, Boolean recalculate) If this grid isgrouped
, andshowGroupSummary
is true, this method will return the group summary data displayed at the end of the group.IfshowGroupSummary
is true, this attribute will be set to true on each record object representing a group-level summary row.ListGridRecord.customStyle
for the group-level summary row displayed whenshowGroupSummary
is true.Custom properties for the automatically generatedgroupTitleColumn
.When a list grid isgrouped
, each group shows under an auto generated header node.The data tree that results from a call togroupBy()
.If this gridis grouped
, this method will return the current selection.getGroupTreeSelection
(boolean excludePartialSelection) getGroupTreeSelection
(boolean excludePartialSelection, boolean groupNodesOnly) If this gridis grouped
, this method will return the current selection.A Toolbar used to manager the headers shown for each column of the grid.Event on a ListGrid header that triggers auto fitting to data and/or title.BackgroundColor for the header toolbar.Set the CSS style used for the header as a whole.Button.baseStyle
to apply to the buttons in the header, and the sorter, for this ListGrid.Defaultrole
forheader buttons
.DefaultARIA state
forheader buttons
.Properties to apply to all header buttons.The context menu displayed for column headers.protected MenuItem[]
getHeaderContextMenuItems
(Integer fieldNum) IfshowHeaderContextMenu
istrue
this method returns the menu items to be displayed in the default header context menu.int
The height of this listGrid's header, in pixels.This property may be set to customize the alignment for the hover shown onListGrid.headerHover()
.Optional default height for the hover shown onListGrid.headerHover()
.This property may be set to customize the opacity for the hover shown onListGrid.headerHover()
.This property may be set to customize the css style for the hover shown onListGrid.headerHover()
.This property may be set to customize the vertical alignment for the hover shown onListGrid.headerHover()
.Optional default width for the hover shown onListGrid.headerHover()
.This property may be set to customize thewrap
attribute for the hover shown onListGrid.headerHover()
.IfshowHeaderMenuButton
is true, when the user rolls over the header buttons in this grid the headerMenuButton will be shown over the header button in question.int
IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
IfshowHeaderMenuButton
is true, this property governs the icon shown on the auto-generatedheaderMenuButton
int
IfshowHeaderMenuButton
is true, this property governs the height of the icon shown on the auto-generatedheaderMenuButton
int
IfshowHeaderMenuButton
is true, this property governs the width of the icon shown on the auto-generatedheaderMenuButton
Offset of the right edge of aheaderMenuButton
from the right edge of it's parent button.int
IfshowHeaderMenuButton
is true, this property governs the width of the auto-generatedheaderMenuButton
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 theheader
, and to the right of thecorner sort-button
if it's visible, or the right of theheader
otherwise.IfshowHeaderShadow
is true, theCanvas.shadowColor
for the header shadow.int
IfshowHeaderShadow
is true, theCanvas.shadowHOffset
for the header shadowint
IfshowHeaderShadow
is true, theCanvas.shadowSoftness
for the header shadowint
IfshowHeaderShadow
is true, theCanvas.shadowVOffset
for the header shadowNote : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.MenuItem[]
getHeaderSpanContextMenuItems
(HeaderSpan headerSpan) Return the menus items that should be shown in a menu triggered from aheaderSpan
.Default height for aheaderSpan
with no height specified.StretchImgButton.titleStyle
to apply to the buttons in the header, and the sorter, for this ListGrid.Specifies vertical alignment in the column headers: "top", "center", or "bottom".If true, causes thesummaryRow
component to be hidden if it has no data after summaries have been recalculatedWhencanShowFilterEditor
is true, this is the title for the filterEditor show/hide menu-item, in theheaderContextmenu
, when the filterEditor is visible.If set, end users can create advanced hiliting rules that will use theHilite.replacementValue
feature to cause values in hilited cells to be replaced with a user-entered value.If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInHiliteEditor
is true, this string will be inserted between the headerSpan title and the field title in the hiliteEditor field chooser grid.boolean
If set to true, custom HTML applied as part of hiliting will be applied afterformatting
for each cell.Height for hilite icons for this listGrid.int
How much padding should there be on the left ofhilite icons
by default? Can be overridden at the field levelWhenhiliteIcons
are present, where the hilite icon will be placed relative to the field value.int
How much padding should there be on the right ofhilite icons
by default? Can be overridden at the field levelString[]
Specifies a list of icons that can be used inhilites
.int
Default width and height ofhilite icons
for this component.Width for hilite icons for this component.Marker that can be set on a record to flag that record as hilited.Title used for the text box shown whenhiliteCanReplaceValue
is set.When the grid body gets keyboard focus, should we highlight the current focus row, using the rollover cell style?Hilite[]
Return the set of hilite-objects currently applied to this DataBoundComponent.Get the current hilites encoded as a String, for saving.WhencanHiliteViaAI
istrue
, the AI service mode to use.Title for the menu item displayed in this component's header context menu whenAI-assisted hiliting
is allowed.WhenshowHoverComponents
is true, the builtin mode to use when automatically creating a hover component for rows in this grid.Screen to create (viacreateScreen()
) in lieu of callinggetHoverComponent()
orgetCellHoverComponent()
.Style to apply to hovers shown over this grid.Default cursor to display when the user rolls over icons within cells of antype:icon
field.When usingautoFitFieldWidths
, padding in pixels left on each side of fields that show images.int
Default size of thumbnails shown for fieldTypes image and imageFile.Criteria that are never shown to or edited by the user and are cumulative with any criteria provided viaDataBoundComponent.initialCriteria
,DataBoundComponent.setCriteria()
etc.boolean
When assembling a value for asummary field
, if a referenced field is hilited, should the hilite HTML be included in the summary field value?Property name on a record that will be checked to determine whether a record should be included when calculating totals for thegrid summary
.Criteria to use whenDataBoundComponent.setAutoFetchData(Boolean)
is used.An array ofSortSpecifier
objects used to set up the initial sort configuration for this grid.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.Value to display to the user if showing summary values (throughshowGridSummary
,showGroupSummary
orlistGridFieldType:"summary"
), and the summary function returns"null"
(implying it was unable to calculate a valid summary value).boolean
True if this listGrid is grouped, false otherwiseIfrecord[this.isSeparatorProperty]
is set for some record, the record will be displayed as a simple separator row.The style to apply to the last cell in each row, whenstyledRowEnds
is true.Whether to leave a gap for the vertical scrollbar, even when it's not present.Property name on a record that will hold the link text for that record.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.The string to display in the body of a listGrid while data is being loaded.The CSS style name applied to the loadingDataMessage string if displayed.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.int
Height for theloadingRowCountDisplayIcon
The URL of the icon to display as arow count value
when the row count is loading.int
Width for theloadingRowCountDisplayIcon
WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.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.WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.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.Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.int
When the length of the field specified byDataSourceField.length
exceeds this value, the ListGrid shows an edit field of typelongTextEditorType
rather than the standard text field when the field enters inline edit mode.When the length of the field specified byDataSourceField.length
exceedsthis.longTextEditorThreshold
show an edit field of this type rather than the standard text field when the field enters inline edit mode.WhencanExpandRecords
andcanExpandMultipleRecords
are both true, this property dictates the number of records which can be expanded simultaneously.This is a dynamic string - text within${...}
will be evaluated as JS code when the message is displayed.IfshowGridSummary
is true, and summary records are being derived from a fetch against thesummaryRowDataSource
, this property may be set to specify the maximum expected number of results from the fetch opeeration.int
Minimum size, in pixels, for ListGrid headers.int
Sets theminimum height
for the entire list (smaller than this doesn't tend to work very well).int
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.If a summary format string contains an invalid field reference, replace the reference with the missingSummaryFieldValue.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.Class-level defaults to apply to theMultiGroupDialog
which gets automatically generated whenconfigureGrouping()
is called.Properties to apply to theMultiGroupDialog
which gets automatically generated whenconfigureGrouping()
is called.IfcanSelectCells
is true, this property allows the user to navigate through the cells of a grid using Tab and Shift+Tab keypresses.If true, validation will not occur as a result of cell editing for this grid.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.Text to show for saving the current view as a new "saved search"."Normal" baseStyle for this listGrid.int
IfbaseStyle
is unset, base style will be derived fromnormalBaseStyle
if this grid has fixed row heights and the specifiedcellHeight
matches this value.Text to show in menu listing saved searches when there are no saved searches.Default alias to use for groups with no valueThe CSS style name applied to theofflineMessage
if displayed.Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.static ListGrid
getOrCreateRef
(JavaScriptObject jsObj) Return the underlying, ungrouped data of this DataBoundComponent as aRecordList
.Return the underlying, ungrouped data of this ListGrid as aResultSet
.Name of a CSS Style to use as thebaseStyle
for a cell that is currently a selection origin for shifted incremental cell selection.The value to display for cells whose value is pending asynchronous computation.Message to show in the hover while AI-generated hover text is being retrieved for fields specifying anaiHoverRequest
.Should recycledrecord components
, be pooled per column or per record.IfshowRollOver
orhiliteRowOnFocus
is true the current keyboard focus row for navigation via arrow keys, etc, will be hilighted with"Over"
styling.Should cells be written out with css that will preserve whitespace?If set, detect and prevent duplicate records from being transferred to this component, either via
 drag and drop or viaDataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
.Whether cell contents should wrap during printing.Style for non-header cells in printed output.If set, thebooleanBaseStyle
to use whenprinting
.If set, thebooleanFalseImage
to use whenprinting
.If set, thebooleanPartialImage
to use whenprinting
.If set, thebooleanTrueImage
to use whenprinting
.If set, thecheckboxFieldFalseImage
to use whenprinting
.If set, thecheckboxFieldPartialImage
to use whenprinting
.If set, thecheckboxFieldTrueImage
to use whenprinting
.Style for header cells in printed output.int
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.Whether cell contents should wrap during printing.Indicates whether or not this component will load its dataprogressively
float
Alternative todrawAheadRatio
, to be used when the user is rapidly changing the grids viewport (for example drag scrolling through the grid).getRecord
(int recordNum) Return the pointer to a particular record by record number.This attribute allows custom base styles to be displayed on a per-record basis.If set to false on a record andcanRemoveRecords
is true, removal of that record is disallowed in the UI.If set to false on a record, selection of that record is disallowed.If this property is set on a record it will designate the WAI ARIA role for cells within this records rowgetRecordComponent
(int rowNum) Retrieve therecordComponent
currently being shown at the given coordinates.getRecordComponent
(int rowNum, Integer colNum) Retrieve therecordComponent
currently being shown at the given coordinates.IfshowRecordComponents
is true, this attribute may be used to specify a standard height for record components.The method ofcomponent-pooling
to employ forrecordComponents
.ifshowRecordComponents
is true, how should the component appear within the cell.The name of the ListGridRecord property that specifies the DataSource to use whenlistGrid.expansionMode
is "related".IfcanAcceptDroppedRecords
is true for this listGrid, this property governs whether the user can drop between, or over records within the grid.Returns theRecordDropPosition
for some record drop operation.Property name on a record that should be checked to determine whether the record may be edited.Property name on a record that will be checked to determine whether a record is enabled.int
getRecordIndex
(Record record) Get the index of the provided record.
int
getRecordIndex
(ListGridRecord record) Get the index of the provided record.Return the underlying data of this DataBoundComponent as aRecordList
.When set to any valid CSS border-radius string, allows for rounded records in this grid by havinggetCellCSSText()
apply a corner-radius to the first and last cells in each record.Array ofRecordTypes
that should be rounded whenrecordRadius
is set to a valid CSS border-radius string.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.If this property is set on a record it will designate the WAI ARIA role for this record's row.Returns the current set of records displayed in this grid as an array of ListGridRecord objects.Screen to create (viacreateScreen()
) in lieu of callinggetRecordComponent()
.Name of the property that can be set on a per-record basis to disabled rollover for an individual record whenshowRollOver
is true.If showing any record summary fields (IE: fields oftype:"summary"
), this attribute specifies a custom base style to apply to cells in the summary fieldgetRelatedDataSource
(ListGridRecord record) Returns theDataSource
containing data related to the passed record.Custom CSS text to be applied to records that have beenmarked for removal
.Returns a JavaScriptObject containing defaultListGridField
attributes of remove fields.Configuration properties for the "remove field" displayed whencanRemoveRecords
is enabled.The title to use for theremove field
.WhencanRemoveRecords
is enabled, default icon to show in the auto-generated field that allows removing records.int
Default width and height ofremove icons
for this ListGrid.Custom style to apply to the image in theremoveField
displayed in rows whencanRemoveRecords
is true.operationId
this component should use when performing remove operations.boolean
If true, when an update operation occurs on a selected record in adatabound
listGrid, ensure the updated record is re-selected when the operation completes.ifreselectOnUpdate
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.boolean
Iftrue
, the grid contents are redrawn in real time as fields are resized.Return the underlying data of this DataBoundComponent as aResultSet
.If a page is rendered inRTL mode
, should cell alignments specifiedListGridField.cellAlign
be reversed (so analign:"right"
field will have content aligned on the left and vice versa)?protected Canvas
getRollOverCanvas
(Integer rowNum, Integer colNum) This method is called to retrieve therollOverCanvas
when the user moves over a new row or cell ifshowRollOverCanvas
is true, or when the user moves over the selected record ifshowSelectedRollOverCanvas
is true.protected Canvas
getRollUnderCanvas
(Integer rowNum, Integer colNum) This method is called to retrieve therollUnderCanvas
when the user moves over a new row or cell ifshowing a rollUnder canvas
or showing arollUnder canvas for the selected record
.int
IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
over arotated
header button.IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
over arotated
header button.int
IfshowHeaderMenuButton
is true, this property governs the width of the auto-generatedheaderMenuButton
over arotated
header button.Whether to rotate the field titles so they're rendered vertically from bottom to top.Returns a mapping of default WAI ARIA attributes for rows within this listGrid.Retrieves therow count
for the grid, which may differ from the reporteddata length
ifprogressive loading
is enabled.When an exactrow count
is not known due to progressive loading, this attribute allows the formatted row count returned bygetFormattedRowCount()
and ultimately displayed in therowRangeDisplay label
to be rounded to a multiple of the specified value.Integer[]
Retrieves therow count range
for listGrids whereprogressive loading
is active and the row count has been specified as arange
.This method indicates whethergetRowCount()
reflects an accurate row-count for this listGrid.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.getRowErrors
(int rowNum) Returns any currently stored validation errors for this row in the following format:
{fieldName:[array of error messages], ...}
int
getRowHeight
(ListGridRecord record, int rowNum) Return the height this row should be.IflocateRowsBy
has been set to "cellValue", this property may be used to specify which field's cell value to use.String[]
IflocateRowsBy
has been set to "cellValue", this property may be used to specify which field's cell value to use.int
getRowNum
(ListGridRecord record) Synonym ofgetRecordIndex()
.An automatically generated field that displays the current row number whenshowRowNumbers
is true.int
The number to start the row-count from - default value is 1.The CSS Style name for therowNumberField
.int
getRowPageTop
(int rowNum) Returns the Y-coordinate for a given row number as a page-relative coordinate.RowRangeDisplay
autoChild, which may be retrieved by callinggetRowRangeDisplay()
.How should thegetFormattedRowRange()
format the row range and row count for display to the user?This method will return a row range summary display value containing the currently visible row range and row count for the data set.Dynamic String specifying the format for thevisible row range
.Returns the default WAI ARIA role for rows within this listGrid.int
getRowSpan
(ListGridRecord record, int rowNum, int colNum) Return how many rows this cell should span.IfallowRowSpanning
is enabled, this property may be used to specify editing behavior for cells that span multiple rows.Chooses the selection mode whenuseRowSpanStyling
is enabled.int
getRowTop
(int rowNum) Returns the top coordinate for a given row number, relative to the top of body content.Whether edits should be saved whenever the user moves between cells in the current edit row.Should the currentfilter-criteria
be included along with other details when saving this grid'sview-state
?boolean
Saves the name of the default search to localStorage, under the key "sc_defaultSearch:" + minimal locator.Override ofSavedSearches.adminRole
for this component.Properties for the separator record between locally saved and admin searches.Override ofSavedSearches.defaultDataSource
for this component.Optional identifier for saved searches that should be applied to this component.Set to "criteria" if you want only criteria to be stored for ListGrids and TreeGrids instead of the full viewState of the component.Text to show for the saved searches submenu.Returns theview state
for this ListGrid as last saved by theautoPersistViewState
setting.For grids with a specifieddataSource
, this property can be set totrue
to cause the grid directly update its local data set instead of performing an operation against it's configured DataSource.For editable grids with a specifieddataSource
, wheresaveLocally
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).Special cell-separator that may be inserted between cell values when screen-readers are reading the content of a row.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 withariaRole:"list"
.boolean
Ifscreen reader mode is enabled
, andcanSelectCells
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?Special row-separator that may be inserted at the end of the row value when screen-readers are reading the content of a row.Whenscreen reader mode
is enabled, for grids withariaRole
set to"list"
, should a custom aria-labelledby attribute be written out in addition to any otherrow aria properties
to ensure thecolumn titles
,screenReaderCellSeparator
andscreenReaderRowSeparator
are read out along with cell content when reading rows?int
While drag scrolling in an incrementally rendered grid, time in milliseconds to wait before redrawing, after the last mouse movement by the user.When scrollToCell is called, this is used as defaults if xPosition weren't explicitly passed into the method.When scrollToCell is called, this is used as defaults if yPosition weren't explicitly passed into the method.While scrolling an incrementally rendered grid, using the mouseWheel, time in milliseconds to wait before redrawing, after the last mouseWheel movement by the user.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 theFilterEditor
orFilter Window
.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 theFilterEditor
orFilter Window
.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.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.Returns the first selected record in this grid.Returns all selected records in this grid.getSelectedRecords
(boolean excludePartialSelections) Returns all selected records in this grid.Returns a snapshot of the current selection within this listGrid as aListGridSelectedState
object.
This object can be passed tosetSelectedState()
to reset this grid's selection the current state (assuming the same data is present in the grid).If true, show the field-header for the sorted field (or the first field in amulti-sort
grid) in the selected state.Deprecated.usegetSelectedRecords()
insteadgetSelection
(boolean excludePartialSelections) Deprecated.usegetSelectedRecords(boolean)
insteadHow selection of rows should be presented to the user.If specified, the selection object for this list will use this property to mark records as selected.Defines a listGrid's clickable-selection behavior.When the user starts editing a row, should the row also be selected?boolean
When set to false, clicking a record'sexpansion field
will not add the record to the current selection.CSS class to apply to rows marked asseparators
in this grid.Whether all columns should be drawn all at once, or only columns visible in the viewport.Whether all records should be drawn all at once, or only records visible in the viewport.If set to false, do not show theasynchGroupingPrompt
dialog duringasynchronous grouping
.Iftrue
this grid will create and show per-row backgroundComponents as detailedhere
.Whether to show a context menu with standard items for all context clicks on rows in the body.boolean
If true and a header button's title is clipped, then a hover containing the full field title is enabled.If true and a cell's value is clipped, then a hover containing the full cell value is enabled.Should group summaries be visible when the group is collapsed?Whether to show fields of non-atomic types when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.
Whether to include fields markeddetail:true
from this component'sDataSource
.Controls whether to show a drop-indicator during a drag and drop operation.boolean
Should ellipses be displayed when cell content is clipped? May be overridden at the field level viaListGridField.showEllipsisWhenClipped
Indicates whether the text of the emptyMessage property should be displayed if no data is available.boolean
If this grid is editable, and an edit has caused validation failure for some cell, should we show an icon to indicate validation failure?WhenExpansionMode
is editor, should a Save button be shown below the the expanded editor?boolean
Should this listGrid display a filter row.When set to false, no hover is shown for the filter editor fields.WhencanShowFilterEditor
is true, this is the title for the filterEditor show/hide menu-item, in theheaderContextmenu
, when the filterEditor is hidden.Should an indicator be shown to indicate thatfilterWindowCriteria
is configured? The indicator is a small triangle shown in the top-right of the grid header or filter.Should this ListGrid show a summary row beneath the last record of the grid.If this listGrid supportsgrouping
, 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.If this grid isgrouped
, andshowGroupSummary
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.If this grid isgrouped
andshowGroupSummaryInHeader
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.boolean
If this isgrouped
and hasfrozen fields
, should the group title show in the frozen or unfrozen body?Should we show the header for this ListGrid?Whether to show a context menu on the header with standard items for showing and hiding fields.If set to true andshowHeaderContextMenu
is true, theheaderMenuButton
will be displayed when the user rolls over the header buttons in this grid.Should partial selection of all records be shown in header with a special icon? The partial icon will show in the header whencanSelectAll
is enabled and at least one record is selected but all records are not selected.Should the header show a drop-shadow? Shadow will be applied to the header, or for a grid with frozen columns, the header layout.Whether to show a context menu on the header span with standard items for showing and hiding fields.If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using the FormulaBuilder or SummaryBuilder.If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using thehilite editor
.If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using themulti-sort editor
.Whether to show fields markedhidden:true
when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.
boolean
Determines whether hiliting for any field in this grid is shown in a group summary.If true, andcanHover
is also true, shows popup hover text next to the mouse when the user hovers over a cell.When set to true and canHover is also true, shows a widget hovering at the mouse point.boolean
IfshowHover
is true, should cell hover HTML be displayed on disabled cells?When set to true, shows thedrag handle field
on initial draw.If this is an editable ListGrid, setting this property to true causes an extra row with thenewRecordRowMessage
to be displayed below the last record.Should partially selected parents (in a Tree data set) be shown with special icon? This has an impact in grouped grids wherecanSelectGroups
is true.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.If true, showsrecordComponents
in cells, rather than just in records.Should we show different styling for the cell the mouse is over?When enabled, when the mouse moves over a row or cell (depending onuseCellRollOvers
), an arbitrary Canvas can be shown layered on top of the row or cell (therollOverCanvas
), layered underneath the row or cell (therollUnderCanvas
), or both.This setting causes theroll over canvas
to be sized to cover the normal row and the expansion layout.If roll overs are enabled, should therollUnderCanvas
be displayed?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.boolean
Whether to associate saved searches by default with the currentDataSource
of a component when asavedSearchId
is not provided.This setting causes theroll over canvas
to be displayed when the user rolls over selected records in the grid (but not when rolling over other records).This setting causes theroll under canvas
to be displayed when the user rolls over selected records in the grid (but not when rolling over other records).Should the "Selected" style be applied to selected records?IfselectionType
is set toSelectionStyle.SINGLE
, setting this property totrue
means selection will be displayed to the user with theselectionCanvas
and/orselectionUnderCanvas
rather than with CSS styling.IfselectionType
is set toSelectionStyle.SINGLE
, and eithershowSelectionCanvas
istrue
andshowSelectionUnderCanvas
is unset, orshowSelectionUnderCanvas
is explicitly set totrue
, then selection will be displayed to the user with theselectionCanvas
and/orselectionUnderCanvas
rather than with CSS styling.Indicates whether a sorting arrow should appear for the listGrid, and its location.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.WhenheaderSpans
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 aTreeGrid
displays a Tree.If this list grid is showing anyfrozen
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 totrue
any backgroundColor or border applied to the ListGrid will show up below the bottom row of the frozen column(s).Ifrecord[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 ofrecord[this.singleCellValueProperty]
.Where do 'skin' images (those provided with the class) live?Whether to skip line breaks for all fields by default whenescaping HTML
.getSort()
Returns the currentSortSpecifiers
for this ListGrid.int
WhenleaveHeaderMenuButtonSpace
is true, configures the amount of space beyond theheaderMenuButtonWidth
on the right side of a ListGrid header button (left forRTL mode
) to reserve for the sort arrow if sorting is active for that field and the arrow will be shown.Image to show when sorted in ascending order.Image to show when sorted in ascending order.boolean
For any fields oftype "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 theBinaryFields
overview.If set, whenever grouping is performed by an end user or by a programmatic call togroupBy()
, data is implicitly sorted by all of the grouped columns, in the order they were passed to groupBy.Image to show when sorted in descending order.Image to show when sorted in descending order.Sorting direction of this ListGrid.If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInSortEditor
is true, this string will be inserted between the headerSpan title(s) and the field title in the field chooser grid on themulti-sort editor
The title for the corner sort button.Specifies the field by which this grid should be initially sorted.If we're showing aheaderContextMenu
for this grid, this attribute will be shown as the menu item title to sort a field in ascending order.int
Returns the number of fields involved in this grid's current sort configuration.If we're showing aheaderContextMenu
for this grid, this attribute will be shown as the menu item title to sort a field in descending order.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.int
WhenleaveHeaderMenuButtonSpace
is true, configures the amount of space beyond theheaderMenuButtonWidth
on the right side of a ListGrid header button (left forRTL mode
) to reserve for the sort numeral ifmulti-sorting
is active for that field and the numeral will be shown.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.getSortSpecifier
(String fieldName) Returns theSortSpecifier
for the passed fieldName, or null if the field is not sorted.Initial sort state for the grid.The menu displayed when a cell is right clicked on.Button.baseStyle
to apply to the field header buttons for this ListGrid when showing header spans.If true,getFieldState()
andsetFieldState(java.lang.String)
will omit state information for hidden fields by default.If this is an editable listGrid, this property determines how failure to save due to validation errors should be displayed to the user.When set to true, the first and last cells in each row will be styled with an additional CSS class, via thefirstCellStyle
andlastCellStyle
attributes.Default CSS class for the ListGrid as a whole.getSummaryFieldValue
(ListGridField field, Record record) Get the computed value of asummary field
.Automatically generated ListGrid for displaying grid summary information (seeshowGridSummary
).IfshowGridSummary
is true, and asummaryRowDataSource
is specified this property may be used to specify fetch criteria to apply when retrieving summary data to show in the summary row.IfshowGridSummary
is true, by default summary values are calculated on the client based on the current data-set for the grid (seegetGridSummary()
andgetGridSummaryFunction()
).IfshowGridSummary
is true, and asummaryRowDataSource
is specified this property may be used to customize the fetch request used when retrieving summary data to show in the summary row.int
Default height for thesummary row autoChild
.baseStyle
for thesummaryRow
The style to apply to <TR> tags in this grid's table."Tall" baseStyle for this listGrid.protected ListGrid
Method to return the fieldName which represents the "title" for records in this
 Component.

 If this.titleField is explicitly specified it will always be used.
 Otherwise, default implementation will checktitleField
for databound
 components.

 For non databound components returns the first defined field name of"title"
, 
"name"
, or"id"
.getTitleFieldValue
(Record record) Get the value of the titleField for the passed record
getToggleFreezeText
(ListGridField field) If we're showing aheaderContextMenu
for this grid andthis.canFreezeFields
is true, this string will be shown as the title for the menu item to toggle whether a field is frozen or unfrozen.int
Return the total number of rows in the grid.While scrolling an incrementally rendered grid, using the inertial scrolling, time in milliseconds to wait before redrawing, after the last touchScroll by the user.Default image to use for the dragTracker when things are dragged within or out of this list.Default image to use for the dragTracker when things are dragged within or out of this list.If we're showing aheaderContextMenu
for this grid andthis.canFreezeFields
is true, this string will be shown as the title for the menu item to unfreeze a currently frozen field.If we're showing aheaderContextMenu
for this grid, andthis.isGrouped
is true, this attribute will be shown as the title for the menu item to ungroup the grid.Value to return fromgetFormattedRowCount()
when the row count is unknownWhencanRemoveRecords
is enabled, this icon will be shown in the auto generated field fro removing records if the record has been marked as removed viamarkRecordRemoved()
.operationId
this component should use when performing update operations.boolean
Should thesummary row
orgroup summaries
be updated during editing of grid records? This can be set false to improve performance when a large number ofListGridFields
orDataSourceFields
are present for the grid.Should thefilter-editor
in this grid always produceAdvancedCriteria
?If set to true, an advanced field picker based on theFieldPicker
will be shown instead of the column picker submenu if there are more fields in the grid thanadvancedFieldPickerThreshold
.If true, the set of fields given by the "default binding" (see 
fields
) is used, with any fields specified in
component.fields
acting as overrides that can suppress or modify the
 display of individual fields, without having to list the entire set of fields that
 should be shown.
Are rollovers cell-level or row-level?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.For ListGrids withcanSelectCells:true
, enabling this property will cause the listGrid to intercept standard browser copy/paste shortcut keys and perform the following behavior.TheuseFlatFields
flag causes all simple type fields anywhere in a nested
 set of DataSources to be exposed as a flat list for form binding.boolean
IfshowFilterEditor
is true, when creating a SelectItem for editing criteria for a field with a ValueMap, should the SelectItem default tomultiple:true
?Returns a snapshot of the current user-provided criteria for this ListGrid.IfsaveLocally
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 totrue
to ensure these remote validators are called when saving edits in saveLocally mode.Enables various styling behaviors that potentially make sense whengetRowSpan()
has been overridden to introduce spanning cells, and spanning is largest on the left and smaller as cells go to the right.Whether client-side validation checks should be performed when the user moves between cells in the current edit row.If true, validation will be performed on each edited cell when each editor's "change" handler is fired.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.getValueIconCursor
(ListGridField field, ListGridRecord record, Object value) Returns the cursor to display when the mouse pointer is over avalueIcon
in a a cell.Height for value icons for this listGrid.int
How much padding should there be on the left of valueIcons by default Can be overridden at the field levelint
How much padding should there be on the right of valueIcons by defaultint
Default width and height of value icons for this ListGrid.Width for value icons for this listGrid.Initial view state may be provided for the listGrid at init time.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.Integer[]
Get the rows that are currently visible in the viewport, as an array of [firstRowNum, lastRowNum].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).IfcanRemoveRecords
is true, when the user clicks the remove icon for some record, should we show a warning message (defined aswarnOnRemovalMessage
) and allow the user to cancel removal?Warning message to show the user on a click on the 'remove' icon ifcanRemoveRecords
is true andwarnOnRemoval
is true.If a field hasListGridField.displayField
specified and has noListGridField.optionDataSource
, this field will display the value from thedisplayField
of each record by default (for more on this behavior seeListGridField.optionDataSource
).Should content within cells be allowed to wrap?IfHeaderSpan.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.IfListGridField.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.void
Display the current set of records grouped by their values for the given field or fields.groupSortNormalizer
(ListGridRecord record, String fieldName, ListGrid context) WhensortByGroupFirst
is active, the sortingnormalizer
applied for implicit sorting by the field(s) used for grouping.Whether the grid as a whole has any unsaved edits, in any row.hasChanges
(Boolean ignorePendingValues) Whether the grid as a whole has any unsaved edits, in any row.Does this grid currently have errors associated with editValues for any row in the grid.headerHoverHTML
(int fieldNum, String defaultHTML) Returns the HTML that is displayed by the defaultheaderHover
handler.boolean
headerTitleClipped
(int fieldNum) Is the field title for the specified field clipped?void
Hides thedrag handle field
, if currently shown.void
Force a field to be hidden.
NOTE: If a field.showIf expression exists, it will be destroyed.void
Force a field to be hidden.
NOTE: If a field.showIf expression exists, it will be destroyed.void
hideFields
(ListGridField... fields) Force an array of fields to be hidden.void
hideFields
(ListGridField[] fields, boolean suppressRelayout) void
hideFields
(String... fields) Force an array of fields to be hidden.void
hideFields
(String[] fields, boolean suppressRelayout) Force an array of fields to be hidden.void
Invalidate the current data cache for this databound component via a call to the dataset'sinvalidateCache()
method, for example,ResultSet.invalidateCache()
.void
Invalidates the currently visible set ofrecordComponents
and gets fresh ones for the visible rows in the grid according to therecordComponentPoolingMode
isCheckboxField
(ListGridField field) Identifies whether the passed-in field is the specially generatedcheckboxField
used whenSelectionAppearance
is "checkbox".isExpanded
(ListGridRecord record) Whether a givenrecord
is expanded or collapsed.isExpansionField
(ListGridField field) Identifies whether the passed-in field is the specially generatedexpansionField
used whencanExpandRecords
is true.boolean
Returns true if this component is currentlyexporting client data
.boolean
Return true if the ListGrid is grouped on a field.boolean
isGroupNode
(ListGridRecord record) If this listGrid isgrouped
, is the record passed in a group header node.isPartiallySelected
(ListGridRecord record) When using tree-oriented selection modes likeTreeGrid.cascadeSelection
, returns true if the record is considered partially selected because only some of it's children are selected.isRowNumberField
(ListGridField field) Identifies whether the passed-in field is the specially generatedrowNumberField
used whenshowRowNumbers
is true.isSelected
(ListGridRecord record) Returns true if the record is selected.isSortField
(String fieldName) Returnstrue
if the passed fieldName is in the current sort-specification.boolean
isSummaryRecord
(ListGridRecord record) Returns whether the supplied record is a group or grid summary record.Loads all records that match this grid's current filter-criteria, optionally firing a callback when the data arrives.loadAllRecords
(Integer maxRecords) loadAllRecords
(Integer maxRecords, DSCallback callback) Loads all records that match this grid's current filter-criteria, optionally firing a callback when the data arrives.void
Marks the widget as "dirty" so that it will be added to a queue for redraw.void
markForRedraw
(String reason) Marks the widget as "dirty" so that it will be added to a queue for redraw.void
markRecordRemoved
(int rowNum) Marks a record deleted such that a later call tosaveEdits()
orsaveAllEdits()
will cause a "remove"DSRequest
to be submitted.void
markRecordsRemoved
(int records) Marks an array of records deleted such that a later call tosaveEdits()
orsaveAllEdits()
will cause a "remove"DSRequest
to be submitted.void
markRecordsRemoved
(RecordList records) Marks an array of records deleted such that a later call tosaveEdits()
orsaveAllEdits()
will cause a "remove"DSRequest
to be submitted.void
markRecordsRemoved
(ListGridRecord... records) Marks an array of records deleted such that a later call tosaveEdits()
orsaveAllEdits()
will cause a "remove"DSRequest
to be submitted.void
Marks the currently selected records as removed, as thoughmarkRecordRemoved()
had been called.protected void
onInit()
protected void
boolean
Opens the node represented by the "record" parameter, if it is a folder and is not already open.void
openRecordDetailGrid
(ListGridRecord record, DataSource detailDataSource) Deprecated.void
openRecordEditor
(ListGridRecord record) Deprecated.static void
Preload primary ListGrid skin images.void
Refresh thegrid summary
, by either re-calculating from already-loaded data or doing a new fetch from thesummaryRowDataSource
.void
Recalculates values for fields withsummary-functions
oruser formulae
defined and for values displayed in thegrid summary
andgroup summary rows
.void
recalculateSummaries
(Record... records) void
recalculateSummaries
(Record[] records, ListGridField... fields) Recalculates values for fields withsummary-functions
oruser formulae
defined and for values displayed in thegrid summary
andgroup summary rows
.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.recordMarkedAsRemoved
(int rowNum) Returns true if the specified record is marked as removed via a call tomarkRecordRemoved()
void
redrawHeader
(boolean rightNow) Redraw just thegrid header
void
refreshCell
(int rowNum, int colNum) Refresh an individual cell without redrawing the grid.void
refreshCell
(int rowNum, int colNum, boolean refreshingRow, boolean allowEditCellRefresh) Refresh an individual cell without redrawing the grid.void
refreshCellStyle
(int rowNum, int colNum) Refresh the styling of an individual cell without redrawing the grid.void
UnlikeinvalidateCache
this will perform an asynchronous (background) refresh of this component's data and then call the provided callback method on completion.void
refreshData
(DSCallback callback) UnlikeinvalidateCache
this will perform an asynchronous (background) refresh of this component's data and then call the provided callback method on completion.void
Re-evaluatesListGridField.showIf()
for each field, dynamically showing and hiding the appropriate set of fieldsvoid
refreshRecordComponent
(int rowNum) Discards anyrecordComponent
currently assigned to the specified record (or cell) and gets a fresh one, according to therecordComponentPoolingMode
void
refreshRecordComponent
(int rowNum, Integer colNum) Discards anyrecordComponent
currently assigned to the specified record (or cell) and gets a fresh one, according to therecordComponentPoolingMode
void
refreshRow
(int rowNum) Refresh an entire row of cells without redrawing the grid.void
regroup()
Programmatically regroup the grid according to the current grouping configuration.void
removeData
(Record data) Remove a record from this ListGrid.void
removeData
(Record data, DSCallback callback) void
removeData
(Record data, DSCallback callback, DSRequest requestProperties) Remove a record from this ListGrid.void
removeEmbeddedComponent
(Canvas component) Removes an embedded component from a grid.void
Removes an embedded component previously associated with the provided record.void
removeEmbeddedComponent
(ListGridRecord record, Integer component) Removes an embedded component previously associated with the provided record.void
removeRecordClick
(int rowNum) Method fired when the user clicks the "remove" icon ifcanRemoveRecords
is true.void
Remove the currently selected records from this component.void
removeSelectedData
(DSCallback callback) void
removeSelectedData
(DSCallback callback, DSRequest requestProperties) void
removeSelectedData
(DSCallback callback, DSRequest requestProperties, RPCQueueCallback queueCallback) Remove the currently selected records from this component.void
reorderField
(int fieldNum, int moveToPosition) Reorder a particular fieldvoid
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.void
resizeField
(int fieldNum, int newWidth) Resize a particular field to a new width.void
resort()
If a list has become unsorted due to data modification or a call tounsort()
, this method will resort the list by the previoussort-specifier
array, if there is one, or by the previous sort-field and -direction.void
rowClick
(ListGridRecord record, int recordNum, int fieldNum) Event handler for when rows in the body are clicked upon.void
rowClick
(ListGridRecord record, int recordNum, int fieldNum, boolean keyboardGenerated) Event handler for when rows in the body are clicked upon.void
rowDoubleClick
(ListGridRecord record, int recordNum, int fieldNum) Event handler for when a body record is double-clicked.void
rowDoubleClick
(ListGridRecord record, int recordNum, int fieldNum, boolean keyboardGenerated) Event handler for when a body record is double-clicked.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.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.rowHasErrors
(int rowNum) Does the specified row have unresolved errors?boolean
Save a number of outstanding edits for this ListGrid.boolean
saveAllEdits
(Function callback) Save a number of outstanding edits for this ListGrid.boolean
saveAllEdits
(Function callback, int[] rows) Save a number of outstanding edits for this ListGrid.void
Validates and saves edits within the row currently being edited (or another row with unsaved edits, if indicated).void
saveEdits
(EditCompletionEvent editCompletionEvent) void
saveEdits
(EditCompletionEvent editCompletionEvent, String callback) 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).void
scrollBodyTo
(Integer left, Integer top) Scroll the body of the grid to the specified coordinates.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.void
scrollToCell
(int rowNum, int colNum, Alignment xPosition) 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.void
scrollToColumn
(int colNum) Scroll the grid to specified column such that the row appears near the center of the viewport.void
scrollToColumn
(int colNum, Alignment xPosition) Scroll the grid to specified column such that the row appears near the center of the viewport.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.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.void
Select all records

void
selectRange
(int startRow, int endRow) Select a contiguous range of records by indexvoid
selectRange
(int startRow, int endRow, boolean newState) Select a contiguous range of records by indexvoid
selectRecord
(int record) Select/deselect aRecord
passed in explicitly, or by index.void
selectRecord
(int record, boolean newState) Select/deselect aRecord
passed in explicitly, or by index.void
selectRecord
(Record record) Select/deselect aRecord
passed in explicitly, or by index.void
selectRecord
(Record record, boolean newState) Select/deselect aRecord
passed in explicitly, or by index.void
selectRecords
(int[] records) Select/deselect a list ofRecord
s passed in explicitly, or by index.void
selectRecords
(int[] records, boolean newState) Select/deselect a list ofRecord
s passed in explicitly, or by index.void
selectRecords
(Record[] records) Select/deselect a list ofRecord
s passed in explicitly, or by index.void
selectRecords
(Record[] records, boolean newState) Select/deselect a list ofRecord
s passed in explicitly, or by index.void
selectSingleRecord
(int rowNum) Select a singleRecord
passed in explicitly, or by index, and deselect everything else.void
selectSingleRecord
(Record record) Select a singleRecord
passed in explicitly, or by index, and deselect everything else.setAddDropValues
(Boolean addDropValues) 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.setAddFormulaFieldText
(String addFormulaFieldText) Text for a menu item allowing users to add a formula fieldsetAddOperation
(String addOperation) operationId
this component should use when performing add operations.setAddSummaryFieldText
(String addSummaryFieldText) Text for a menu item allowing users to add a formula fieldsetAdvancedFieldPickerThreshold
(int advancedFieldPickerThreshold) WhenuseAdvancedFieldPicker
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.setAdvancedFilteringText
(String advancedFilteringText) If we're showing aheaderContextMenu
for this grid, and afilter-editor
is visible andallowFilterWindow
is enabled, this attribute will be shown as the menu item title to configure advanced filtering.setAiFilterWindowHint
(String aiFilterWindowHint) The inline hint-text displayed in the user-entry area in theaiFilterWindow
.setAiFilterWindowInstructions
(String aiFilterWindowInstructions) The descriptive text displayed above the user-entry area in theaiFilterWindow
.setAiFilterWindowTitle
(String aiFilterWindowTitle) The title for theAI-driven filter window
.setAiHoverContentsPrefix
(String aiHoverContentsPrefix) Optional prefix for the AI-generated hover text displayed when hovering over fields specifying anaiHoverRequest
.setAiHoverRetryDelay
(Integer aiHoverRetryDelay) Minimum number of milliseconds to wait before retrying to generate hover contents via AI.setAiSortFieldMaxRecordsMessage
(String aiSortFieldMaxRecordsMessage) The message to show when a user asks the AI to sort more than themaximum allowed records
.setAllowFilterExpressions
(Boolean allowFilterExpressions) For use withshowFilterEditor
:true, allows simple search expressions to be entered into filter fields, as thoughDynamicForm.allowExpressions
were true.setAllowFilterOperators
(Boolean allowFilterOperators) Causes a menu item titled"Filter using"
to appear in theheaderContextMenu
that allows the end user to pick an advancedsearch operator
to use for this field.setAllowFilterWindow
(Boolean allowFilterWindow) Adds the ability for a user to define additional criteria above and beyond those expressed in thefilter editor
via aFilterBuilder
which appears in a modal Window over the grid and can be accessed by various menus within the grid or triggered by external controls.setAllowRowSpanning
(Boolean allowRowSpanning) Should cells in this grid be allowed to span multiple rows? If set totrue
, thegetRowSpan()
method will be called for every cell when rendering out the listGrid to determine how many rows the cell should span.setAlternateBodyStyleName
(String alternateBodyStyleName) Optional css style to apply to the body ifalternateRecordStyles
is true for this grid.setAlternateFieldFrequency
(int alternateFieldFrequency) The number of consecutive columns to draw in the same style before alternating, whenalternateColumnStyles
is true.setAlternateFieldStyles
(boolean alternateFieldStyles) Whether alternating columns (or blocks of columns, depending onGridRenderer.alternateColumnFrequency
) should be drawn in alternating styles, in order to create a vertical "ledger" effect for easier reading.setAlternateFieldSuffix
(String alternateFieldSuffix) Suffix to append toalternate columns
.setAlternateRecordFrequency
(int alternateRecordFrequency) The number of consecutive rows to draw in the same style before alternating, whenalternateRowStyles
is true.setAlternateRecordStyles
(Boolean alternateRecordStyles) Whether alternating rows (or blocks of rows, depending onGridRenderer.alternateRowFrequency
) should be drawn in alternating styles, in order to create a "ledger" effect for easier reading.setAlternateRecordSuffix
(String alternateRecordSuffix) Suffix to append toalternate rows
.setAlwaysShowEditors
(Boolean alwaysShowEditors) 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 wheneditByCell
is false.setAlwaysShowOperatorIcon
(Boolean alwaysShowOperatorIcon) WhenallowFilterOperators
is enabled, whether to show theoperatorIcon
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.setAnimateFolderEffect
(AnimationAcceleration animateFolderEffect) When animating folder opening / closing, this property can be set to apply an animated acceleration effect.setAnimateFolderMaxRows
(Integer animateFolderMaxRows) IfanimateFolders
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.setAnimateFolders
(Boolean animateFolders) If true, when folders are opened / closed children will be animated into view.setAnimateFolderSpeed
(int animateFolderSpeed) When animating folder opening / closing, this property designates the speed of the animation in pixels shown (or hidden) per second.setAnimateFolderTime
(int animateFolderTime) When animating folder opening / closing, ifTreeGrid.animateFolderSpeed
is not set, this property designates the duration of the animation in ms.setAnimateRemoveRecord
(Boolean animateRemoveRecord) WhencanRemoveRecords
is enabled, should records be animated out of view when they are removed by the user?setAnimateRemoveSpeed
(int animateRemoveSpeed) Whenanimating record removal
, this property designates the speed of the animation in pixels per second.setAnimateRemoveTime
(int animateRemoveTime) When animating record removal(see animateRemoveRecord)
, ifanimateRemoveSpeed
is not set, this property designates the duration of the animation in ms.setAnimateRollOver
(Boolean animateRollOver) If therollOverCanvas
is enabled, setting this property totrue
ensures that when therollOverCanvas
is displayed it is animated into view viaCanvas.animateShow()
.setAnimateRollUnder
(Boolean animateRollUnder) If therollUnderCanvas
is enabled, setting this property totrue
ensures that when therollUnderCanvas
is displayed it is animated into view viaCanvas.animateShow()
.setAnimateSelection
(Boolean animateSelection) If theselectionCanvas
is enabled, setting this property totrue
ensures that when theselectionCanvas
is displayed it is animated into view viaCanvas.animateShow()
.setAnimateSelectionUnder
(Boolean animateSelectionUnder) If theselectionUnderCanvas
is enabled, setting this property totrue
ensures that when theselectionUnderCanvas
is displayed it is animated into view viaCanvas.animateShow()
.setApplyFormulaAfterSummary
(Boolean applyFormulaAfterSummary) IfListGridField.userFormula
is set for some field, and this grid is showinggroup summaries
or agrid summary
, this property determines what field value should be present in those summary rows.setApplyRowCountToLength
(Boolean applyRowCountToLength) This property allows developers to explicitly setResultSet.applyRowCountToLength
for this grid's data object.setApplyRowNumberStyle
(boolean applyRowNumberStyle) setApproximateRowCountFormat
(String approximateRowCountFormat) setAriaRole
(String ariaRole) ARIA role for this ListGrid ifscreen reader mode
is enabled.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.setArrowKeyEditAction
(ArrowKeyEditAction arrowKeyEditAction) What to do when a user hits arrow key while editing a field?
If not explicitly specifiedgetArrowKeyEditAction()
will return an appropriate action depending on the field type.setAsyncErrorCellValue
(String asyncErrorCellValue) The value to display for cells when an error occurred during asynchronous computation.setAsynchGroupingPrompt
(String asynchGroupingPrompt) The prompt to display while interactivity is blocked duringasynchronous grouping
.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.void
setAutoChildProperties
(String autoChildName, ListGridField properties) Sets the properties for creating aListGridField
AutoChild namedautoChildName
.setAutoComplete
(AutoComplete autoComplete) Whether to do inline autoComplete in text fields during inline editing
Overridden byListGridField.autoComplete
if specified.setAutoConfirmSaveEdits
(Boolean autoConfirmSaveEdits) For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded by default.setAutoFetchAsFilter
(Boolean autoFetchAsFilter) IfDataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be performed viaDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
setAutoFetchData
(Boolean autoFetchData) If true, when this component is first drawn, automatically callDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
depending onDataBoundComponent.getAutoFetchAsFilter()
.setAutoFetchDisplayMap
(Boolean autoFetchDisplayMap) If true, for fields whereListGridField.optionDataSource
is specified, a valueMap will be automatically created by making aDataSource.fetchData()
call against the specified dataSource and extracting a valueMap from the returned records based on the displayField and valueField.setAutoFetchRowCount
(boolean autoFetchRowCount) Depending on whetherDataSource.progressiveLoading
is active, the exact count of available rows may not be available as part of the standard data fetch response - settingautoFetchRowCount:true
will cause a fetch for an accurate row count to be issued as soon as data arrives (from aprogressive dataSource response
) without an accurate row count.setAutoFetchTextMatchStyle
(TextMatchStyle autoFetchTextMatchStyle) IfautoFetchData
istrue
, this attribute allows the developer to specify a textMatchStyle for the initialDataBoundComponent.fetchData()
call.setAutoFitAllText
(String autoFitAllText) If we're showing aheaderContextMenu
for this grid, andcanAutoFitFields
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 theautoFitField()
method.setAutoFitClipFields
(String... autoFitClipFields) IfautoFitFieldWidths
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.setAutoFitData
(Autofit autoFitData) Should this ListGrid automatically expand to accommodate the size of records and fields?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 bydefaultDateFieldWidth
, (ordefaultEditableDateFieldWidth
for editable fields).setAutoFitExpandField
(String autoFitExpandField) The field to expand ifautoFitFieldWidths
andautoFitFieldsFillViewport
are enabled and auto-fitting will not fill all available horizontal space.setAutoFitExtraRecords
(Integer autoFitExtraRecords) IfautoFitData
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.setAutoFitFieldsFillViewport
(Boolean autoFitFieldsFillViewport) IfautoFitFieldWidths
is enabled, and extra space is available after autofitting all fields, should the grid automatically expand one field to fill the extra space.setAutoFitFieldText
(String autoFitFieldText) If we're showing aheaderContextMenu
for this grid, and user-driven auto fit of fields is enabled viaListGridField.canAutoFitWidth
orcanAutoFitFields
, 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 toautoFitField()
.setAutoFitFieldWidths
(Boolean autoFitFieldWidths) Should ListGrid fields autofit their widths to titles or content? This property may be overridden on a per-field basis viaListGridField.autoFitWidth
.setAutoFitHeaderHeights
(Boolean autoFitHeaderHeights) If this property is set to true, header buttons for eitherfields
orheader spans
will automatically expand to accommodate their titles vertically.setAutoFitIconFields
(AutoFitIconFieldType autoFitIconFields) Smart GWT listGrids have special logic to automatically size fields that are displayed as an icon - that is fields withtype:"icon"
, fields displaying onlyvalue icons
, and boolean fields (which are rendered as a checkmark type icon by default.setAutoFitMaxColumns
(int autoFitMaxColumns) IfautoFitData
is set to"horizontal"
or"both"
this property provides the maximum number of columns for which the ListGrid will expand.setAutoFitMaxHeight
(Integer autoFitMaxHeight) IfautoFitData
is set to"vertical"
or"both"
this property provides an upper limit on how far the ListGrid will expand vertically to accommodate its content.setAutoFitMaxRecords
(int autoFitMaxRecords) IfautoFitData
is set to"vertical"
or"both"
this property provides the maximum number of records for which the ListGrid will expand.setAutoFitMaxWidth
(Integer autoFitMaxWidth) IfautoFitData
is set to"horizontal"
or"both"
this property provides an upper limit on how far the ListGrid will expand horizontally to accommodate its content.setAutoFitMaxWidth
(String autoFitMaxWidth) IfautoFitData
is set to"horizontal"
or"both"
this property provides an upper limit on how far the ListGrid will expand horizontally to accommodate its content.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 bydefaultTimeFieldWidth
.void
setAutoFitWidth
(String fieldName, boolean autoFit) Setter forListGridField.autoFitWidth
.setAutoFitWidthApproach
(AutoFitWidthApproach autoFitWidthApproach) When a user requests column autofitting via theheader context menu
or via amouse gesture
, what autofit approach is used.setAutoPersistViewState
(ListGridViewStatePart... autoPersistViewState) Setting this property to a non-null value will enable automatic saving ofview state
to offline storage.setAutoSaveEdits
(Boolean autoSaveEdits) If this ListGrid is editable, should edits be saved out when the user finishes editing a row (or a cell ifsaveByCell
is true).setAutoSizeHeaderSpans
(Boolean autoSizeHeaderSpans) If this listGrid has specifiedheaderSpans
, setting this attribute to true will cause spans to expand to accommodate long titles if necessary.setBadFormulaResultValue
(String badFormulaResultValue) If the result of a formula evaluation is invalid (specifically, if isNaN(result)==true), badFormulaResultValue is displayed instead.setBaseStyle
(String baseStyle) base cell style
for this listGrid.setBlockingRowCountFetch
(Boolean blockingRowCountFetch) If specified, this attribute will be applied to this grid'sdata object
for dataBound grids.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.setBodyOverflow
(Overflow bodyOverflow) Overflow setting for the "body", that is, the area of the grid where data values are rendered.setBodyStyleName
(String bodyStyleName) CSS style used for the body of this grid.setBooleanBaseStyle
(String booleanBaseStyle) An optional CSS style to apply to the checkbox image.setBooleanFalseImage
(String booleanFalseImage) Image to display for a false value in a boolean field.setBooleanImageHeight
(int booleanImageHeight) setBooleanImageWidth
(int booleanImageWidth) setBooleanPartialImage
(String booleanPartialImage) Image to display for a partially true value in a boolean field (typically selection).setBooleanTrueImage
(String booleanTrueImage) Image to display for a true value in a boolean field.setBriefRowRangeDisplayValue
(String briefRowRangeDisplayValue) Dynamic String specifying the format for therow range summary value
whenRowRangeDisplayStyle
is set to"brief"
.setCanAcceptDroppedRecords
(Boolean canAcceptDroppedRecords) Indicates whether records can be dropped into this 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.setCanAddFormulaFields
(Boolean canAddFormulaFields) Adds an item to the header context menu allowing users to launch a dialog to define a new
 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.
setCanAddSummaryFields
(Boolean canAddSummaryFields) Adds an item to the header context menu allowing users to launch a dialog to define a new
 text field that can contain both user-defined text and the formatted values present in other 
 fields, using the {@link com.smartgwt.client..SummaryBuilder}.
setCanAutoFitFields
(Boolean canAutoFitFields) Can the user perform one-time autofit for specific columns in this grid?setCancelEditingConfirmationMessage
(String cancelEditingConfirmationMessage) If this is an editable listGrid, andthis.confirmCancelEditing
is true this property is used as the message to display in the confirmation dismissal prompt.setCanCollapseGroup
(Boolean canCollapseGroup) 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 (seecollapseGroupOnRowClick
); When false the group icon is not shown and clicking on the row does not change group state.setCanDragRecordsOut
(Boolean canDragRecordsOut) Indicates whether records can be dragged from this listGrid and dropped elsewhere.setCanDragSelect
(Boolean canDragSelect) If this property is true, users can drag the mouse to select several rows or cells.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 withrearranging rows or cells by dragging
, and withdrag selection of rows
.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.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 ofcanEditCell()
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.setCanEditFieldAttribute
(String canEditFieldAttribute) 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.setCanEditHilites
(boolean canEditHilites) Adds an item to the header context menu allowing users to launch a dialog to define grid hilites using theHiliteEditor
.setCanEditTitles
(boolean canEditTitles) If set to true, theadvanced field picker
provides an interface allowing users to modify fields' titles.setCanExpandMultipleRecords
(Boolean canExpandMultipleRecords) WhencanExpandRecords
is true, this property indicates whether multiple records can be expanded simultaneously.setCanExpandRecordProperty
(String canExpandRecordProperty) Property name on a record that will be checked to determine whether a record can be expanded.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.setCanFocusInEmptyGrid
(boolean canFocusInEmptyGrid) If the listGrid is empty, should the user be able to put focus into the grid body by tabbing to it?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.setCanGroupBy
(Boolean canGroupBy) If false, grouping via context menu will be disabled.setCanHiliteViaAI
(Boolean canHiliteViaAI) When set totrue
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.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 hasshowHover
set to false.setCanMultiGroup
(boolean canMultiGroup) When true, indicates that this ListGrid supports grouping on multiple fields.setCanMultiSort
(Boolean canMultiSort) When true, indicates that this ListGrid supports sorting on multiple fields.setCanPickFields
(Boolean canPickFields) Indicates whether the field picker item and submenu should be present in the header context menu.setCanPickOmittedFields
(Boolean canPickOmittedFields) If true, thefield picker menu
will include entries for all dataSource fields, including those not included in the specifiedfields array
.setCanRemoveRecords
(Boolean canRemoveRecords) If set, provide UI for the user to remove records from the grid as an additional field showing theremoveIcon
, which, when clicked, will callremoveRecordClick()
which removes the row from the data set (or ifdeferRemoval
is true changes themarkRecordRemoved()
status for the record).setCanReorderFields
(Boolean canReorderFields) Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields.setCanReorderRecords
(Boolean canReorderRecords) Indicates whether records can be reordered by dragging within thisListGrid
.setCanRequestRowCount
(boolean canRequestRowCount) Depending on whetherDataSource.progressiveLoading
is active, the exact count of available rows may not be known, andcanRequestRowCount
controls whether the end user may explicitly request it by clicking theRowRangeDisplay
label.setCanResizeFields
(Boolean canResizeFields) Indicates whether fields in this listGrid can be resized by dragging header fields.setCanSaveSearches
(boolean canSaveSearches) 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.setCanSelectAll
(Boolean canSelectAll) Controls whether a checkbox for selecting all records appears in the header withselectionAppearance
set to "checkbox"setCanSelectCells
(Boolean canSelectCells) Enables cell-level selection behavior as well ascell-level rollover
.setCanSelectGroups
(boolean canSelectGroups) Controls whether a checkbox for selectinggroups
appears in the group node ifSelectionAppearance
is set to"checkbox"
void
This customizer is called to determine whether a given record can be selected in this grid.setCanSelectSummaryRows
(boolean canSelectSummaryRows) Whether to allow selection of the summary row, for example by clicking on the record.setCanShowFilterEditor
(boolean canShowFilterEditor) Should a menu item allowing the user to show or hide thefilter editor
be displayed in theheaderContextmenu
?setCanSort
(Boolean canSort) Enables or disables interactive sorting behavior for this listGrid.setCanTabToHeader
(Boolean canTabToHeader) 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 ifSC.setScreenReaderMode()
is called.setCanTabToSorter
(Boolean canTabToSorter) Should thecorner sort button
be included in the tab-order for the page?void
IfshowCellContextMenus
istrue
, this method is fired when the user right-clicks a cell in this grid.
Default implementation will display a menu with entries derived fromListGrid.getCellContextMenuItems
for the appropriate cell.void
setCellCSSTextCustomizer
(CellCSSTextCustomizer customizer) Sets a customizer that returns additional CSS-text for styling a given cell.void
setCellFormatter
(CellFormatter formatter) Sets a formatter that returns the HTML to display in each cell of the grid, given the raw cell value.setCellHeight
(int cellHeight) Default height for each row in pixels.setCellPadding
(int cellPadding) The amount of empty space, in pixels, surrounding each value in its cell.setCellRole
(String cellRole) Returns the default WAI ARIA role for cells within this listGrid.void
Provide a custom implementation ofcellValueHoverHTML(ListGridRecord, int, int, String)
.setChartConstructor
(String chartConstructor) Name of the Smart GWT Class to be used when creating charts.setChartType
(ChartType chartType) Default type of chart to plot.setCheckboxFieldFalseImage
(String checkboxFieldFalseImage) IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for an unselected row.setCheckboxFieldImageHeight
(Integer checkboxFieldImageHeight) IfselectionAppearance
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.setCheckboxFieldImageWidth
(Integer checkboxFieldImageWidth) IfselectionAppearance
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.setCheckboxFieldPartialImage
(String checkboxFieldPartialImage) IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for a partially selected row.void
setCheckboxFieldProperties
(ListGridField checkboxFieldProperties) Standard properties to apply to the automatically generated checkbox field, shown whenselectionAppearance
is set to "checkbox".setCheckboxFieldTrueImage
(String checkboxFieldTrueImage) IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for a selected row.setChildExpansionMode
(ExpansionMode childExpansionMode) ForexpansionModes
that show another grid or tree, what the child's expansionMode should be.setClearAllSortingText
(String clearAllSortingText) If we're showing aheaderContextMenu
for this grid, this attribute will be shown as the menu item title to clear any existing sort on all fields.setClearCriteriaOnFilterEditorHide
(boolean clearCriteriaOnFilterEditorHide) When set to false, this attribute prevents user-criteria in thefilterEditor
from being cleared when the user hides it.setClearFilterText
(String clearFilterText) If we're showing aheaderContextMenu
for this grid, and afilter-editor
is visible, this attribute will be shown as the menu item title to clear any existing filter.setClearFilterViaAIText
(String clearFilterViaAIText) Title for the menu-item displayed in this component's header context-menu whenAI-assisted filtering
is allowed and an AI filter in already in effect.setClearSortFieldText
(String clearSortFieldText) If we're showing aheaderContextMenu
for this grid, this attribute will be shown as the menu item title to clear an existing sort on this field.setClipHeaderTitles
(Boolean clipHeaderTitles) 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 onhover
.setCollapseGroupOnRowClick
(boolean collapseGroupOnRowClick) IfcanCollapseGroup
is true, will a click anywhere on the group row toggle the group's expanded state? If false, the user must click thegroupIcon
directly to toggle the group.setConfigureGroupingText
(String configureGroupingText) If we're showing aheaderContextMenu
for this grid, and multi-grouping is enabled, this attribute is used as the title for a menu item that opens aMultiGroupDialog
to configure the grouping for this grid.setConfigureSortText
(String configureSortText) If we're showing aheaderContextMenu
for this grid, and multi-sorting is enabled, this attribute is used as the title for a menu item that opens aMultiSortDialog
to configure the sort-specification for this grid.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?setConfirmDiscardEdits
(Boolean confirmDiscardEdits) For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded.setConfirmDiscardEditsMessage
(String confirmDiscardEditsMessage) Ifthis.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.void
setCriteria
(Criteria criteria) Sets this component's filter criteria.setCriteriaIndicatorColor
(String criteriaIndicatorColor) The color of thefilterWindow criteria indicator
.setCriteriaIndicatorHeaderColor
(String criteriaIndicatorHeaderColor) The color of thefilterWindow criteria indicator
when shown on thesorter button
or the lastheader button
in the grid header.setData
(RecordList data) setData
(ListGridRecord... data) A list of ListGridRecord objects, specifying the data to be used to populate the ListGrid.setDataArity
(String dataArity) A ListGrid is adataArity
:multiple component.setDataFetchDelay
(Integer dataFetchDelay) Delay in milliseconds before fetching data.setDataFetchMode
(FetchMode dataFetchMode) How to fetch and manage records retrieve from the server.setDataPageSize
(int dataPageSize) When usingdata paging
, how many records to fetch at a time.setDataProperties
(ResultSet resultSetProperties) For databound ListGrids, this attribute can be used to customize theResultSet
object created for this grid when data is fetched.setDataSource
(DataSource dataSource) The DataSource that this component should bind to for default fields and for performingDataSource requests
.void
setDataSource
(DataSource dataSource, ListGridField... fields) Bind to a DataSource.setDataSource
(String dataSource) The DataSource that this component should bind to for default fields and for performingDataSource requests
.setDateFormatter
(DateDisplayFormat dateFormatter) How should Date type values be displayed in this ListGrid by default?setDateInputFormat
(String dateInputFormat) If this is an editable listGrid, this property will specify theinputFormat
applied to editors for fields of type"date"
.setDatetimeFormatter
(DateDisplayFormat datetimeFormatter) Display format to use for fields specified as type 'datetime'.setDeepCloneOnEdit
(Boolean deepCloneOnEdit) Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values.setDefaultDateFieldWidth
(Integer defaultDateFieldWidth) Default width for date type fields.setDefaultDateTimeFieldWidth
(Integer defaultDateTimeFieldWidth) Default width for datetime type fields.setDefaultEditableDateFieldWidth
(Integer defaultEditableDateFieldWidth) Default width for editable date type fields.setDefaultEditableDateTimeFieldWidth
(Integer defaultEditableDateTimeFieldWidth) Default width for editable datetime type fields.setDefaultFields
(ListGridField... defaultFields) An array of listGrid field configuration objects.void
Method to calculate and return the default width of a field.setDefaultFilterOperator
(OperatorId defaultFilterOperator) Defaultfilter operator
to use for text-based fields in this grid'sfilter editor
, when producingAdvancedCriteria
.setDefaultFilterOperatorSuffix
(String defaultFilterOperatorSuffix) Text to show after the name of the default filterOperator in theheaderContextMenu
whenallowFilterOperators
is enabled.static void
setDefaultProperties
(ListGrid listGridProperties) Class level method to set the default properties of this class.setDefaultTimeFieldWidth
(Integer defaultTimeFieldWidth) Default width for time type fields.setDeferRemoval
(Boolean deferRemoval) When enabled, the field shown bycanRemoveRecords
causes records to be marked for future removal viamarkRecordRemoved()
instead of immediately being removed.setDeselectOnPartialCheckboxClick
(Boolean deselectOnPartialCheckboxClick) Should partially selected checkbox be deselected or selected on click? This setting affectsheader selection checkbox
,group\n checkboxes
and folder checkbox selection in a Tree data set.void
setDetailDS
(DataSource detailDS) IfcanExpandRecords
is true andlistGrid.expansionMode
is"related"
, this property specifies the dataSource for the related records grid to be shown embedded in expanded records.setDetailDS
(String detailDS) IfcanExpandRecords
is true andlistGrid.expansionMode
is"related"
, this property specifies the dataSource for the related records grid to be shown embedded in expanded records.setDetailField
(String detailField) The field whose contents to show in the expanded portion of a record whencanExpandRecords
istrue
andlistGrid.expansionMode
isdetailField
.setDisabledGroupByPrompt
(String disabledGroupByPrompt) Prompt to indicate that grouping is disabled as the data set size exceedsgroupByMaxRecords
.setDiscardEditsOnHideField
(boolean discardEditsOnHideField) If a user is editing acanEdit: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?setDiscardEditsSaveButtonTitle
(String discardEditsSaveButtonTitle) IfconfirmDiscardEdits
is true this is the title for the save button appearing in the lost edits confirmation dialog.void
setDontAutoDestroyComponent
(Canvas component, boolean dontAutoDestroy) IfshowRecordComponents
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).setDragDataAction
(DragDataAction dragDataAction) Indicates what to do with data dragged into another DataBoundComponent.setDragDataCustomizer
(DragDataCustomizer customizer) During a drag-and-drop interaction, this method returns the set of records being dragged out of the component.setDragHandleFieldTitle
(String dragHandleFieldTitle) The title to use for thedrag handle field
.setDragHandleIcon
(String dragHandleIcon) Default icon to show in thedrag handle field
..setDragHandleIconSize
(int dragHandleIconSize) Default width and height ofdrag handle icons
for this ListGrid.setDragScrollRedrawDelay
(int dragScrollRedrawDelay) LikescrollRedrawDelay
, but applies when the component is being drag-scrolled (via a scrollbar).void
setDragTrackerIconCustomizer
(DragTrackerIconCustomizer dragTrackerIconCustomizer) HTML to be shown in hovers over cells in the column described by this field.setDragTrackerMode
(DragTrackerMode dragTrackerMode) 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.setDragTrackerStyle
(String dragTrackerStyle) CSS Style to apply to the drag tracker when dragging occurs on this component.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).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.setDrawAllMaxCells
(int drawAllMaxCells) If drawing all rows would cause less thandrawAllMaxCells
cells to be rendered, the full dataset will instead be drawn even ifshowAllRecords
is false and the viewport size anddrawAheadRatio
setting would normally have caused incremental rendering to be used.setDropValues
(Map dropValues) When an item is dropped on this component, andaddDropValues
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.setDuplicateDragMessage
(String duplicateDragMessage) Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled.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.setEditEvent
(ListGridEditEvent editEvent) Event that will trigger inline editing, seeListGridEditEvent
for options.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 fromthis.editFailedCSSText
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, usethis.editFailedBaseStyle
instead.setEditFormulaFieldText
(String editFormulaFieldText) Text for a menu item allowing users to edit a formula fieldsetEditOnF2Keypress
(Boolean editOnF2Keypress) Should we start editing when the widget has focus and the user presses the "f2" key (if this ListGrid supports editing)?setEditOnFocus
(Boolean editOnFocus) Should we start editing when this widget receives focus (if this ListGrid supports editing)?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.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.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.setEditPendingBaseStyle
(String editPendingBaseStyle) 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.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 usethis.editPendingBaseStyle
instead.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 byeditPendingCSSText
oreditPendingBaseStyle
.setEditProxyConstructor
(String editProxyConstructor) Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.setEditSelectionType
(SelectionStyle editSelectionType) IfselectOnEdit
is true, what should be the edit-selection behavior be?setEditSummaryFieldText
(String editSummaryFieldText) Text for a menu item allowing users to edit the formatter for a fieldvoid
setEditValue
(int rowNum, int colNum, boolean value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, double value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, float value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, int value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, JavaScriptObject value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, Record value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, Record[] value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, Boolean value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, Integer value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, Object value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, String value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, int colNum, Date value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, boolean value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, double value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, float value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, int value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, JavaScriptObject value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, Record value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, Record[] value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, Boolean value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, Integer value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, Object value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, String value) Modifies a field value being tracked as an unsaved user edit.void
setEditValue
(int rowNum, String fieldName, Date value) Modifies a field value being tracked as an unsaved user edit.void
setEditValues
(int rowNum, Map values) This method sets up a set of editValues for some row / cell.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 whenRTL
is in effect.setEmbeddedComponentMargin
(Integer embeddedComponentMargin) This is the space to apply as margin around child-components embedded in this grid.setEmptyAIHoverContents
(String emptyAIHoverContents) Hover contents to use when the AI-generated hover text is empty.setEmptyCellValue
(String emptyCellValue) The value to display for cells whose value is null or the empty string after applyingformatting
and valueMap (if any).setEmptyMessage
(String emptyMessage) The string to display in the body of a listGrid with an empty data array, if showEmptyMessage is true.setEmptyMessageStyle
(String emptyMessageStyle) The CSS style name applied to theemptyMessage
if displayed.setEmptyRowRangeDisplayValue
(String emptyRowRangeDisplayValue) Row range summary display value
when the grid is empty.setEnforceVClipping
(Boolean enforceVClipping) For performance reasons, even whenfixedRecordHeights
is set, vertical clipping is not enforced by default for some kinds of content (such as images) on all browsers.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.setEnumCriteriaAsInitialValues
(Boolean enumCriteriaAsInitialValues) In a ListGrid that has a DataSource and has filter criteria that include values for fields declared astype "enum"
in the DataSource, by default a newly edited row will use those filter criteria as initial values.setErrorIconHeight
(Integer errorIconHeight) Height of the error icon, if we're showing icons when validation errors occur.setErrorIconSrc
(String errorIconSrc) Src of the image to show as an error icon, if we're showing icons when validation errors occur.setErrorIconWidth
(Integer errorIconWidth) Height of the error icon, if we're showing icons when validation errors occur.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).setExactRowCountFormat
(String exactRowCountFormat) setExpansionCanEdit
(Boolean expansionCanEdit) ForexpansionModes
that show another grid or tree, is that component editable?setExpansionComponentPoolingMode
(ExpansionComponentPoolingMode expansionComponentPoolingMode) The method ofcomponent-pooling
to employ forexpansionComponents
.setExpansionEditorSaveDialogPrompt
(String expansionEditorSaveDialogPrompt) WhencanExpandRecords
is true andexpansionMode
is editor, the prompt to display in a dialog when an expanded row is collapsed while it's nested editor has changed values.setExpansionEditorShowSaveDialog
(Boolean expansionEditorShowSaveDialog) WhencanExpandRecords
is true andexpansionMode
is editor, whether a dialog should be displayed when an expanded row is collapsed while it's nested editor has changed values.setExpansionFieldFalseImage
(String expansionFieldFalseImage) IfcanExpandRecords
is set totrue
, this property determines the image to display in the expansion field for collapsed rows.setExpansionFieldImageHeight
(Integer expansionFieldImageHeight) IfcanExpandRecords
is set totrue
, this property may be set to govern the height of the expansion image displayed to indicate whether a row is expanded.setExpansionFieldImageShowRTL
(boolean expansionFieldImageShowRTL) If this grid is in RTL mode, should an "_rtl" suffix be added to theexpansionFieldTrueImage
andexpansionFieldFalseImage
image URLs? This should only be enabled if RTL media for the true and false expansion field images are available.setExpansionFieldImageShowSelected
(boolean expansionFieldImageShowSelected) Should a "_selected" suffix be added to theexpansionFieldTrueImage
andexpansionFieldFalseImage
image URLs for selected rows?setExpansionFieldImageStyle
(String expansionFieldImageStyle) Custom style to apply to the image in theexpansionField
displayed in collapsible rows whencanExpandRecords
is true.setExpansionFieldImageWidth
(Integer expansionFieldImageWidth) IfcanExpandRecords
is set totrue
, this property may be set to govern the width of the expansion image displayed to indicate whether a row is expanded.setExpansionFieldTrueImage
(String expansionFieldTrueImage) IfcanExpandRecords
is set totrue
, this property determines the image to display in the expansion field for expanded rows.setExpansionIndent
(Integer expansionIndent) WhencanExpandRecords
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 whenRTL
is in effect.setExpansionMode
(ExpansionMode expansionMode) TheExpansionMode
for records in this grid.setExpansionScreen
(String expansionScreen) Screen to create (viacreateScreen()
) in lieu of callinggetExpansionComponent()
.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.setExportAll
(Boolean exportAll) Setting exportAll to true prevents the component from passing its list of fields to the 
 export call.setExportAlternateRowBGColor
(String exportAlternateRowBGColor) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, background color to use for even-numbered rows, to create a "banded" or "ledger" effect.setExportDefaultBGColor
(String exportDefaultBGColor) Default background color to use when exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
.setExportFieldAlignments
(boolean exportFieldAlignments) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, whether fieldhorizontal header alignments
anddata value alignments
should be replicated in the resulting spreadsheet.setExportFields
(String[] exportFields) The list of field-names to export.setExportFieldWidths
(boolean exportFieldWidths) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, whether widths of fields should be replicated in the resulting spreadsheet.setExportHeaderHeights
(boolean exportHeaderHeights) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, causes theheaderHeight
andheaderSpan heights
to be applied to the corresponding cells in the spreadsheet.setExportHiddenFieldWidth
(int exportHiddenFieldWidth) Width to size non-visible fields (which may be specified withexportFields
orDSRequest.exportFields
) duringexportData()
orexportClientData()
, if they have no defined numericwidth
.setExportIncludeSummaries
(Boolean exportIncludeSummaries) If Summary rows exist for this component, whether to include them when exporting client data.setExportRawNumbers
(Boolean exportRawNumbers) Dictates whether numeric values should be exported as raw numbers instead of formatted values when usingexportClientData()
.setExportRawValues
(Boolean exportRawValues) Dictates whether the data in this grid should be exported raw byexportClientData()
.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.setExportWrapHeaderTitles
(boolean exportWrapHeaderTitles) When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, whether titles in theListGrid header
andheaderSpans
should be allowed to wrap.setFastCellUpdates
(Boolean fastCellUpdates) Note: This property only has an effect in Internet ExplorersetFetchDelay
(int fetchDelay) If we're showing the filterEditor (showFilterEditor
is true), andfilterByCell
orfilterOnKeypress
are enabled, this property is the delay in milliseconds between the user changing the filter and the filter request being sent to the server.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.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.setFetchOperation
(String fetchOperation) Operation ID this component should use when performing fetch operations.setFetchRequestProperties
(DSRequest fetchRequestProperties) IfautoFetchData
istrue
, this attribute allows the developer to declaratively specifyDSRequest
properties for the initialfetchData()
call.void
setFieldButtonProperties
(String name, Canvas properties) Method to update properties on a field's header button at runtime.void
setFieldCellIcon
(String fieldName, String cellIcon) Change theListGridField.cellIcon
for a field after the grid is createdsetFieldCriteriaText
(String fieldCriteriaText) The field criteria prefix to show in filter editor field hover before the descriptive version of the field's criteria, if any.void
setFieldError
(int rowNum, String fieldName, String errorMessage) Set a validation error for some cell.void
setFieldError
(int rowNum, String fieldName, String[] errorMessages) void
setFieldHeaderBaseStyle
(String name, String newStyle) Update theListGridField.headerBaseStyle
for a field within the grid at runtime.void
setFieldHeaderTitleStyle
(String name, String newStyle) Update theListGridField.headerTitleStyle
for a field within the grid at runtime.void
setFieldIcon
(String fieldName, String icon) Change theListGridField.icon
for a field after the grid is createdvoid
setFieldMaxWidth
(int fieldNum, int width) UpdatesListGridField.maxWidth
for the specified field and redraws the associated column if required.void
setFieldMinWidth
(int fieldNum, int width) UpdatesListGridField.minWidth
for the specified field and redraws the associated column if required.setFieldPickerFieldProperties
(String... fieldPickerFieldProperties) Names of properties onListGridField
for which theFieldPicker
should show an editing interface, for convenience.setFieldPickerShowSampleValues
(Boolean fieldPickerShowSampleValues) When set to false, sample values of the FieldPicker are never shown.void
setFieldProperties
(int fieldNum, ListGridField properties) Dynamically set properties for a particular field.void
setFieldProperties
(String fieldNum, ListGridField properties) Dynamically set properties for a particular field.setFields
(JavaScriptObject... fields) Field setter variant (alternative tosetFields(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.setFields
(ListGridField... fields) An array of field objects, specifying the order, layout, formatting, and sorting behavior of each field in the listGrid object.void
setFieldSearchOperator
(String fieldName, OperatorId operator) Applies a newsearch operator
to a field in the grid'sfilter row
, and updates it's operatorIcon.setFieldState
(String fieldState) Initialfield state
for the grid.void
setFieldTitle
(int fieldNum, String title) Change the title of a field after the grid is created.void
setFieldTitle
(String fieldNum, String title) Change the title of a field after the grid is created.setFieldVisibilitySubmenuTitle
(String fieldVisibilitySubmenuTitle) If we're showing aheaderContextMenu
for this grid, andthis.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.setFilterButtonPrompt
(String filterButtonPrompt) The prompt to show when the mouse hovers over the Filter button in the FilterEditor.setFilterButtonProperties
(Button filterButtonProperties) IfshowFilterEditor
is true, this attribute may be used to customize the filter button shown to the right of the filterEditor row.setFilterByCell
(boolean filterByCell) If we're showing thefilterEditor
, 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.void
setFilterEditorCriteria
(Criteria criteria) IfshowFilterEditor
is true, this method will update the criteria shown in thefilterEditor
without performing a filter.setFilterEditorHeight
(int filterEditorHeight) Height for the filterEditor, if shown.void
setFilterEditorProperties
(ListGrid filterEditorProperties) Deprecated.in favor ofsetFilterEditorProperties(RecordEditor)
setFilterEditorProperties
(RecordEditor filterEditorProperties) Properties to apply to the automatically generatedfilterEditor
ifshowFilterEditor
is true.setFilterLocalData
(Boolean filterLocalData) Causes filtering to be performed against the local data set, even when adataSource
is provided.setFilterOnKeypress
(boolean filterOnKeypress) When this attribute is true and this component has been assigned asearchForm
or is showing thefilterEditor
, data will be filtered automatically as users change values in those components.setFilterUsingText
(String filterUsingText) Text for the menu item shown in theheaderContextMenu
whenallowFilterOperators
is enabled.setFilterViaAIMode
(AIServiceMode filterViaAIMode) If filtering of the grid is enabled, filtering-via-AI can also be enabled by setting theAIServiceMode
to use.setFilterViaAIPanelInstructions
(String filterViaAIPanelInstructions) The instruction text to display above the "Filter via AI" text box.setFilterViaAIText
(String filterViaAIText) Title for the menu-item displayed in this component's header context-menu whenAI-assisted filtering
is allowed.setFilterWindowCriteria
(Criteria filterWindowCriteria) Advanced filtering criteria, eithersimple
oradvanced
, that is combined with thefilter editor criteria
during filtering.setFilterWindowInstructions
(String filterWindowInstructions) The instruction text to display at the top of thefilterWindow
.setFilterWindowTitle
(String filterWindowTitle) The title for theadvanced filtering window
.setFirstCellStyle
(String firstCellStyle) The style to apply to the first cell in each row, whenstyledRowEnds
is true.setFixedFieldWidths
(Boolean fixedFieldWidths) Should we horizontally clip cell contents, or allow columns to expand horizontally to show all contents?setFixedRecordHeights
(Boolean fixedRecordHeights) Should we vertically clip cell contents, or allow rows to expand vertically to show all contents?setFormulaBuilderSpanTitleSeparator
(String formulaBuilderSpanTitleSeparator) If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInFormulaBuilder
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.setFreezeFieldText
(String freezeFieldText) If we're showing aheaderContextMenu
for this grid andthis.canFreezeFields
is true, this string will be shown as the title for the menu item to freeze a currently unfrozen field.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.setFrozenFieldsMaxWidth
(Integer frozenFieldsMaxWidth) Maximum width available for anyfrozen fields
shown in this grid.setFrozenFieldsMaxWidth
(String frozenFieldsMaxWidth) Maximum width available for anyfrozen fields
shown in this grid.setFrozenHeaderBaseStyle
(String frozenHeaderBaseStyle) If this listGrid contains any frozen fields, this property can be used to apply a custom headerBaseStyle to the frozen set of fields.setFrozenHeaderTitleStyle
(String frozenHeaderTitleStyle) If this listGrid contains any frozen fields, this property can be used to apply a custom headerTitleStyle to the frozen set of fields.setFullRowRangeDisplayValue
(String fullRowRangeDisplayValue) Dynamic String specifying the format for therow range summary value
whenRowRangeDisplayStyle
is set to"full"
.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.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.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.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.setGridAdditionalCriteriaText
(String gridAdditionalCriteriaText) The additional criteria prefix to show in filter editor field hover, the filter action button or the sorter button before the descriptive version of thefilterWindowCriteria
, if any.setGridComponents
(ListGridComponent... gridComponents) Array of components that make up this grid.setGridComponents
(Object... gridComponents) Array of components that make up this grid.setGridSummaryRecordProperty
(String gridSummaryRecordProperty) IfshowGridSummary
is true, this attribute will be set to true on the record object representing the grid summary row.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.setGroupByField
(String groupByField) List of fields to group grid records.setGroupByField
(String... groupByField) List of fields to group grid records.setGroupByFieldSummaries
(String... groupByFieldSummaries) If this grid isgrouped
, andshowGroupSummary
is true, this attribute may be set to an array of groupBy field names for which group summaries should appear.setGroupByMaxRecords
(int groupByMaxRecords) Maximum number of records to which a groupBy can be applied.setGroupByMaxRecordsExceededMessage
(String groupByMaxRecordsExceededMessage) Warning shown to the user when a grouping attempt failed as the data set length exceedsgroupByMaxRecords
.setGroupByText
(String groupByText) If we're showing aheaderContextMenu
for this grid andthis.canGroupBy
is true, this string will be shown as the title for the menu item to toggle the group by setting for a field.setGroupIcon
(String groupIcon) The URL of the base icon for the group icons in this listGrid.setGroupIconSize
(int groupIconSize) Default width and height of group icons for this ListGrid.setGroupIconStyle
(String groupIconStyle) Custom style to apply to thegroupIcon
displayed in collapsible rows whencanGroupBy
is true.setGroupIndentSize
(int groupIndentSize) Default number of pixels by which to indent subgroups relative to parent group.setGroupLeadingIndent
(int groupLeadingIndent) Default number of pixels by which to indent all groups.setGroupNodeBaseStyle
(String groupNodeBaseStyle) Base style
forgroup
rows.setGroupNodeStyle
(String groupNodeStyle) The CSS style thatgroup
rows will have.setGroupSortDirection
(SortDirection groupSortDirection) WhensortByGroupFirst
is active, the sorting direction applied for implicit sorting by the field(s) used for grouping.void
setGroupSortNormalizer
(GroupSortNormalizer customizer) WhensortByGroupFirst
is active, sets theGroupNode
value normalizer used for implicit sorting by the field(s) used for grouping.void
setGroupStartOpen
(GroupStartOpen group) Describes the default state of ListGrid groups when groupBy is called.void
setGroupStartOpen
(Object... groupValues) setGroupState
(String groupState) Initial group state for the grid.setGroupSummaryRecordProperty
(String groupSummaryRecordProperty) IfshowGroupSummary
is true, this attribute will be set to true on each record object representing a group-level summary row.setGroupSummaryStyle
(String groupSummaryStyle) ListGridRecord.customStyle
for the group-level summary row displayed whenshowGroupSummary
is true.setGroupTitleColumnProperties
(ListGridField groupTitleColumnProperties) Custom properties for the automatically generatedgroupTitleColumn
.setGroupTitleField
(String groupTitleField) When a list grid isgrouped
, each group shows under an auto generated header node.setHeaderAriaRole
(String headerAriaRole) setHeaderAutoFitEvent
(AutoFitEvent headerAutoFitEvent) Event on a ListGrid header that triggers auto fitting to data and/or title.setHeaderBackgroundColor
(String headerBackgroundColor) BackgroundColor for the header toolbar.setHeaderBarStyle
(String headerBarStyle) Set the CSS style used for the header as a whole.setHeaderBaseStyle
(String headerBaseStyle) Button.baseStyle
to apply to the buttons in the header, and the sorter, for this ListGrid.setHeaderButtonAriaRole
(String headerButtonAriaRole) Defaultrole
forheader buttons
.setHeaderButtonAriaState
(Map headerButtonAriaState) DefaultARIA state
forheader buttons
.setHeaderButtonProperties
(Button headerButtonProperties) Properties to apply to all header buttons.setHeaderHeight
(int headerHeight) The height of this listGrid's header, in pixels.setHeaderHoverAlign
(Alignment headerHoverAlign) This property may be set to customize the alignment for the hover shown onListGrid.headerHover()
.void
setHeaderHoverFormatter
(HeaderHoverFormatter formatter) Provide a custom implementation ofheaderHoverHTML(int,java.lang.String)
.setHeaderHoverHeight
(Integer headerHoverHeight) Optional default height for the hover shown onListGrid.headerHover()
.setHeaderHoverOpacity
(Integer headerHoverOpacity) This property may be set to customize the opacity for the hover shown onListGrid.headerHover()
.setHeaderHoverStyle
(String headerHoverStyle) This property may be set to customize the css style for the hover shown onListGrid.headerHover()
.setHeaderHoverVAlign
(VerticalAlignment headerHoverVAlign) This property may be set to customize the vertical alignment for the hover shown onListGrid.headerHover()
.setHeaderHoverWidth
(Integer headerHoverWidth) Optional default width for the hover shown onListGrid.headerHover()
.setHeaderHoverWrap
(Boolean headerHoverWrap) This property may be set to customize thewrap
attribute for the hover shown onListGrid.headerHover()
.setHeaderMenuButtonHeight
(int headerMenuButtonHeight) IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
setHeaderMenuButtonHeight
(String headerMenuButtonHeight) IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
setHeaderMenuButtonIcon
(String headerMenuButtonIcon) IfshowHeaderMenuButton
is true, this property governs the icon shown on the auto-generatedheaderMenuButton
setHeaderMenuButtonIconHeight
(int headerMenuButtonIconHeight) IfshowHeaderMenuButton
is true, this property governs the height of the icon shown on the auto-generatedheaderMenuButton
setHeaderMenuButtonIconWidth
(int headerMenuButtonIconWidth) IfshowHeaderMenuButton
is true, this property governs the width of the icon shown on the auto-generatedheaderMenuButton
setHeaderMenuButtonSnapOffsetLeft
(Integer headerMenuButtonSnapOffsetLeft) Offset of the right edge of aheaderMenuButton
from the right edge of it's parent button.setHeaderMenuButtonWidth
(int headerMenuButtonWidth) IfshowHeaderMenuButton
is true, this property governs the width of the auto-generatedheaderMenuButton
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 theheader
, and to the right of thecorner sort-button
if it's visible, or the right of theheader
otherwise.setHeaderShadowColor
(String headerShadowColor) IfshowHeaderShadow
is true, theCanvas.shadowColor
for the header shadow.setHeaderShadowHOffset
(int headerShadowHOffset) IfshowHeaderShadow
is true, theCanvas.shadowHOffset
for the header shadowsetHeaderShadowSoftness
(int headerShadowSoftness) IfshowHeaderShadow
is true, theCanvas.shadowSoftness
for the header shadowsetHeaderShadowVOffset
(int headerShadowVOffset) IfshowHeaderShadow
is true, theCanvas.shadowVOffset
for the header shadowvoid
setHeaderSpanBaseStyle
(String name, String newStyle) Update theHeaderSpan.headerBaseStyle
for a span within the grid at runtime.void
setHeaderSpanButtonProperties
(String name, Canvas properties) Method to update properties on a headerSpan's header button at runtime.void
setHeaderSpanHeaderTitle
(String name, String newTitle) Update the headerTitle of aheaderSpan
dynamically.setHeaderSpanHeight
(Integer headerSpanHeight) Default height for aheaderSpan
with no height specified.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.void
setHeaderSpanTitle
(String name, String newTitle) Update the title of aheaderSpan
dynamically.void
setHeaderSpanTitleStyle
(String name, String newTitle) Update theHeaderSpan.headerTitleStyle
for a span within the grid at runtime.setHeaderTitleStyle
(String headerTitleStyle) StretchImgButton.titleStyle
to apply to the buttons in the header, and the sorter, for this ListGrid.setHeaderTitleVAlign
(VerticalAlignment headerTitleVAlign) Specifies vertical alignment in the column headers: "top", "center", or "bottom".setHideEmptySummaryRow
(Boolean hideEmptySummaryRow) If true, causes thesummaryRow
component to be hidden if it has no data after summaries have been recalculatedsetHideFilterEditorTitle
(String hideFilterEditorTitle) WhencanShowFilterEditor
is true, this is the title for the filterEditor show/hide menu-item, in theheaderContextmenu
, when the filterEditor is visible.void
setHideOnPhone
(ListGridField field, Boolean hideOnPhone) Updates theListGridField.hideOnPhone
attribute at runtime.void
setHideOnTablet
(ListGridField field, Boolean hideOnTablet) Updates theListGridField.hideOnTablet
attribute at runtime.setHiliteCanReplaceValue
(Boolean hiliteCanReplaceValue) If set, end users can create advanced hiliting rules that will use theHilite.replacementValue
feature to cause values in hilited cells to be replaced with a user-entered value.setHiliteEditorSpanTitleSeparator
(String hiliteEditorSpanTitleSeparator) If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInHiliteEditor
is true, this string will be inserted between the headerSpan title and the field title in the hiliteEditor field chooser grid.setHiliteHTMLAfterFormat
(boolean hiliteHTMLAfterFormat) If set to true, custom HTML applied as part of hiliting will be applied afterformatting
for each cell.setHiliteIconHeight
(Integer hiliteIconHeight) Height for hilite icons for this listGrid.setHiliteIconLeftPadding
(int hiliteIconLeftPadding) How much padding should there be on the left ofhilite icons
by default? Can be overridden at the field levelsetHiliteIconPosition
(HiliteIconPosition hiliteIconPosition) WhenhiliteIcons
are present, where the hilite icon will be placed relative to the field value.setHiliteIconRightPadding
(int hiliteIconRightPadding) How much padding should there be on the right ofhilite icons
by default? Can be overridden at the field levelsetHiliteIcons
(String... hiliteIcons) Specifies a list of icons that can be used inhilites
.setHiliteIconSize
(int hiliteIconSize) Default width and height ofhilite icons
for this component.setHiliteIconWidth
(Integer hiliteIconWidth) Width for hilite icons for this component.setHiliteProperty
(String hiliteProperty) Marker that can be set on a record to flag that record as hilited.setHiliteReplaceValueFieldTitle
(String hiliteReplaceValueFieldTitle) Title used for the text box shown whenhiliteCanReplaceValue
is set.setHiliteRowOnFocus
(Boolean hiliteRowOnFocus) When the grid body gets keyboard focus, should we highlight the current focus row, using the rollover cell style?setHilites
(Hilite[] hilites) Accepts an array of hilite objects and applies them to this DataBoundComponent.setHiliteState
(String hiliteState) Set the current hilites based on a hiliteState String previously returned from getHilitesState.setHiliteViaAIMode
(AIServiceMode hiliteViaAIMode) WhencanHiliteViaAI
istrue
, the AI service mode to use.setHiliteViaAIText
(String hiliteViaAIText) Title for the menu item displayed in this component's header context menu whenAI-assisted hiliting
is allowed.void
setHoverCustomizer
(HoverCustomizer hoverCustomizer) HTML to be shown in hovers over cells in the column described by this field.setHoverMode
(HoverMode hoverMode) WhenshowHoverComponents
is true, the builtin mode to use when automatically creating a hover component for rows in this grid.setHoverScreen
(String hoverScreen) Screen to create (viacreateScreen()
) in lieu of callinggetHoverComponent()
orgetCellHoverComponent()
.setHoverStyle
(String hoverStyle) Style to apply to hovers shown over this grid.setIconCursor
(Cursor iconCursor) Default cursor to display when the user rolls over icons within cells of antype:icon
field.setIconPadding
(Integer iconPadding) When usingautoFitFieldWidths
, padding in pixels left on each side of fields that show images.setImageSize
(int imageSize) Default size of thumbnails shown for fieldTypes image and imageFile.setImplicitCriteria
(Criteria implicitCriteria) Criteria that are never shown to or edited by the user and are cumulative with any criteria provided viaDataBoundComponent.initialCriteria
,DataBoundComponent.setCriteria()
etc.setImplicitCriteria
(Criteria implicitCriteria, DSCallback callback) setImplicitCriteria
(Criteria criteria, DSCallback callback, Boolean initialFetch) void
setInactiveCellFormatter
(CellFormatter formatter) Formatter for inactive content.setIncludeHilitesInSummaryFields
(boolean includeHilitesInSummaryFields) When assembling a value for asummary field
, if a referenced field is hilited, should the hilite HTML be included in the summary field value?setIncludeInSummaryProperty
(String includeInSummaryProperty) Property name on a record that will be checked to determine whether a record should be included when calculating totals for thegrid summary
.setInitialCriteria
(Criteria initialCriteria) Criteria to use whenDataBoundComponent.setAutoFetchData(Boolean)
is used.setInitialSort
(SortSpecifier... initialSort) An array ofSortSpecifier
objects used to set up the initial sort configuration for this grid.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.setInvalidSummaryValue
(String invalidSummaryValue) Value to display to the user if showing summary values (throughshowGridSummary
,showGroupSummary
orlistGridFieldType:"summary"
), and the summary function returns"null"
(implying it was unable to calculate a valid summary value).setIsSeparatorProperty
(String isSeparatorProperty) Ifrecord[this.isSeparatorProperty]
is set for some record, the record will be displayed as a simple separator row.setLastCellStyle
(String lastCellStyle) The style to apply to the last cell in each row, whenstyledRowEnds
is true.setLeaveHeaderMenuButtonSpace
(Boolean leaveHeaderMenuButtonSpace) IfshowHeaderMenuButton
is true, when auto-fitting fields to the title width viaautoFitFieldWidths
orListGridField.autoFitWidth
, should the button be sized such that there is enough space for the header menu button to show without covering the field title?setLeaveScrollbarGap
(Boolean leaveScrollbarGap) Whether to leave a gap for the vertical scrollbar, even when it's not present.setLinkTextProperty
(String linkTextProperty) Property name on a record that will hold the link text for that record.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.setLoadingDataMessage
(String loadingDataMessage) The string to display in the body of a listGrid while data is being loaded.setLoadingDataMessageStyle
(String loadingDataMessageStyle) The CSS style name applied to the loadingDataMessage string if displayed.setLoadingMessage
(String loadingMessage) 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.setLoadingRowCountDisplayIcoHeight
(int loadingRowCountDisplayIcoHeight) Height for theloadingRowCountDisplayIcon
setLoadingRowCountDisplayIcon
(String loadingRowCountDisplayIcon) The URL of the icon to display as arow count value
when the row count is loading.setLoadingRowCountDisplayIconWidth
(int loadingRowCountDisplayIconWidth) Width for theloadingRowCountDisplayIcon
setLocateColumnsBy
(String locateColumnsBy) WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.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.setLocateRowsBy
(String locateRowsBy) WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.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.Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.setLongTextEditorThreshold
(int longTextEditorThreshold) When the length of the field specified byDataSourceField.length
exceeds this value, the ListGrid shows an edit field of typelongTextEditorType
rather than the standard text field when the field enters inline edit mode.setLongTextEditorType
(String longTextEditorType) When the length of the field specified byDataSourceField.length
exceedsthis.longTextEditorThreshold
show an edit field of this type rather than the standard text field when the field enters inline edit mode.setMaxExpandedRecords
(Integer maxExpandedRecords) WhencanExpandRecords
andcanExpandMultipleRecords
are both true, this property dictates the number of records which can be expanded simultaneously.setMaxExpandedRecordsPrompt
(String maxExpandedRecordsPrompt) This is a dynamic string - text within${...}
will be evaluated as JS code when the message is displayed.setMaximumRowCountFormat
(String maximumRowCountFormat) setMaxSummaryRowRecords
(Integer maxSummaryRowRecords) IfshowGridSummary
is true, and summary records are being derived from a fetch against thesummaryRowDataSource
, this property may be set to specify the maximum expected number of results from the fetch opeeration.setMinFieldWidth
(int minFieldWidth) Minimum size, in pixels, for ListGrid headers.setMinHeight
(int minHeight) Sets theminimum height
for the entire list (smaller than this doesn't tend to work very well).setMinimumCellHeight
(int minimumCellHeight) 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.setMinimumRowCountFormat
(String minimumRowCountFormat) setMissingSummaryFieldValue
(String missingSummaryFieldValue) If a summary format string contains an invalid field reference, replace the reference with the missingSummaryFieldValue.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.setMultiGroupDialogDefaults
(MultiGroupDialog multiGroupDialogDefaults) Class-level defaults to apply to theMultiGroupDialog
which gets automatically generated whenconfigureGrouping()
is called.setMultiGroupDialogProperties
(MultiGroupDialog multiGroupDialogProperties) Properties to apply to theMultiGroupDialog
which gets automatically generated whenconfigureGrouping()
is called.void
setMultiSortDialogDefaults
(MultiSortDialog multiSortDialogDefaults) Class level defaults to apply to theMultiSortDialog
which gets automatically generated when askForSort() is called.void
setMultiSortDialogProperties
(MultiSortDialog multiSortDialogProperties) Properties to apply to theMultiSortDialog
which gets automatically generated when askForSort() is called.setNavigateOnTab
(Boolean navigateOnTab) IfcanSelectCells
is true, this property allows the user to navigate through the cells of a grid using Tab and Shift+Tab keypresses.setNeverValidate
(Boolean neverValidate) If true, validation will not occur as a result of cell editing for this grid.setNewRecordRowMessage
(String newRecordRowMessage) 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.setNewSearchText
(String newSearchText) Text to show for saving the current view as a new "saved search".setNormalBaseStyle
(String normalBaseStyle) "Normal" baseStyle for this listGrid.setNormalCellHeight
(int normalCellHeight) IfbaseStyle
is unset, base style will be derived fromnormalBaseStyle
if this grid has fixed row heights and the specifiedcellHeight
matches this value.setNoSavedSearchesText
(String noSavedSearchesText) Text to show in menu listing saved searches when there are no saved searches.setNullGroupTitle
(String nullGroupTitle) Default alias to use for groups with no valuesetOfflineMessageStyle
(String offlineMessageStyle) The CSS style name applied to theofflineMessage
if displayed.setOriginBaseStyle
(String originBaseStyle) Name of a CSS Style to use as thebaseStyle
for a cell that is currently a selection origin for shifted incremental cell selection.setOverflow
(Overflow overflow) setPendingAsyncCellValue
(String pendingAsyncCellValue) The value to display for cells whose value is pending asynchronous computation.setPlaceholderAIHoverContents
(String placeholderAIHoverContents) Message to show in the hover while AI-generated hover text is being retrieved for fields specifying anaiHoverRequest
.setPoolComponentsPerColumn
(Boolean poolComponentsPerColumn) Should recycledrecord components
, be pooled per column or per record.setPreserveFocusStylingOnMouseOut
(Boolean preserveFocusStylingOnMouseOut) IfshowRollOver
orhiliteRowOnFocus
is true the current keyboard focus row for navigation via arrow keys, etc, will be hilighted with"Over"
styling.setPreserveWhitespace
(Boolean preserveWhitespace) Should cells be written out with css that will preserve whitespace?setPreventDuplicates
(Boolean preventDuplicates) If set, detect and prevent duplicate records from being transferred to this component, either via
 drag and drop or viaDataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
.setPrintAutoFit
(Boolean printAutoFit) Whether cell contents should wrap during printing.setPrintBaseStyle
(String printBaseStyle) Style for non-header cells in printed output.setPrintBooleanBaseStyle
(String printBooleanBaseStyle) If set, thebooleanBaseStyle
to use whenprinting
.setPrintBooleanFalseImage
(String printBooleanFalseImage) If set, thebooleanFalseImage
to use whenprinting
.setPrintBooleanPartialImage
(String printBooleanPartialImage) If set, thebooleanPartialImage
to use whenprinting
.setPrintBooleanTrueImage
(String printBooleanTrueImage) If set, thebooleanTrueImage
to use whenprinting
.setPrintCheckboxFieldFalseImage
(String printCheckboxFieldFalseImage) If set, thecheckboxFieldFalseImage
to use whenprinting
.setPrintCheckboxFieldPartialImage
(String printCheckboxFieldPartialImage) If set, thecheckboxFieldPartialImage
to use whenprinting
.setPrintCheckboxFieldTrueImage
(String printCheckboxFieldTrueImage) If set, thecheckboxFieldTrueImage
to use whenprinting
.setPrintHeaderStyle
(String printHeaderStyle) Style for header cells in printed output.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.setPrintWrapCells
(Boolean printWrapCells) Whether cell contents should wrap during printing.setProgressiveLoading
(Boolean progressiveLoading) Indicates whether or not this component will load its dataprogressively
setQuickDrawAheadRatio
(float quickDrawAheadRatio) Alternative todrawAheadRatio
, to be used when the user is rapidly changing the grids viewport (for example drag scrolling through the grid).setRangeRowCountFormat
(String rangeRowCountFormat) setRecordBaseStyleProperty
(String recordBaseStyleProperty) This attribute allows custom base styles to be displayed on a per-record basis.setRecordCanRemoveProperty
(String recordCanRemoveProperty) If set to false on a record andcanRemoveRecords
is true, removal of that record is disallowed in the UI.setRecordCanSelectProperty
(String recordCanSelectProperty) If set to false on a record, selection of that record is disallowed.setRecordCellRoleProperty
(String recordCellRoleProperty) If this property is set on a record it will designate the WAI ARIA role for cells within this records rowsetRecordComponentHeight
(Integer recordComponentHeight) IfshowRecordComponents
is true, this attribute may be used to specify a standard height for record components.setRecordComponentPoolingMode
(RecordComponentPoolingMode recordComponentPoolingMode) The method ofcomponent-pooling
to employ forrecordComponents
.setRecordComponentPosition
(EmbeddedPosition recordComponentPosition) ifshowRecordComponents
is true, how should the component appear within the cell.setRecordDetailDSProperty
(String recordDetailDSProperty) The name of the ListGridRecord property that specifies the DataSource to use whenlistGrid.expansionMode
is "related".setRecordDropAppearance
(RecordDropAppearance recordDropAppearance) IfcanAcceptDroppedRecords
is true for this listGrid, this property governs whether the user can drop between, or over records within the grid.setRecordEditProperty
(String recordEditProperty) Property name on a record that should be checked to determine whether the record may be edited.setRecordEnabledProperty
(String recordEnabledProperty) Property name on a record that will be checked to determine whether a record is enabled.setRecordRadius
(String recordRadius) When set to any valid CSS border-radius string, allows for rounded records in this grid by havinggetCellCSSText()
apply a corner-radius to the first and last cells in each record.setRecordRadiusTargets
(RecordType... recordRadiusTargets) Array ofRecordTypes
that should be rounded whenrecordRadius
is set to a valid CSS border-radius string.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.setRecordRowRoleProperty
(String recordRowRoleProperty) If this property is set on a record it will designate the WAI ARIA role for this record's row.void
setRecords
(ListGridRecord[] records) Synonym forsetData(ListGridRecord[])
setRecordScreen
(String recordScreen) Screen to create (viacreateScreen()
) in lieu of callinggetRecordComponent()
.setRecordShowRollOverProperty
(String recordShowRollOverProperty) Name of the property that can be set on a per-record basis to disabled rollover for an individual record whenshowRollOver
is true.setRecordSummaryAttributePrefix
(String recordSummaryAttributePrefix) setRecordSummaryBaseStyle
(String recordSummaryBaseStyle) If showing any record summary fields (IE: fields oftype:"summary"
), this attribute specifies a custom base style to apply to cells in the summary fieldsetRemovedCSSText
(String removedCSSText) Custom CSS text to be applied to records that have beenmarked for removal
.setRemoveFieldProperties
(ListGridField removeFieldProperties) Configuration properties for the "remove field" displayed whencanRemoveRecords
is enabled.setRemoveFieldTitle
(String removeFieldTitle) The title to use for theremove field
.setRemoveIcon
(String removeIcon) WhencanRemoveRecords
is enabled, default icon to show in the auto-generated field that allows removing records.setRemoveIconSize
(int removeIconSize) Default width and height ofremove icons
for this ListGrid.setRemoveIconStyle
(String removeIconStyle) Custom style to apply to the image in theremoveField
displayed in rows whencanRemoveRecords
is true.setRemoveOperation
(String removeOperation) operationId
this component should use when performing remove operations.setReselectOnUpdate
(boolean reselectOnUpdate) If true, when an update operation occurs on a selected record in adatabound
listGrid, ensure the updated record is re-selected when the operation completes.setReselectOnUpdateNotifications
(SelectionNotificationType reselectOnUpdateNotifications) ifreselectOnUpdate
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.setResizeFieldsInRealTime
(boolean resizeFieldsInRealTime) Iftrue
, the grid contents are redrawn in real time as fields are resized.setReverseRTLAlign
(Boolean reverseRTLAlign) If a page is rendered inRTL mode
, should cell alignments specifiedListGridField.cellAlign
be reversed (so analign:"right"
field will have content aligned on the left and vice versa)?void
setRollOverCanvasProperties
(Canvas rollOverCanvasProperties) Properties to apply to the auto-generatedrollOverCanvas
AutoChild when its use is enabled.void
setRollUnderCanvasProperties
(Canvas rollUnderCanvasProperties) Properties to apply to the auto-generatedrollUnderCanvas
AutoChild when its use is enabled.setRotatedHeaderMenuButtonHeight
(int rotatedHeaderMenuButtonHeight) IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
over arotated
header button.setRotatedHeaderMenuButtonHeight
(String rotatedHeaderMenuButtonHeight) IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
over arotated
header button.setRotatedHeaderMenuButtonWidth
(int rotatedHeaderMenuButtonWidth) IfshowHeaderMenuButton
is true, this property governs the width of the auto-generatedheaderMenuButton
over arotated
header button.setRotateHeaderTitles
(Boolean rotateHeaderTitles) Whether to rotate the field titles so they're rendered vertically from bottom to top.setRowAriaState
(Map rowAriaState) Returns a mapping of default WAI ARIA attributes for rows within this listGrid.setRowCountDisplayPrecision
(Integer rowCountDisplayPrecision) When an exactrow count
is not known due to progressive loading, this attribute allows the formatted row count returned bygetFormattedRowCount()
and ultimately displayed in therowRangeDisplay label
to be rounded to a multiple of the specified value.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.void
setRowErrors
(int rowNum, Object errors) Set the validation errors for some row (replacing any pre-existent validation errors)void
setRowErrors
(int rowNum, Map errors) Set the validation errors for some row (replacing any pre-existent validation errors)setRowLocatorField
(String rowLocatorField) IflocateRowsBy
has been set to "cellValue", this property may be used to specify which field's cell value to use.setRowLocatorField
(String... rowLocatorField) IflocateRowsBy
has been set to "cellValue", this property may be used to specify which field's cell value to use.void
setRowNumberFieldProperties
(ListGridField rowNumberFieldProperties) Set the properties generated field that displays the current row number whenshowRowNumbers
is true.setRowNumberStart
(int rowNumberStart) The number to start the row-count from - default value is 1.setRowNumberStyle
(String rowNumberStyle) The CSS Style name for therowNumberField
.setRowRangeDisplayStyle
(RowRangeDisplayStyle rowRangeDisplayStyle) How should thegetFormattedRowRange()
format the row range and row count for display to the user?setRowRangeFormat
(String rowRangeFormat) Dynamic String specifying the format for thevisible row range
.setRowRole
(String rowRole) Returns the default WAI ARIA role for rows within this listGrid.setRowSpanEditMode
(RowSpanEditMode rowSpanEditMode) IfallowRowSpanning
is enabled, this property may be used to specify editing behavior for cells that span multiple rows.setRowSpanSelectionMode
(RowSpanSelectionMode rowSpanSelectionMode) Chooses the selection mode whenuseRowSpanStyling
is enabled.setSaveByCell
(Boolean saveByCell) Whether edits should be saved whenever the user moves between cells in the current edit row.setSaveCriteriaInViewState
(Boolean saveCriteriaInViewState) Should the currentfilter-criteria
be included along with other details when saving this grid'sview-state
?setSaveDefaultSearch
(boolean saveDefaultSearch) Saves the name of the default search to localStorage, under the key "sc_defaultSearch:" + minimal locator.setSavedSearchAdminRole
(String savedSearchAdminRole) Override ofSavedSearches.adminRole
for this component.setSavedSearchDS
(String savedSearchDS) Override ofSavedSearches.defaultDataSource
for this component.setSavedSearchId
(String savedSearchId) Optional identifier for saved searches that should be applied to this component.setSavedSearchStoredState
(SavedSearchStoredState savedSearchStoredState) Set to "criteria" if you want only criteria to be stored for ListGrids and TreeGrids instead of the full viewState of the component.setSavedSearchText
(String savedSearchText) Text to show for the saved searches submenu.setSaveLocally
(Boolean saveLocally) For grids with a specifieddataSource
, this property can be set totrue
to cause the grid directly update its local data set instead of performing an operation against it's configured DataSource.setSaveRequestProperties
(DSRequest saveRequestProperties) For editable grids with a specifieddataSource
, wheresaveLocally
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).setScreenReaderCellSeparator
(String screenReaderCellSeparator) Special cell-separator that may be inserted between cell values when screen-readers are reading the content of a row.setScreenReaderIncludeFieldTitles
(Boolean screenReaderIncludeFieldTitles) 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 withariaRole:"list"
.setScreenReaderNavigateByCell
(boolean screenReaderNavigateByCell) Ifscreen reader mode is enabled
, andcanSelectCells
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?setScreenReaderRowSeparator
(String screenReaderRowSeparator) Special row-separator that may be inserted at the end of the row value when screen-readers are reading the content of a row.setScreenReaderWriteRowLabelledBy
(Boolean screenReaderWriteRowLabelledBy) Whenscreen reader mode
is enabled, for grids withariaRole
set to"list"
, should a custom aria-labelledby attribute be written out in addition to any otherrow aria properties
to ensure thecolumn titles
,screenReaderCellSeparator
andscreenReaderRowSeparator
are read out along with cell content when reading rows?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.setScrollToCellXPosition
(Alignment scrollToCellXPosition) When scrollToCell is called, this is used as defaults if xPosition weren't explicitly passed into the method.setScrollToCellYPosition
(VerticalAlignment scrollToCellYPosition) When scrollToCell is called, this is used as defaults if yPosition weren't explicitly passed into the method.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.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 theFilterEditor
orFilter Window
.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 theFilterEditor
orFilter Window
.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.setSelectedState
(String selectedState) Returns a snapshot of the current selection within this listGrid as aListGridSelectedState
object.
This object can be passed tosetSelectedState()
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 theListGridSelectedState
object passed in.
Used to restore previous state retrieved from the grid by a call togetSelectedState()
.setSelectHeaderOnSort
(Boolean selectHeaderOnSort) If true, show the field-header for the sorted field (or the first field in amulti-sort
grid) in the selected state.setSelectionAppearance
(SelectionAppearance selectionAppearance) How selection of rows should be presented to the user.void
setSelectionCanvasProperties
(Canvas selectionCanvasProperties) Properties to apply to the auto-generatedselectionCanvas
AutoChild when its use is enabled.setSelectionProperty
(String selectionProperty) If specified, the selection object for this list will use this property to mark records as selected.setSelectionType
(SelectionStyle selectionType) Defines a listGrid's clickable-selection behavior.void
setSelectionUnderCanvasProperties
(Canvas selectionUnderCanvasProperties) Properties to apply to the auto-generatedselectionUnderCanvas
AutoChild when its use is enabled.setSelectOnEdit
(Boolean selectOnEdit) When the user starts editing a row, should the row also be selected?setSelectOnExpandRecord
(boolean selectOnExpandRecord) When set to false, clicking a record'sexpansion field
will not add the record to the current selection.setSeparatorRowStyle
(String separatorRowStyle) CSS class to apply to rows marked asseparators
in this grid.setShowAllColumns
(Boolean showAllColumns) Whether all columns should be drawn all at once, or only columns visible in the viewport.setShowAllRecords
(Boolean showAllRecords) Whether all records should be drawn all at once, or only records visible in the viewport.setShowAsynchGroupingPrompt
(Boolean showAsynchGroupingPrompt) If set to false, do not show theasynchGroupingPrompt
dialog duringasynchronous grouping
.setShowBackgroundComponents
(Boolean showBackgroundComponents) Iftrue
this grid will create and show per-row backgroundComponents as detailedhere
.setShowCellContextMenus
(Boolean showCellContextMenus) Whether to show a context menu with standard items for all context clicks on rows in the body.setShowClippedHeaderTitlesOnHover
(boolean showClippedHeaderTitlesOnHover) If true and a header button's title is clipped, then a hover containing the full field title is enabled.setShowClippedValuesOnHover
(Boolean showClippedValuesOnHover) If true and a cell's value is clipped, then a hover containing the full cell value is enabled.setShowCollapsedGroupSummary
(Boolean showCollapsedGroupSummary) Should group summaries be visible when the group is collapsed?setShowComplexFields
(Boolean showComplexFields) Whether to show fields of non-atomic types when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.
setShowDetailFields
(Boolean showDetailFields) Whether to include fields markeddetail:true
from this component'sDataSource
.setShowDropLines
(Boolean showDropLines) Controls whether to show a drop-indicator during a drag and drop operation.setShowEllipsisWhenClipped
(boolean showEllipsisWhenClipped) Should ellipses be displayed when cell content is clipped? May be overridden at the field level viaListGridField.showEllipsisWhenClipped
setShowEmptyMessage
(Boolean showEmptyMessage) Indicates whether the text of the emptyMessage property should be displayed if no data is available.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?setShowFilterEditor
(boolean showFilterEditor) Should this listGrid display a filter row.setShowFilterEditorHovers
(Boolean showFilterEditorHovers) When set to false, no hover is shown for the filter editor fields.setShowFilterEditorTitle
(String showFilterEditorTitle) WhencanShowFilterEditor
is true, this is the title for the filterEditor show/hide menu-item, in theheaderContextmenu
, when the filterEditor is hidden.setShowFilterWindowCriteriaIndicator
(Boolean showFilterWindowCriteriaIndicator) Should an indicator be shown to indicate thatfilterWindowCriteria
is configured? The indicator is a small triangle shown in the top-right of the grid header or filter.setShowGridSummary
(Boolean showGridSummary) Should this ListGrid show a summary row beneath the last record of the grid.setShowGroupSummary
(Boolean showGroupSummary) If this listGrid supportsgrouping
, 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.setShowGroupSummaryInHeader
(Boolean showGroupSummaryInHeader) If this grid isgrouped
, andshowGroupSummary
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.setShowGroupTitleColumn
(Boolean showGroupTitleColumn) If this grid isgrouped
andshowGroupSummaryInHeader
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.setShowGroupTitleInFrozenBody
(boolean showGroupTitleInFrozenBody) If this isgrouped
and hasfrozen fields
, should the group title show in the frozen or unfrozen body?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.setShowHeaderContextMenu
(Boolean showHeaderContextMenu) Whether to show a context menu on the header with standard items for showing and hiding fields.setShowHeaderMenuButton
(Boolean showHeaderMenuButton) If set to true andshowHeaderContextMenu
is true, theheaderMenuButton
will be displayed when the user rolls over the header buttons in this grid.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 whencanSelectAll
is enabled and at least one record is selected but all records are not selected.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.setShowHeaderSpanContextMenu
(Boolean showHeaderSpanContextMenu) Whether to show a context menu on the header span with standard items for showing and hiding fields.setShowHeaderSpanTitlesInFormulaBuilder
(Boolean showHeaderSpanTitlesInFormulaBuilder) If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using the FormulaBuilder or SummaryBuilder.setShowHeaderSpanTitlesInHiliteEditor
(Boolean showHeaderSpanTitlesInHiliteEditor) If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using thehilite editor
.setShowHeaderSpanTitlesInSortEditor
(Boolean showHeaderSpanTitlesInSortEditor) If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using themulti-sort editor
.setShowHiddenFields
(Boolean showHiddenFields) Whether to show fields markedhidden:true
when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.
setShowHilitesInGroupSummary
(boolean showHilitesInGroupSummary) Determines whether hiliting for any field in this grid is shown in a group summary.setShowHover
(Boolean showHover) If true, andcanHover
is also true, shows popup hover text next to the mouse when the user hovers over a cell.setShowHoverComponents
(Boolean showHoverComponents) When set to true and canHover is also true, shows a widget hovering at the mouse point.setShowHoverOnDisabledCells
(boolean showHoverOnDisabledCells) IfshowHover
is true, should cell hover HTML be displayed on disabled cells?setShowInitialDragHandles
(Boolean showInitialDragHandles) When set to true, shows thedrag handle field
on initial draw.setShowNewRecordRow
(Boolean showNewRecordRow) If this is an editable ListGrid, setting this property to true causes an extra row with thenewRecordRowMessage
to be displayed below the last record.setShowPartialSelection
(Boolean showPartialSelection) Should partially selected parents (in a Tree data set) be shown with special icon? This has an impact in grouped grids wherecanSelectGroups
is true.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.setShowRecordComponentsByCell
(Boolean showRecordComponentsByCell) If true, showsrecordComponents
in cells, rather than just in records.setShowRollOver
(Boolean showRollOver) Should we show different styling for the cell the mouse is over?setShowRollOverCanvas
(Boolean showRollOverCanvas) When enabled, when the mouse moves over a row or cell (depending onuseCellRollOvers
), an arbitrary Canvas can be shown layered on top of the row or cell (therollOverCanvas
), layered underneath the row or cell (therollUnderCanvas
), or both.setShowRollOverInExpansion
(Boolean showRollOverInExpansion) This setting causes theroll over canvas
to be sized to cover the normal row and the expansion layout.setShowRollUnderCanvas
(Boolean showRollUnderCanvas) If roll overs are enabled, should therollUnderCanvas
be displayed?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.setShowSavedSearchesByDS
(boolean showSavedSearchesByDS) Whether to associate saved searches by default with the currentDataSource
of a component when asavedSearchId
is not provided.setShowSelectedRollOverCanvas
(Boolean showSelectedRollOverCanvas) This setting causes theroll over canvas
to be displayed when the user rolls over selected records in the grid (but not when rolling over other records).setShowSelectedRollUnderCanvas
(Boolean showSelectedRollUnderCanvas) This setting causes theroll under canvas
to be displayed when the user rolls over selected records in the grid (but not when rolling over other records).setShowSelectedStyle
(Boolean showSelectedStyle) Should the "Selected" style be applied to selected records?setShowSelectionCanvas
(Boolean showSelectionCanvas) IfselectionType
is set toSelectionStyle.SINGLE
, setting this property totrue
means selection will be displayed to the user with theselectionCanvas
and/orselectionUnderCanvas
rather than with CSS styling.setShowSelectionUnderCanvas
(Boolean showSelectionUnderCanvas) IfselectionType
is set toSelectionStyle.SINGLE
, and eithershowSelectionCanvas
istrue
andshowSelectionUnderCanvas
is unset, orshowSelectionUnderCanvas
is explicitly set totrue
, then selection will be displayed to the user with theselectionCanvas
and/orselectionUnderCanvas
rather than with CSS styling.setShowSortArrow
(SortArrow showSortArrow) Indicates whether a sorting arrow should appear for the listGrid, and its location.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.setShowTreeColumnPicker
(Boolean showTreeColumnPicker) WhenheaderSpans
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 aTreeGrid
displays a Tree.setShrinkForFreeze
(Boolean shrinkForFreeze) If this list grid is showing anyfrozen
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 totrue
any backgroundColor or border applied to the ListGrid will show up below the bottom row of the frozen column(s).setSingleCellValueProperty
(String singleCellValueProperty) Ifrecord[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 ofrecord[this.singleCellValueProperty]
.setSkinImgDir
(String skinImgDir) Where do 'skin' images (those provided with the class) live?setSkipLineBreaks
(Boolean skipLineBreaks) Whether to skip line breaks for all fields by default whenescaping HTML
.setSort
(SortSpecifier... sortSpecifiers) Sort the grid on one or more fields.setSortArrowMenuButtonSpaceOffset
(int sortArrowMenuButtonSpaceOffset) WhenleaveHeaderMenuButtonSpace
is true, configures the amount of space beyond theheaderMenuButtonWidth
on the right side of a ListGrid header button (left forRTL mode
) to reserve for the sort arrow if sorting is active for that field and the arrow will be shown.setSortAscendingImage
(ImgHTMLProperties sortAscendingImage) Image to show when sorted in ascending order.setSortAscendingImage
(String sortAscendingImage) Image to show when sorted in ascending order.setSortBinaryByFileName
(boolean sortBinaryByFileName) For any fields oftype "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 theBinaryFields
overview.setSortByGroupFirst
(Boolean sortByGroupFirst) If set, whenever grouping is performed by an end user or by a programmatic call togroupBy()
, data is implicitly sorted by all of the grouped columns, in the order they were passed to groupBy.setSortDescendingImage
(ImgHTMLProperties sortDescendingImage) Image to show when sorted in descending order.setSortDescendingImage
(String sortDescendingImage) Image to show when sorted in descending order.setSortDirection
(SortDirection sortDirection) Sorting direction of this ListGrid.setSortEditorSpanTitleSeparator
(String sortEditorSpanTitleSeparator) If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInSortEditor
is true, this string will be inserted between the headerSpan title(s) and the field title in the field chooser grid on themulti-sort editor
setSorterButtonTitle
(String sorterButtonTitle) The title for the corner sort button.void
setSortField
(int fieldIndex) Specifies the field by which this grid should be initially sorted.setSortField
(Integer sortField) Specifies the field by which this grid should be initially sorted.setSortField
(String sortField) Specifies the field by which this grid should be initially sorted.setSortFieldAscendingText
(String sortFieldAscendingText) If we're showing aheaderContextMenu
for this grid, this attribute will be shown as the menu item title to sort a field in ascending order.setSortFieldDescendingText
(String sortFieldDescendingText) If we're showing aheaderContextMenu
for this grid, this attribute will be shown as the menu item title to sort a field in descending order.void
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.setSortNumeralMenuButtonSpaceOffset
(int sortNumeralMenuButtonSpaceOffset) WhenleaveHeaderMenuButtonSpace
is true, configures the amount of space beyond theheaderMenuButtonWidth
on the right side of a ListGrid header button (left forRTL mode
) to reserve for the sort numeral ifmulti-sorting
is active for that field and the numeral will be shown.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.setSortState
(String sortState) Initial sort state for the grid.setSpannedHeaderBaseStyle
(String spannedHeaderBaseStyle) Button.baseStyle
to apply to the field header buttons for this ListGrid when showing header spans.setSparseFieldState
(Boolean sparseFieldState) If true,getFieldState()
andsetFieldState(java.lang.String)
will omit state information for hidden fields by default.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.setStyledRowEnds
(Boolean styledRowEnds) When set to true, the first and last cells in each row will be styled with an additional CSS class, via thefirstCellStyle
andlastCellStyle
attributes.void
setStyleName
(String styleName) Default CSS class for the ListGrid as a whole.setSummaryRowCriteria
(Criteria summaryRowCriteria) IfshowGridSummary
is true, and asummaryRowDataSource
is specified this property may be used to specify fetch criteria to apply when retrieving summary data to show in the summary row.setSummaryRowDataSource
(DataSource summaryRowDataSource) IfshowGridSummary
is true, by default summary values are calculated on the client based on the current data-set for the grid (seegetGridSummary()
andgetGridSummaryFunction()
).setSummaryRowFetchRequestProperties
(DSRequest summaryRowFetchRequestProperties) IfshowGridSummary
is true, and asummaryRowDataSource
is specified this property may be used to customize the fetch request used when retrieving summary data to show in the summary row.setSummaryRowHeight
(int summaryRowHeight) Default height for thesummary row autoChild
.setSummaryRowStyle
(String summaryRowStyle) baseStyle
for thesummaryRow
setTableRowStyle
(String tableRowStyle) The style to apply to <TR> tags in this grid's table.setTallBaseStyle
(String tallBaseStyle) "Tall" baseStyle for this listGrid.setTitleField
(String titleField) Sets the best field to use for a user-visible title for an individual record from this component.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.setTrackerImage
(ImgHTMLProperties trackerImage) Default image to use for the dragTracker when things are dragged within or out of this list.setTrackerImage
(String trackerImage) Default image to use for the dragTracker when things are dragged within or out of this list.setUnfreezeFieldText
(String unfreezeFieldText) If we're showing aheaderContextMenu
for this grid andthis.canFreezeFields
is true, this string will be shown as the title for the menu item to unfreeze a currently frozen field.setUngroupText
(String ungroupText) If we're showing aheaderContextMenu
for this grid, andthis.isGrouped
is true, this attribute will be shown as the title for the menu item to ungroup the grid.setUnknownRowCountDisplayValue
(String unknownRowCountDisplayValue) Value to return fromgetFormattedRowCount()
when the row count is unknownsetUnremoveIcon
(String unremoveIcon) WhencanRemoveRecords
is enabled, this icon will be shown in the auto generated field fro removing records if the record has been marked as removed viamarkRecordRemoved()
.setUpdateOperation
(String updateOperation) operationId
this component should use when performing update operations.setUpdateSummariesDuringEditing
(boolean updateSummariesDuringEditing) Should thesummary row
orgroup summaries
be updated during editing of grid records? This can be set false to improve performance when a large number ofListGridFields
orDataSourceFields
are present for the grid.setUseAdvancedCriteria
(Boolean useAdvancedCriteria) Should thefilter-editor
in this grid always produceAdvancedCriteria
?setUseAdvancedFieldPicker
(Boolean useAdvancedFieldPicker) If set to true, an advanced field picker based on theFieldPicker
will be shown instead of the column picker submenu if there are more fields in the grid thanadvancedFieldPickerThreshold
.setUseAllDataSourceFields
(Boolean useAllDataSourceFields) If true, the set of fields given by the "default binding" (see 
fields
) is used, with any fields specified in
component.fields
acting as overrides that can suppress or modify the
 display of individual fields, without having to list the entire set of fields that
 should be shown.
setUseCellRollOvers
(Boolean useCellRollOvers) Are rollovers cell-level or row-level?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.setUseCopyPasteShortcuts
(Boolean useCopyPasteShortcuts) For ListGrids withcanSelectCells:true
, enabling this property will cause the listGrid to intercept standard browser copy/paste shortcut keys and perform the following behavior.setUseFlatFields
(Boolean useFlatFields) TheuseFlatFields
flag causes all simple type fields anywhere in a nested
 set of DataSources to be exposed as a flat list for form binding.setUseMultiSelectForFilterValueMaps
(boolean useMultiSelectForFilterValueMaps) IfshowFilterEditor
is true, when creating a SelectItem for editing criteria for a field with a ValueMap, should the SelectItem default tomultiple:true
?void
setUserAIFilterRequest
(UserAIRequest userAIFilterRequest) If filter-via-AI is enabled (seefilterViaAIMode
), this utility method first callsAI.buildCriterion()
to buildAdvancedCriteria
for the user's request, then sets this grid's filter criteria.void
setUserAIFilterRequest
(UserAIRequest userAIFilterRequest, BuildCriterionRequest buildRequestProperties) void
setUserAIFilterRequest
(UserAIRequest userAIFilterRequest, BuildCriterionRequest buildRequestProperties, BuildCriterionResponseCallback callback) If filter-via-AI is enabled (seefilterViaAIMode
), this utility method first callsAI.buildCriterion()
to buildAdvancedCriteria
for the user's request, then sets this grid's filter criteria.void
setUserCriteriaState
(String userCriteriaState) Reset this grid's user-criteria to match theListGridUserCriteriaState
object passed in.setUseRemoteValidators
(Boolean useRemoteValidators) IfsaveLocally
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 totrue
to ensure these remote validators are called when saving edits in saveLocally mode.void
setUserFormula
(ListGridField field) Updates theuserFormula
of the specified field.void
setUserFormula
(ListGridField field, UserFormula userFormula) Updates theuserFormula
of the specified field.void
setUserFormula
(String field) Updates theuserFormula
of the specified field.void
setUserFormulaText
(ListGridField field) Updates theUserFormula.text
of the specified field.void
setUserFormulaText
(ListGridField field, String text) Updates theUserFormula.text
of the specified field.void
setUserFormulaText
(String field) Updates theUserFormula.text
of the specified field.setUseRowSpanStyling
(Boolean useRowSpanStyling) Enables various styling behaviors that potentially make sense whengetRowSpan()
has been overridden to introduce spanning cells, and spanning is largest on the left and smaller as cells go to the right.void
setUserSummary
(ListGridField field) Updates theuserSummary
of the specified field.void
setUserSummary
(ListGridField field, UserSummary userSummary) Updates theuserSummary
of the specified field.void
setUserSummary
(String field) Updates theuserSummary
of the specified field.void
setUserSummaryText
(ListGridField field) Updates theUserSummary.text
of the specified field.void
setUserSummaryText
(ListGridField field, String text) Updates theUserSummary.text
of the specified field.void
setUserSummaryText
(String field) Updates theUserSummary.text
of the specified field.setValidateByCell
(Boolean validateByCell) Whether client-side validation checks should be performed when the user moves between cells in the current edit row.setValidateOnChange
(Boolean validateOnChange) If true, validation will be performed on each edited cell when each editor's "change" handler is fired.setValueIconHeight
(Integer valueIconHeight) Height for value icons for this listGrid.setValueIconLeftPadding
(int valueIconLeftPadding) How much padding should there be on the left of valueIcons by default Can be overridden at the field levelsetValueIconRightPadding
(int valueIconRightPadding) How much padding should there be on the right of valueIcons by defaultsetValueIconSize
(int valueIconSize) Default width and height of value icons for this ListGrid.setValueIconWidth
(Integer valueIconWidth) Width for value icons for this listGrid.void
setValueMap
(String fieldName, String... valueMap) Set the value map for a field.
 See also thesetEditorValueMap(java.lang.String, java.util.LinkedHashMap)

 andcom.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap
methods which allow further 
 customization of the valueMap displayed while the field is in edit mode.

void
setValueMap
(String fieldName, LinkedHashMap valueMap) Set the value map for a field.
 See also thesetEditorValueMap(java.lang.String, java.util.LinkedHashMap)

 andcom.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap
methods which allow further 
 customization of the valueMap displayed while the field is in edit mode.

setViewState
(String viewState) Initial view state may be provided for the listGrid at init time.setVirtualScrolling
(Boolean virtualScrolling) 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.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).setWarnOnRemoval
(Boolean warnOnRemoval) IfcanRemoveRecords
is true, when the user clicks the remove icon for some record, should we show a warning message (defined aswarnOnRemovalMessage
) and allow the user to cancel removal?setWarnOnRemovalMessage
(String warnOnRemovalMessage) Warning message to show the user on a click on the 'remove' icon ifcanRemoveRecords
is true andwarnOnRemoval
is true.setWarnOnUnmappedValueFieldChange
(Boolean warnOnUnmappedValueFieldChange) If a field hasListGridField.displayField
specified and has noListGridField.optionDataSource
, this field will display the value from thedisplayField
of each record by default (for more on this behavior seeListGridField.optionDataSource
).setWrapCells
(Boolean wrapCells) Should content within cells be allowed to wrap?setWrapHeaderSpanTitles
(Boolean wrapHeaderSpanTitles) IfHeaderSpan.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.setWrapHeaderTitles
(Boolean wrapHeaderTitles) IfListGridField.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.boolean
shouldIncludeHiliteInSummaryField
(String summaryFieldName, String usedFieldName) When assembling a value for asummary field
, if a referenced field is hilited, should the hilite HTML be included in the summary field value?void
Shows theaiFilterWindow
, which allows the user to ask the AI to filter data by describing which records should be included.void
Shows theaiFilterWindow
, which allows the user to ask the AI to filter data by describing which records should be included.void
Shows an additional field near the beginning of the field list (after anyrow number
field) that can be dragged to drag the current selection.void
Force a field to be shown.void
Force a field to be shown.void
showFields
(ListGridField... field) Force an array of fields to be shown.void
showFields
(ListGridField[] fields, boolean suppressRelayout) void
showFields
(String... field) Force an array of fields to be shown.void
showFields
(String[] field, boolean suppressRelayout) Force an array of fields to be shown.void
Shows the dialog forfilterWindowCriteria
allowing end-users to edit the advanced filter.protected boolean
showRecordComponent
(ListGridRecord record, Integer colNum) WhenshowRecordComponents
is true, return false from this method to prevent showRecordComponent behavior for the passed record.sort()
Sort this grid's data, with the option to explicitly specify a single field to sort by and sort direction.sort
(int sortCol, SortDirection sortDirection) 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.Start inline editing at the provided coordinates.startEditing
(Integer rowNum) startEditing
(Integer rowNum, Integer colNum) startEditing
(Integer rowNum, Integer colNum, Boolean suppressFocus) Start inline editing at the provided coordinates.void
Start editing a new row, after the last pre-existing record in the current set of data.void
startEditingNew
(Record defaultRecordValue) Start editing a new row, after the last pre-existing record in the current set of data.void
startEditingNew
(Map newValues) void
startEditingNew
(Map newValues, Boolean suppressFocus) Start editing a new row, after the last pre-existing record in the current set of data.void
Notification that the user is no longer hovering over some cell.void
summaryUpdated
(ListGridField field, UserSummary summary) Notification fired when a user either creates a new summary field or edits an existing summary field.void
toggleSort
(String fieldName) Toggles the sort-direction of the field with the passed name and resorts the grid.void
transferRecords
(Record[] records, Record targetRecord, Integer index, Canvas sourceWidget, TransferRecordsCallback callback) Transfer a list ofRecord
s from another component (does not have to be a databound component) into this component.void
Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction.void
transferSelectedData
(DataBoundComponent source, int index) Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction.void
unfreezeField
(ListGridField field) Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs.void
unfreezeField
(Integer field) Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs.void
unfreezeField
(String field) Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs.void
unfreezeField
(String[] field) Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs.void
unfreezeFields
(int[] colNums) void
unfreezeFields
(String[] fieldNames) void
ungroup()
Removes the grouping from the listGrid, restoring its original datavoid
unmarkRecordRemoved
(int rowNum) Reverses a previous call tomarkRecordRemoved()
.void
unsort()
Turn sorting off, typically because data has changed and is no longer sorted.void
updateData
(Record updatedRecord) Perform a DataSource "update" operation to update existing records in this component's DataSource.void
updateData
(Record updatedRecord, DSCallback callback) void
updateData
(Record updatedRecord, DSCallback callback, DSRequest requestProperties) Perform a DataSource "update" operation to update existing records in this component's DataSource.updateRecordComponent
(ListGridRecord record, Integer colNum, Canvas component, boolean recordChanged) WhenshowRecordComponents
is true, this method is called to update components created bycreateRecordComponent()
when they are to be applied to a different record in the grid.void
Selects every user-selectable record in the grid.validateCell
(int rowNum, int colIndex) Validate the current edit value for the cell in question.validateCell
(int rowNum, String fieldName) Validate the current edit value for the cell in question.validateRow
(int rowNum) Validate the current set of edit values for the row in question.This method overridesCanvas.willAcceptDrop()
and works as follows:
IfCanvas.willAcceptDrop()
(the superclass definition) returns false, this method always returns false.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.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.Methods inherited from class com.smartgwt.client.widgets.layout.VLayout
setDefaultProperties, setLogicalStructure
Methods inherited from class com.smartgwt.client.widgets.layout.Layout
addMember, addMember, addMember, addMember, addMemberPostCreate, addMemberPostCreate, addMemberPreCreate, addMemberPreCreate, addMembers, addMembers, addMembersChangedHandler, getAnimateMembers, getAnimateMemberTime, getCanDropComponents, getChildTabPosition, getDefaultResizeBars, getDropComponent, getDropLine, getDropLineThickness, getDropPosition, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutEndMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutStartMargin, getLayoutTopMargin, getLocateMembersBy, getLocateMembersType, getManagePercentBreadth, getMember, getMember, getMemberDefaultBreadth, getMemberNumber, getMemberNumber, getMemberOverlap, getMembers, getMembersLength, getMembersMargin, getMinMemberLength, getMinMemberSize, getPaddingAsLayoutMargin, getResizeBar, getResizeBarClass, getResizeBarSize, getReverseOrder, getShowDragPlaceHolder, getStackZIndex, getVertical, getVPolicy, hasMember, hideDropLine, hideMember, hideMember, layoutIsDirty, onInit_Layout, reflow, reflow, reflowNow, removeMember, removeMembers, removeMembers, reorderMember, reorderMembers, replaceMember, revealChild, revealChild, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setCanDropComponents, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultProperties, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutEndMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutStartMargin, setLayoutTopMargin, setLocateMembersBy, setLocateMembersType, setLogicalStructure, setManagePercentBreadth, setMemberOverlap, setMembers, setMembersMargin, setMinBreadthMember, setMinBreadthMember, setMinBreadthMember, setMinMemberLength, setMinMemberSize, setPaddingAsLayoutMargin, setPlaceHolderDefaults, setPlaceHolderProperties, setResizeBarClass, setResizeBarSize, setReverseOrder, setShowDragPlaceHolder, setStackZIndex, setVertical, setVisibleMember, setVPolicy, showMember, showMember
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addChild, addChild, addClearHandler, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addRuleContextChangedHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clearExplicitTabIndex, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsEventTarget, containsFocus, containsPoint, containsPoint, dataContextChanged, deparent, depeer, disable, enable, encloses, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAlwaysManageFocusNavigation, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeLayoutMode, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaHandleID, getAutoMaskComponents, getAutoParent, getAutoPopulateData, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBorderRadius, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanAdaptHeight, getCanAdaptWidth, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCorrectZoomOverflow, getCursor, getDataContext, getDataPath, getDefaultHeight, getDefaultWidth, getDefiningProperty, getDefiningPropertyName, getDefiningPropertyNameOptions, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragTargetAsString, getDragType, getDropTarget, getDropTargetAsString, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFloatingScrollbars, getFormItemAutoChild, getForwardSVGeventsToObject, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupPadding, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverPersist, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlElementAsString, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeaveGroupLabelSpace, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateByIDOnly, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getLocatorName, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMatchElementHeight, getMatchElementWidth, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getName, getNativeAutoHideScrollbars, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPendingMarkerStyle, getPendingMarkerVisible, getPercentBox, getPercentSource, getPersistentMatchElement, getPointerSettings, getPointerTarget, getPointerTargetAsString, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrintStyleName, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getReceiveScrollbarEvents, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getRuleContext, getRuleContext, getRuleScope, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowColor, getShadowDepth, getShadowHOffset, getShadowImage, getShadowOffset, getShadowSoftness, getShadowSpread, getShadowVOffset, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowPointer, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSizeMayChangeOnRedraw, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapGridLineProperties, getSnapGridStyle, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getTabIndex, getTestDataContext, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUISummary, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDragMask, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getWorkflows, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, initComplete, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, print, print, print, print, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, registerFontScaledPaddingStyles, removeChild, removeChild, removePeer, removePeer, removeRuleContext, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeControlsTo, resizeFonts, resizeFonts, resizeFonts, resizeFontsTo, resizeIcons, resizePadding, resizePadding, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAllowExternalFilters, setAlwaysManageFocusNavigation, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeLayoutMode, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoHeight, setAutoMaskComponents, setAutoParent, setAutoPopulateData, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorderRadius, setBottom, setCanAcceptDrop, setCanAdaptHeight, setCanAdaptWidth, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCorrectZoomOverflow, setCursor, setDataContext, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultShowCustomScrollbars, setDefaultWidth, setDefiningProperty, setDefiningPropertyNameOptions, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragTarget, setDragType, setDropTarget, setDropTarget, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setFloatingScrollbars, setForwardSVGeventsToObject, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupPadding, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverPersist, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeaveGroupLabelSpace, setLeavePageSpace, setLeft, setLeft, setLocateByIDOnly, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLocatorName, setLocatorParent, setLocatorParent, setLogicalStructure, setMargin, setMatchElement, setMatchElementHeight, setMatchElementWidth, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setName, setNativeAutoHideScrollbars, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentElement, setPeers, setPendingMarkerStyle, setPendingMarkerVisible, setPercentBox, setPercentSource, setPersistentMatchElement, setPointerSettings, setPointerTarget, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrintStyleName, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setReceiveScrollbarEvents, setRect, setRect, setRedrawOnResize, setRelativeTabPosition, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setRuleScope, setScrollbarConstructor, setScrollbarSize, setShadowColor, setShadowDepth, setShadowHOffset, setShadowImage, setShadowOffset, setShadowSoftness, setShadowSpread, setShadowVOffset, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowPointer, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSizeMayChangeOnRedraw, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapGridLineProperties, setSnapGridStyle, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setTabIndex, setTestDataContext, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDragMask, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setWorkflows, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPendingMarker, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, startDebuggingOverflow, stopDebuggingOverflow, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, completeCreation, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hasDynamicProperty, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isDrawn, isFactoryCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDefaultProperties, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.smartgwt.client.widgets.DataBoundComponent
getOrCreateJsObj
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
ListGrid
public ListGrid() -
ListGrid
-
ListGrid
-
-
Method Details
-
getOrCreateRef
-
getTestInstance
- Overrides:
getTestInstance
in classCanvas
-
changeAutoChildDefaults
Changes the defaults for Canvas AutoChildren namedautoChildName
.- 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, seeSGWTProperties
.- See Also:
-
changeAutoChildDefaults
Changes the defaults for FormItem AutoChildren namedautoChildName
.- 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, seeSGWTProperties
.- See Also:
-
create
-
setAdvancedFieldPickerThreshold
public ListGrid setAdvancedFieldPickerThreshold(int advancedFieldPickerThreshold) throws IllegalStateException WhenuseAdvancedFieldPicker
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()WhenuseAdvancedFieldPicker
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
If we're showing aheaderContextMenu
for this grid, and afilter-editor
is visible andallowFilterWindow
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 thefilter using
operators menu.- Parameters:
advancedFilteringText
- New advancedFilteringText value. Default value is "Advanced filtering..."- Returns:
ListGrid
instance, for chaining setter calls
-
getAdvancedFilteringText
If we're showing aheaderContextMenu
for this grid, and afilter-editor
is visible andallowFilterWindow
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 thefilter using
operators menu.- Returns:
- Current advancedFilteringText value. Default value is "Advanced filtering..."
-
getAiFilterWindow
Instance ofAIWindow
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
The inline hint-text displayed in the user-entry area in theaiFilterWindow
.- 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
The inline hint-text displayed in the user-entry area in theaiFilterWindow
.- 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 theaiFilterWindow
.- 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
The descriptive text displayed above the user-entry area in theaiFilterWindow
.- Returns:
- Current aiFilterWindowInstructions value. Default value is "Show records that match this description..."
- See Also:
-
setAiFilterWindowTitle
The title for theAI-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
The title for theAI-driven filter window
.- Returns:
- Current aiFilterWindowTitle value. Default value is "AI Filtering"
- See Also:
-
getAiHiliteWindow
Instance ofAIWindow
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
Optional prefix for the AI-generated hover text displayed when hovering over fields specifying anaiHoverRequest
.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
Optional prefix for the AI-generated hover text displayed when hovering over fields specifying anaiHoverRequest
.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
Minimum number of milliseconds to wait before retrying to generate hover contents via AI.The results of
SummarizeValueRequest
s generated from a field'saiHoverRequest
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
Minimum number of milliseconds to wait before retrying to generate hover contents via AI.The results of
SummarizeValueRequest
s generated from a field'saiHoverRequest
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
The message to show when a user asks the AI to sort more than themaximum 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
The message to show when a user asks the AI to sort more than themaximum 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
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 withshowFilterEditor
:true, allows simple search expressions to be entered into filter fields, as thoughDynamicForm.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
For use withshowFilterEditor
:true, allows simple search expressions to be entered into filter fields, as thoughDynamicForm.allowExpressions
were true.This attribute can also be set at the
field level
.- Returns:
- Current allowFilterExpressions value. Default value is null
- See Also:
-
setAllowFilterOperators
Causes a menu item titled"Filter using"
to appear in theheaderContextMenu
that allows the end user to pick an advancedsearch 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 toalways be present
). TheoperatorIcon
shows the same textual representation of the search operator as is used by theFormItem.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. UseListGridField.allowFilterOperators
to disable this interface for individual fields, or setDataSourceField.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 thanallowFilterExpressions
, 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 thatallowFilterOperators
does not support, such as using the "betweenInclusive" operator by typing "5...10".When both
allowfilterExpressions
andallowFilterOperators
are set, filter expressions entered in to the edit-area are parsed and the operator automatically applied to theoperatorIcon
.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
Causes a menu item titled"Filter using"
to appear in theheaderContextMenu
that allows the end user to pick an advancedsearch 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 toalways be present
). TheoperatorIcon
shows the same textual representation of the search operator as is used by theFormItem.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. UseListGridField.allowFilterOperators
to disable this interface for individual fields, or setDataSourceField.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 thanallowFilterExpressions
, 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 thatallowFilterOperators
does not support, such as using the "betweenInclusive" operator by typing "5...10".When both
allowfilterExpressions
andallowFilterOperators
are set, filter expressions entered in to the edit-area are parsed and the operator automatically applied to theoperatorIcon
.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
Adds the ability for a user to define additional criteria above and beyond those expressed in thefilter editor
via aFilterBuilder
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 theheaderContextMenu
that allows the end user to configure an advanced filter on the grid that can supplement thefilter editor
. Note that the menu option will show even iffilter 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 aDataSource
and bothDataSource.supportsAdvancedCriteria()
andallowFilterOperators
are true. This default can be disabled by settingallowFilterWindow
tofalse
.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
Adds the ability for a user to define additional criteria above and beyond those expressed in thefilter editor
via aFilterBuilder
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 theheaderContextMenu
that allows the end user to configure an advanced filter on the grid that can supplement thefilter editor
. Note that the menu option will show even iffilter 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 aDataSource
and bothDataSource.supportsAdvancedCriteria()
andallowFilterOperators
are true. This default can be disabled by settingallowFilterWindow
tofalse
.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
Should cells in this grid be allowed to span multiple rows? If set totrue
, thegetRowSpan()
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
Should cells in this grid be allowed to span multiple rows? If set totrue
, thegetRowSpan()
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
Optional css style to apply to the body ifalternateRecordStyles
is true for this grid. If unsetbodyStyleName
will be used to style the body regardless of thealternateRecordStyles
setting.
If this method is called after the component has been drawn/initialized: Update thealternateBodyStyleName
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
Optional css style to apply to the body ifalternateRecordStyles
is true for this grid. If unsetbodyStyleName
will be used to style the body regardless of thealternateRecordStyles
setting.- Returns:
- Current alternateBodyStyleName value. Default value is null
- See Also:
-
setAlternateFieldFrequency
The number of consecutive columns to draw in the same style before alternating, whenalternateColumnStyles
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, whenalternateColumnStyles
is true.- Returns:
- Current alternateFieldFrequency value. Default value is 1
-
setAlternateFieldStyles
Whether alternating columns (or blocks of columns, depending onGridRenderer.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 alsoGridRenderer.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 onGridRenderer.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 alsoGridRenderer.alternateRowStyles
.- Returns:
- Current alternateFieldStyles value. Default value is false
-
setAlternateFieldSuffix
Suffix to append toalternate columns
. Note that ifGridRenderer.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
Suffix to append toalternate columns
. Note that ifGridRenderer.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
The number of consecutive rows to draw in the same style before alternating, whenalternateRowStyles
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, whenalternateRowStyles
is true.- Returns:
- Current alternateRecordFrequency value. Default value is 1
-
setAlternateRecordStyles
Whether alternating rows (or blocks of rows, depending onGridRenderer.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 alsoGridRenderer.alternateColumnStyles
.
If this method is called after the component has been drawn/initialized: Setter foralternateRecordStyles
- Parameters:
alternateRecordStyles
- New value forthis.alternateRecordStyles
. Default value is false- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getAlternateRecordStyles
Whether alternating rows (or blocks of rows, depending onGridRenderer.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 alsoGridRenderer.alternateColumnStyles
.- Returns:
- Current alternateRecordStyles value. Default value is false
- See Also:
-
setAlternateRecordSuffix
Suffix to append toalternate rows
. Note that ifGridRenderer.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
Suffix to append toalternate rows
. Note that ifGridRenderer.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
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 wheneditByCell
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).
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
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 wheneditByCell
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).
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 WhenallowFilterOperators
is enabled, whether to show theoperatorIcon
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 settingListGridField.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
WhenallowFilterOperators
is enabled, whether to show theoperatorIcon
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 settingListGridField.filterOperator
for a specific field.- Returns:
- Current alwaysShowOperatorIcon value. Default value is null
-
setAnimateFolderEffect
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
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
IfanimateFolders
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
IfanimateFolders
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
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
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
When animating folder opening / closing, this property designates the speed of the animation in pixels shown (or hidden) per second. Takes precedence over theTreeGrid.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 theTreeGrid.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
When animating folder opening / closing, ifTreeGrid.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, ifTreeGrid.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
WhencanRemoveRecords
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
WhencanRemoveRecords
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
Whenanimating record removal
, this property designates the speed of the animation in pixels per second. Takes precedence over theanimateRemoveTime
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()Whenanimating record removal
, this property designates the speed of the animation in pixels per second. Takes precedence over theanimateRemoveTime
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
When animating record removal(see animateRemoveRecord)
, ifanimateRemoveSpeed
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)
, ifanimateRemoveSpeed
is not set, this property designates the duration of the animation in ms.- Returns:
- Current animateRemoveTime value. Default value is 100
- See Also:
-
setAnimateRollOver
If therollOverCanvas
is enabled, setting this property totrue
ensures that when therollOverCanvas
is displayed it is animated into view viaCanvas.animateShow()
. Note that the animation effect may be customized viaCanvas.animateShowEffect
,Canvas.animateShowTime
andCanvas.animateShowAcceleration
set inrollOverCanvasProperties
.Note : This is an advanced setting
- Parameters:
animateRollOver
- New animateRollOver value. Default value is false- Returns:
ListGrid
instance, for chaining setter calls
-
getAnimateRollOver
If therollOverCanvas
is enabled, setting this property totrue
ensures that when therollOverCanvas
is displayed it is animated into view viaCanvas.animateShow()
. Note that the animation effect may be customized viaCanvas.animateShowEffect
,Canvas.animateShowTime
andCanvas.animateShowAcceleration
set inrollOverCanvasProperties
.- Returns:
- Current animateRollOver value. Default value is false
-
setAnimateRollUnder
If therollUnderCanvas
is enabled, setting this property totrue
ensures that when therollUnderCanvas
is displayed it is animated into view viaCanvas.animateShow()
. Note that the animation effect may be customized viaCanvas.animateShowEffect
,Canvas.animateShowTime
andCanvas.animateShowAcceleration
set inrollUnderCanvasProperties
.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
If therollUnderCanvas
is enabled, setting this property totrue
ensures that when therollUnderCanvas
is displayed it is animated into view viaCanvas.animateShow()
. Note that the animation effect may be customized viaCanvas.animateShowEffect
,Canvas.animateShowTime
andCanvas.animateShowAcceleration
set inrollUnderCanvasProperties
.- Returns:
- Current animateRollUnder value. Default value is false
- See Also:
-
setAnimateSelection
If theselectionCanvas
is enabled, setting this property totrue
ensures that when theselectionCanvas
is displayed it is animated into view viaCanvas.animateShow()
. Note that the animation effect may be customized viaCanvas.animateShowEffect
,Canvas.animateShowTime
andCanvas.animateShowAcceleration
set inselectionCanvasProperties
.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
If theselectionCanvas
is enabled, setting this property totrue
ensures that when theselectionCanvas
is displayed it is animated into view viaCanvas.animateShow()
. Note that the animation effect may be customized viaCanvas.animateShowEffect
,Canvas.animateShowTime
andCanvas.animateShowAcceleration
set inselectionCanvasProperties
.- Returns:
- Current animateSelection value. Default value is false
- See Also:
-
setAnimateSelectionUnder
If theselectionUnderCanvas
is enabled, setting this property totrue
ensures that when theselectionUnderCanvas
is displayed it is animated into view viaCanvas.animateShow()
. Note that the animation effect may be customized viaCanvas.animateShowEffect
,Canvas.animateShowTime
andCanvas.animateShowAcceleration
set inselectionUnderCanvasProperties
.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
If theselectionUnderCanvas
is enabled, setting this property totrue
ensures that when theselectionUnderCanvas
is displayed it is animated into view viaCanvas.animateShow()
. Note that the animation effect may be customized viaCanvas.animateShowEffect
,Canvas.animateShowTime
andCanvas.animateShowAcceleration
set inselectionUnderCanvasProperties
.- Returns:
- Current animateSelectionUnder value. Default value is false
- See Also:
-
setApplyFormulaAfterSummary
IfListGridField.userFormula
is set for some field, and this grid is showinggroup summaries
or agrid summary
, this property determines what field value should be present in those summary rows. Should the field's user-formula be applied to the calculated summary row (applyFormulaAfterSummarytrue
), or should a standard grid or group summary be applied to the user-formula values displayed in the grid (applyFormulaAfterSummaryfalse
)?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
IfListGridField.userFormula
is set for some field, and this grid is showinggroup summaries
or agrid summary
, this property determines what field value should be present in those summary rows. Should the field's user-formula be applied to the calculated summary row (applyFormulaAfterSummarytrue
), or should a standard grid or group summary be applied to the user-formula values displayed in the grid (applyFormulaAfterSummaryfalse
)?May be overridden at the field level via
ListGridField.applyAfterSummary
- Returns:
- Current applyFormulaAfterSummary value. Default value is false
-
setApplyRowCountToLength
This property allows developers to explicitly setResultSet.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
This property allows developers to explicitly setResultSet.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
IfshowRowNumbers
is true, should we apply therowNumberStyle
to therowNumberField
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()- Returns:
- Current applyRowNumberStyle value. Default value is true
-
setApproximateRowCountFormat
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"approximate"
.The variable
rowCount
is available for evaluation within this string and will be set to thecurrent row count
as alocale-formatted number
.- Parameters:
approximateRowCountFormat
- New approximateRowCountFormat value. Default value is "~${rowCount}"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getApproximateRowCountFormat
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"approximate"
.The variable
rowCount
is available for evaluation within this string and will be set to thecurrent row count
as alocale-formatted number
.- Returns:
- Current approximateRowCountFormat value. Default value is "~${rowCount}"
- See Also:
-
setAriaRole
ARIA role for this ListGrid ifscreen 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 forsetsize
,posinset
,selected
(for selected rows) andexpanded
(forexpanded
rows)- Additionally, if
screenReaderWriteRowLabelledBy
is true, rows will write out anaria-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
andaria-colcount
will be specified on the listGrid itself- The
header
will have rolerow
andaria-rowindex
set to 1 - Column header buttons will have role
columnheader
, andaria-colindex
set to the appropriate value for the column. Additionallyaria-sort
will be specified to reflect the current sort-state for the field, and if the header menu is enabled,aria-haspopup
will betrue
- Rows within the grid body will have role
row
getRowAriaState()
will return aria properties forrowindex
,selected
(for selected rows) andexpanded
(forexpanded
rows)- Cells within rows will have role
gridcell
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 classCanvas
- Parameters:
ariaRole
- New ariaRole value. Default value is "list"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
- rows have role set to
-
getAriaRole
ARIA role for this ListGrid ifscreen 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 forsetsize
,posinset
,selected
(for selected rows) andexpanded
(forexpanded
rows)- Additionally, if
screenReaderWriteRowLabelledBy
is true, rows will write out anaria-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
andaria-colcount
will be specified on the listGrid itself- The
header
will have rolerow
andaria-rowindex
set to 1 - Column header buttons will have role
columnheader
, andaria-colindex
set to the appropriate value for the column. Additionallyaria-sort
will be specified to reflect the current sort-state for the field, and if the header menu is enabled,aria-haspopup
will betrue
- Rows within the grid body will have role
row
getRowAriaState()
will return aria properties forrowindex
,selected
(for selected rows) andexpanded
(forexpanded
rows)- Cells within rows will have role
gridcell
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 classCanvas
- Returns:
- Current ariaRole value. Default value is "list"
- See Also:
- rows have role set to
-
setArrowKeyAction
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.
IfcanSelectCells
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()
andListGrid.recordDoubleClick()
are fired for the new position.
Note that ifcanSelectCells
is false, the events will be fired as if a click or double click had occurred on the first cell whereListGridField.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 (callsrecordDoubleClick
handler)"none"
: no action-
null
: ifselectionAppearance
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
andgenerateDoubleClickOnSpace
Note : This is an advanced setting
- Parameters:
arrowKeyAction
- New arrowKeyAction value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
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.
IfcanSelectCells
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()
andListGrid.recordDoubleClick()
are fired for the new position.
Note that ifcanSelectCells
is false, the events will be fired as if a click or double click had occurred on the first cell whereListGridField.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 (callsrecordDoubleClick
handler)"none"
: no action-
null
: ifselectionAppearance
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
andgenerateDoubleClickOnSpace
- Returns:
- Current arrowKeyAction value. Default value is null
-
setArrowKeyEditAction
What to do when a user hits arrow key while editing a field?
If not explicitly specifiedgetArrowKeyEditAction()
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
What to do when a user hits arrow key while editing a field?
If not explicitly specifiedgetArrowKeyEditAction()
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
, orfield
level. Default value is null - See Also:
-
setAsyncErrorCellValue
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
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
The prompt to display while interactivity is blocked duringasynchronous grouping
.- Parameters:
asynchGroupingPrompt
- New asynchGroupingPrompt value. Default value is "${loadingImage} 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
The prompt to display while interactivity is blocked duringasynchronous grouping
.- Returns:
- Current asynchGroupingPrompt value. Default value is "${loadingImage} Grouping data..."
- See Also:
-
setAsyncMissingCellValue
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
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
Whether to do inline autoComplete in text fields during inline editing
Overridden byListGridField.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
Whether to do inline autoComplete in text fields during inline editing
Overridden byListGridField.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
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 alsoconfirmDiscardEdits
, 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
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 alsoconfirmDiscardEdits
, 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
If true, for fields whereListGridField.optionDataSource
is specified, a valueMap will be automatically created by making aDataSource.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
If true, for fields whereListGridField.optionDataSource
is specified, a valueMap will be automatically created by making aDataSource.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:
-
ListGridField.getAutoFetchDisplayMap()
com.smartgwt.client.widgets.grid.ListGridField#getOptionDataSource
-
setAutoFetchRowCount
Depending on whetherDataSource.progressiveLoading
is active, the exact count of available rows may not be available as part of the standard data fetch response - settingautoFetchRowCount:true
will cause a fetch for an accurate row count to be issued as soon as data arrives (from aprogressive dataSource response
) without an accurate row count. This value will then be available for display in theRowRangeDisplay
label.To allow users to request an accurate row count by clicking the
RowRangeDisplay
instead of kicking off a row count fetch automatically, usecanRequestRowCount
.The
autoFetchRowCount
value will be passed through to theResultSet 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 whetherDataSource.progressiveLoading
is active, the exact count of available rows may not be available as part of the standard data fetch response - settingautoFetchRowCount:true
will cause a fetch for an accurate row count to be issued as soon as data arrives (from aprogressive dataSource response
) without an accurate row count. This value will then be available for display in theRowRangeDisplay
label.To allow users to request an accurate row count by clicking the
RowRangeDisplay
instead of kicking off a row count fetch automatically, usecanRequestRowCount
.The
autoFetchRowCount
value will be passed through to theResultSet data object
which is responsible for issuing the row count fetch(es) at appropriate times.- Returns:
- Current autoFetchRowCount value. Default value is false
-
setAutoFitAllText
If we're showing aheaderContextMenu
for this grid, andcanAutoFitFields
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 theautoFitField()
method.- Parameters:
autoFitAllText
- New autoFitAllText value. Default value is "Auto Fit All Columns"- Returns:
ListGrid
instance, for chaining setter calls
-
getAutoFitAllText
If we're showing aheaderContextMenu
for this grid, andcanAutoFitFields
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 theautoFitField()
method.- Returns:
- Current autoFitAllText value. Default value is "Auto Fit All Columns"
-
setAutoFitClipFields
IfautoFitFieldWidths
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
IfautoFitFieldWidths
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
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.
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
andfixedRecordHeights
.
If this method is called after the component has been drawn/initialized: Setter forautoFitData
.- Parameters:
autoFitData
- One of"vertical"
,"horizontal"
or"both"
. To disable auto fit behavior, pass innull
. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
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.
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
andfixedRecordHeights
.- Returns:
- Current autoFitData value. Default value is null
-
setAutoFitDateFields
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 bydefaultDateFieldWidth
, (ordefaultEditableDateFieldWidth
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 theListGridField.autoFitWidthApproach
to the value specified here and having logic ingetDefaultFieldWidth()
pick up thedefaultDateFieldWidth
ordefaultEditableDateFieldWidth
if appropriate.- Parameters:
autoFitDateFields
- New autoFitDateFields value. Default value is "value"- Returns:
ListGrid
instance, for chaining setter calls
-
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 bydefaultDateFieldWidth
, (ordefaultEditableDateFieldWidth
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 theListGridField.autoFitWidthApproach
to the value specified here and having logic ingetDefaultFieldWidth()
pick up thedefaultDateFieldWidth
ordefaultEditableDateFieldWidth
if appropriate.- Returns:
- Current autoFitDateFields value. Default value is "value"
-
setAutoFitExpandField
The field to expand ifautoFitFieldWidths
andautoFitFieldsFillViewport
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
The field to expand ifautoFitFieldWidths
andautoFitFieldsFillViewport
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
IfautoFitData
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 viaautoFitMaxHeight
orautoFitMaxRecords
, 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 forautoFitExtraRecords
. -
getAutoFitExtraRecords
IfautoFitData
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 viaautoFitMaxHeight
orautoFitMaxRecords
, 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 IfautoFitFieldWidths
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
IfautoFitFieldWidths
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
If we're showing aheaderContextMenu
for this grid, and user-driven auto fit of fields is enabled viaListGridField.canAutoFitWidth
orcanAutoFitFields
, 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 toautoFitField()
.- Parameters:
autoFitFieldText
- New autoFitFieldText value. Default value is "Auto Fit"- Returns:
ListGrid
instance, for chaining setter calls
-
getAutoFitFieldText
If we're showing aheaderContextMenu
for this grid, and user-driven auto fit of fields is enabled viaListGridField.canAutoFitWidth
orcanAutoFitFields
, 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 toautoFitField()
.- Returns:
- Current autoFitFieldText value. Default value is "Auto Fit"
-
setAutoFitFieldWidths
Should ListGrid fields autofit their widths to titles or content? This property may be overridden on a per-field basis viaListGridField.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()
orautoFitFields()
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. SeeshowAllRecords
anddrawAheadRatio
) to control incremental rendering of rows.Note that for
icon
type fields, theautoFitIconFields
property setting may turn on auto-fit-width behavior for specific fields by default, even ifautoFitFieldWidths
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 oncell content
will render fields wide enough to contain the unwrapped cell values. Ifwrapping 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 forautoFitFieldWidths
. Modifies the default auto-fit-width behavior for fields in this grid. Note that this may be overridden at the field level viaListGridField.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
Should ListGrid fields autofit their widths to titles or content? This property may be overridden on a per-field basis viaListGridField.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()
orautoFitFields()
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. SeeshowAllRecords
anddrawAheadRatio
) to control incremental rendering of rows.Note that for
icon
type fields, theautoFitIconFields
property setting may turn on auto-fit-width behavior for specific fields by default, even ifautoFitFieldWidths
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 oncell content
will render fields wide enough to contain the unwrapped cell values. Ifwrapping 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
If this property is set to true, header buttons for eitherfields
orheader spans
will automatically expand to accommodate their titles vertically. This means if you have a "tall" title - typically a long string whereListGridField.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 specifiedheaderHeight
.Note that you need not set
HeaderSpan.height
orheaderSpanHeight
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
If this property is set to true, header buttons for eitherfields
orheader spans
will automatically expand to accommodate their titles vertically. This means if you have a "tall" title - typically a long string whereListGridField.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 specifiedheaderHeight
.Note that you need not set
HeaderSpan.height
orheaderSpanHeight
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
Smart GWT listGrids have special logic to automatically size fields that are displayed as an icon - that is fields withtype:"icon"
, fields displaying onlyvalue 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 causeListGridField.autoFitWidth
to be enabled by default for all icon fields with theListGridField.autoFitWidthApproach
set to"value"
or"both"
as appropriate. Note that the width required for the icons is calculated bygetDefaultFieldWidth()
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 enablingListGridField.autoFitWidth
and settingListGridField.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
Smart GWT listGrids have special logic to automatically size fields that are displayed as an icon - that is fields withtype:"icon"
, fields displaying onlyvalue 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 causeListGridField.autoFitWidth
to be enabled by default for all icon fields with theListGridField.autoFitWidthApproach
set to"value"
or"both"
as appropriate. Note that the width required for the icons is calculated bygetDefaultFieldWidth()
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 enablingListGridField.autoFitWidth
and settingListGridField.autoFitWidthApproach
on the field in question.- Returns:
- Current autoFitIconFields value. Default value is "title"
- See Also:
-
setAutoFitMaxColumns
IfautoFitData
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 forautoFitMaxColumns
. -
getAutoFitMaxColumns
public int getAutoFitMaxColumns()IfautoFitData
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
IfautoFitData
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 ornull
.
If this method is called after the component has been drawn/initialized: Setter forautoFitMaxHeight
. -
getAutoFitMaxHeight
IfautoFitData
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 ornull
.- Returns:
- Current autoFitMaxHeight value. Default value is null
-
setAutoFitMaxRecords
IfautoFitData
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 forautoFitMaxRecords
. -
getAutoFitMaxRecords
public int getAutoFitMaxRecords()IfautoFitData
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
IfautoFitData
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 forautoFitMaxWidth
. -
getAutoFitMaxWidth
IfautoFitData
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
IfautoFitData
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 forautoFitMaxWidth
. -
getAutoFitMaxWidthAsString
IfautoFitData
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
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 bydefaultTimeFieldWidth
. 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 theListGridField.autoFitWidthApproach
to the value specified here and having logic ingetDefaultFieldWidth()
pick up thedefaultTimeFieldWidth
if appropriate.- Parameters:
autoFitTimeFields
- New autoFitTimeFields value. Default value is "value"- Returns:
ListGrid
instance, for chaining setter calls
-
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 bydefaultTimeFieldWidth
. 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 theListGridField.autoFitWidthApproach
to the value specified here and having logic ingetDefaultFieldWidth()
pick up thedefaultTimeFieldWidth
if appropriate.- Returns:
- Current autoFitTimeFields value. Default value is "value"
-
setAutoFitWidthApproach
When a user requests column autofitting via theheader context menu
or via amouse 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 theautoFitWidthApproach
.- Parameters:
autoFitWidthApproach
- new AutoFitWidth approach. Default value is "value"- Returns:
ListGrid
instance, for chaining setter calls
-
getAutoFitWidthApproach
When a user requests column autofitting via theheader context menu
or via amouse 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
Setting this property to a non-null value will enable automatic saving ofview 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 theSaved Search subsystem
to allow users to explicitly store and apply multiple named views or "saved searches". Each saved search includes thefull view state
for the grid by default.autoPersistViewState
may be set to a list ofview 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()
orclearSavedViewState()
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 theBest 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
andLocatorStrategy
.- Parameters:
autoPersistViewState
- New autoPersistViewState value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getAutoPersistViewState
Setting this property to a non-null value will enable automatic saving ofview 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 theSaved Search subsystem
to allow users to explicitly store and apply multiple named views or "saved searches". Each saved search includes thefull view state
for the grid by default.autoPersistViewState
may be set to a list ofview 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()
orclearSavedViewState()
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 theBest 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
andLocatorStrategy
.- Returns:
- Current autoPersistViewState value. Default value is null
- See Also:
-
setAutoSaveEdits
If this ListGrid is editable, should edits be saved out when the user finishes editing a row (or a cell ifsaveByCell
is true).The default of
true
indicates that edits will beautomatically saved
as the user navigates through the grid and/orhits 'Enter'
to end editing. See theGrid 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) untilsaveEdits()
is called to save a particular row, orsaveAllEdits()
is called to save all changes in a batch.Note: when
listGrid grouping
is enabled, or when working with hierarchical data in aTreeGrid
, users have the option to hide records from view by collapsing the parent folder or group. This, in conjunction withautoSaveEdits
being set tofalse
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 involveautoSaveEdits
being set tofalse
.- Parameters:
autoSaveEdits
- New autoSaveEdits value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getAutoSaveEdits
If this ListGrid is editable, should edits be saved out when the user finishes editing a row (or a cell ifsaveByCell
is true).The default of
true
indicates that edits will beautomatically saved
as the user navigates through the grid and/orhits 'Enter'
to end editing. See theGrid 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) untilsaveEdits()
is called to save a particular row, orsaveAllEdits()
is called to save all changes in a batch.Note: when
listGrid grouping
is enabled, or when working with hierarchical data in aTreeGrid
, users have the option to hide records from view by collapsing the parent folder or group. This, in conjunction withautoSaveEdits
being set tofalse
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 involveautoSaveEdits
being set tofalse
.- Returns:
- Current autoSaveEdits value. Default value is true
- See Also:
-
setAutoSizeHeaderSpans
If this listGrid has specifiedheaderSpans
, 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
If this listGrid has specifiedheaderSpans
, 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
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Has no effect unless
showBackgroundComponents
istrue
.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
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
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
base cell style
for this listGrid. If this property is unset, base style may be derived fromnormalBaseStyle
ortallBaseStyle
as described ingetBaseStyle()
.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
base cell style
for this listGrid. If this property is unset, base style may be derived fromnormalBaseStyle
ortallBaseStyle
as described ingetBaseStyle()
.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
this.editFailedBaseStyle
is defined, and the cell is displaying a validation error return this value. - If
this.editFailedPendingStyle
is defined, and the cell is displaying an edit value that has not yet been saved (seeautoSaveEdits
) return this value. - Otherwise return
record[listGrid.recordBaseStyleProperty]
, if defined, otherwisefield.baseStyle
.
baseStyle
is specified this will be used. Otherwise for grids showing fixed height rows which matchnormalCellHeight
normalBaseStyle
will be used. For grids with variable, or modified cell heights,tallBaseStyle
will be used.Note also that enabling
fastCellUpdates
will cause thetallBaseStyle
to be used rather thannormalBaseStyle
.As noted under
enforceVClipping
, cell content which renders taller than the available space within a cell may cause rows to expand even iffixedRecordHeights
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
- If
- See Also:
-
setBlockingRowCountFetch
If specified, this attribute will be applied to this grid'sdata object
for dataBound grids.- Parameters:
blockingRowCountFetch
- New blockingRowCountFetch value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getBlockingRowCountFetch
If specified, this attribute will be applied to this grid'sdata object
for dataBound grids.- Returns:
- Current blockingRowCountFetch value. Default value is null
- See Also:
-
setBodyBackgroundColor
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, overridebaseStyle
instead.- Parameters:
bodyBackgroundColor
- New bodyBackgroundColor value. Default value is "white"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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, overridebaseStyle
instead.- Returns:
- Current bodyBackgroundColor value. Default value is "white"
- See Also:
-
setBodyOverflow
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
andfixedRecordHeights
.
If this method is called after the component has been drawn/initialized: Update thebodyOverflow
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
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
andfixedRecordHeights
.- Returns:
- Current bodyOverflow value. Default value is Canvas.AUTO
- See Also:
-
setBodyStyleName
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 setbodyBackgroundColor
tonull
.
If this method is called after the component has been drawn/initialized: Update thebodyStyleName
for this listGrid.- Parameters:
bodyStyleName
- new body style name. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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 setbodyBackgroundColor
tonull
.- Returns:
- Current bodyStyleName value. Default value is null
- See Also:
-
setBooleanBaseStyle
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
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
Image to display for a false value in a boolean field. Defaultnull
value or the special value "blank" means no image will be displayed.To turn this off explicitly set
ListGridField.suppressValueIcon
to trueIf this,
booleanTrueImage
andbooleanPartialImage
are unset, this will be set to the defaultCheckboxItem.uncheckedImage
.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
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
Image to display for a false value in a boolean field. Defaultnull
value or the special value "blank" means no image will be displayed.To turn this off explicitly set
ListGridField.suppressValueIcon
to trueIf this,
booleanTrueImage
andbooleanPartialImage
are unset, this will be set to the defaultCheckboxItem.uncheckedImage
.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide a "boolean false" appearance.- Returns:
- Current booleanFalseImage value. Default value is null
- See Also:
-
setBooleanImageHeight
Height for thebooleanTrueImage
,booleanFalseImage
andbooleanPartialImage
. Note: IfbooleanTrueImage
is unset, theCheckboxItem.checkedImage
will be used to indicate a true value in a boolean field. In this case this property is ignored in favor ofCheckboxItem.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 thebooleanTrueImage
,booleanFalseImage
andbooleanPartialImage
. Note: IfbooleanTrueImage
is unset, theCheckboxItem.checkedImage
will be used to indicate a true value in a boolean field. In this case this property is ignored in favor ofCheckboxItem.valueIconHeight
.- Returns:
- Current booleanImageHeight value. Default value is 16
- See Also:
-
setBooleanImageWidth
Width for thebooleanTrueImage
,booleanFalseImage
andbooleanPartialImage
. Note: IfbooleanTrueImage
is unset, theCheckboxItem.checkedImage
will be used to indicate a true value in a boolean field. In this case this property is ignored in favor ofCheckboxItem.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 thebooleanTrueImage
,booleanFalseImage
andbooleanPartialImage
. Note: IfbooleanTrueImage
is unset, theCheckboxItem.checkedImage
will be used to indicate a true value in a boolean field. In this case this property is ignored in favor ofCheckboxItem.valueIconWidth
.- Returns:
- Current booleanImageWidth value. Default value is 16
- See Also:
-
setBooleanPartialImage
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
andbooleanFalseImage
are unset, this will be set to the defaultCheckboxItem.partialSelectedImage
.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
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
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
andbooleanFalseImage
are unset, this will be set to the defaultCheckboxItem.partialSelectedImage
.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide a "boolean true" appearance.- Returns:
- Current booleanPartialImage value. Default value is null
- See Also:
-
setBooleanTrueImage
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
andbooleanPartialImage
are unset, this will be set to the defaultCheckboxItem.checkedImage
.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
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
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
andbooleanPartialImage
are unset, this will be set to the defaultCheckboxItem.checkedImage
.Spriting
can be used for this image, by setting this property to aSCSpriteConfig
formatted string. Alternatively developers can omit this property and instead use CSS directly in thebooleanBaseStyle
property to provide a "boolean true" appearance.- Returns:
- Current booleanTrueImage value. Default value is null
- See Also:
-
setBriefRowRangeDisplayValue
Dynamic String specifying the format for therow range summary value
whenRowRangeDisplayStyle
is set to"brief"
.The following variables are available for evaluation within this string:
rowRange
: theformatted row range
rowCount
: theformatted row count
- Parameters:
briefRowRangeDisplayValue
- New briefRowRangeDisplayValue value. Default value is "${rowRange} of ${rowCount}"- Returns:
ListGrid
instance, for chaining setter calls
-
getBriefRowRangeDisplayValue
Dynamic String specifying the format for therow range summary value
whenRowRangeDisplayStyle
is set to"brief"
.The following variables are available for evaluation within this string:
rowRange
: theformatted row range
rowCount
: theformatted row count
- Returns:
- Current briefRowRangeDisplayValue value. Default value is "${rowRange} of ${rowCount}"
-
setCanAcceptDroppedRecords
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
Indicates whether records can be dropped into this listGrid.- Returns:
- Current canAcceptDroppedRecords value. Default value is false
- See Also:
-
setCanAddAISortFields
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()
andsetFieldState()
.- Parameters:
canAddAISortFields
- New canAddAISortFields value. Default value is false- Returns:
ListGrid
instance, for chaining setter calls
-
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()
andsetFieldState()
.- Returns:
- Current canAddAISortFields value. Default value is false
-
setCanAutoFitFields
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 viaListGridField.autoFitWidthApproach
.
Autofitting of individual fields via aheader context menu item
, or theheaderAutoFitEvent
will also be enabled when this property is set unlessListGridField.canAutoFitWidth
is explicitly set to falseNote 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
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 viaListGridField.autoFitWidthApproach
.
Autofitting of individual fields via aheader context menu item
, or theheaderAutoFitEvent
will also be enabled when this property is set unlessListGridField.canAutoFitWidth
is explicitly set to falseNote 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
If this is an editable listGrid, andthis.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
If this is an editable listGrid, andthis.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
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 (seecollapseGroupOnRowClick
); When false the group icon is not shown and clicking on the row does not change group state. AdditionallygroupStartOpen
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
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 (seecollapseGroupOnRowClick
); When false the group icon is not shown and clicking on the row does not change group state. AdditionallygroupStartOpen
is initialized to "all".- Returns:
- Current canCollapseGroup value. Default value is true
- See Also:
-
setCanDragRecordsOut
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 disabletouch scrolling
so that touch-dragging a record starts a drag operation rather than a scroll, but see the discussion ofdrag handles
. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
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
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 disabletouch scrolling
so that touch-dragging a record starts a drag operation rather than a scroll, but see the discussion ofdrag handles
. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
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
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 disabletouch scrolling
so that touch-dragging records/cells selects them rather than starting a scroll. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
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
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 disabletouch scrolling
so that touch-dragging records/cells selects them rather than starting a scroll. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
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
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 withrearranging rows or cells by dragging
, and withdrag selection of rows
.To enable selecting cell text on click, see
selectCellTextOnClick
. -
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 withrearranging rows or cells by dragging
, and withdrag selection of rows
.To enable selecting cell text on click, see
selectCellTextOnClick
.- Returns:
- Current canDragSelectText value. Default value is false
- See Also:
-
setCanDropInEmptyArea
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
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
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 ofcanEditCell()
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
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 ofcanEditCell()
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
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 theSearchForm
class has this attribute set to"canFilter"
which allows search forms to edit dataSource fields marked ascanEdit:false
(but not those marked ascanFilter:false
).Note that if
canEdit
is explicitly specified on a field in theDataBoundComponent.fields
array, that property will be respected in preference to the canEditAttribute value. (SeeFormItem.canEdit
,ListGridField.canEdit
). Also note that individual dataBoundComponents may have additional logic around whether a field can be edited - for examplecanEditCell()
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
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 theSearchForm
class has this attribute set to"canFilter"
which allows search forms to edit dataSource fields marked ascanEdit:false
(but not those marked ascanFilter:false
).Note that if
canEdit
is explicitly specified on a field in theDataBoundComponent.fields
array, that property will be respected in preference to the canEditAttribute value. (SeeFormItem.canEdit
,ListGridField.canEdit
). Also note that individual dataBoundComponents may have additional logic around whether a field can be edited - for examplecanEditCell()
may be overridden.- Returns:
- Current canEditFieldAttribute value. Default value is "canEdit"
-
setCanEditHilites
Adds an item to the header context menu allowing users to launch a dialog to define grid hilites using theHiliteEditor
.User-added hilites can be persisted via
DataBoundComponent.getHiliteState()
andDataBoundComponent.setHiliteState()
.To avoid undefined behavior, this property must be set to
false
if the same record objects, or the sameResultSet
instances, are shared among multipleDataBoundComponent
s. -
getCanEditHilites
public boolean getCanEditHilites()Adds an item to the header context menu allowing users to launch a dialog to define grid hilites using theHiliteEditor
.User-added hilites can be persisted via
DataBoundComponent.getHiliteState()
andDataBoundComponent.setHiliteState()
.To avoid undefined behavior, this property must be set to
false
if the same record objects, or the sameResultSet
instances, are shared among multipleDataBoundComponent
s.- Returns:
- Current canEditHilites value. Default value is false
- See Also:
-
setCanEditTitles
If set to true, theadvanced 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 (seeDataBoundComponent.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, theadvanced 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 (seeDataBoundComponent.shouldIncludeTitleInFieldState()
).- Returns:
- Current canEditTitles value. Default value is false
-
setCanExpandMultipleRecords
WhencanExpandRecords
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 istrue
.- Parameters:
canExpandMultipleRecords
- New canExpandMultipleRecords value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls
-
getCanExpandMultipleRecords
WhencanExpandRecords
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 istrue
.- 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
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
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. SeeexpandRecord()
andexpansionMode
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 forcanExpandRecords
- Parameters:
canExpandRecords
- new value for listGrid.canExpandRecords. Default value is false- Returns:
ListGrid
instance, for chaining setter calls
-
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. SeeexpandRecord()
andexpansionMode
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
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 andlistEndEditAction
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 andlistEndEditAction
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
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 totrue
unless:this.fixedRecordHeights
isfalse
this.bodyOverflow
is"visible"
this.autoFitData
is set to"horizontal"
or"both"
- Any field has overflow set to
"visible"
Note that the
canFreezeFields
setting enables or disables the user interface for freezing and unfreezing fields only. Fields can be programmatically frozen via settingfield.frozen
to true when the grid is created, or dynamically frozen and unfrozen viafreezeField()
andunfreezeField()
.Developers should also be aware that if the cell content for some field exceeds the specified
cellHeight
, andenforceVClipping
is not set to true, this can cause misalignment between rows in frozen and unfrozen columns. See theFrozen fields overview
for more on this.
If this method is called after the component has been drawn/initialized: Setter method forcanFreezeFields
- Parameters:
canFreezeFields
- New value forlistGrid.canFreezeFields
. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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 totrue
unless:this.fixedRecordHeights
isfalse
this.bodyOverflow
is"visible"
this.autoFitData
is set to"horizontal"
or"both"
- Any field has overflow set to
"visible"
Note that the
canFreezeFields
setting enables or disables the user interface for freezing and unfreezing fields only. Fields can be programmatically frozen via settingfield.frozen
to true when the grid is created, or dynamically frozen and unfrozen viafreezeField()
andunfreezeField()
.Developers should also be aware that if the cell content for some field exceeds the specified
cellHeight
, andenforceVClipping
is not set to true, this can cause misalignment between rows in frozen and unfrozen columns. See theFrozen fields overview
for more on this.- Returns:
- Current canFreezeFields value. Default value is null
- See Also:
-
setCanGroupBy
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
If false, grouping via context menu will be disabled.- Returns:
- Current canGroupBy value. Default value is true
- See Also:
-
setCanHiliteViaAI
When set totrue
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
When set totrue
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
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 hasshowHover
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 classCanvas
- Parameters:
canHover
- New canHover value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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 hasshowHover
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 classCanvas
- Returns:
- Current canHover value. Default value is null
- See Also:
-
setCanMultiGroup
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
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 theDataSource doesn't support multi-sort
, or if sorting for a field isclient-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
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 theDataSource doesn't support multi-sort
, or if sorting for a field isclient-only
but not all data is available.- Returns:
- Current canMultiSort value. Default value is true
- See Also:
-
setCanPickFields
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, unlesscanPickOmittedFields
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
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, unlesscanPickOmittedFields
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
If true, thefield picker menu
will include entries for all dataSource fields, including those not included in the specifiedfields array
.This property only applies to grids with a specified
dataSource
, wherefields
is explicitly set anduseAllDataSourceFields
is false. ThecanPickFields
property must also be set to true to allow the user to view the field picker menu.Note: grids with
canPickOmittedFields:true
, like those withuseAllDataSourceFields: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 thelistGrid 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
If true, thefield picker menu
will include entries for all dataSource fields, including those not included in the specifiedfields array
.This property only applies to grids with a specified
dataSource
, wherefields
is explicitly set anduseAllDataSourceFields
is false. ThecanPickFields
property must also be set to true to allow the user to view the field picker menu.Note: grids with
canPickOmittedFields:true
, like those withuseAllDataSourceFields: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 thelistGrid fields array
.- Returns:
- Current canPickOmittedFields value. Default value is false
-
setCanRemoveRecords
If set, provide UI for the user to remove records from the grid as an additional field showing theremoveIcon
, which, when clicked, will callremoveRecordClick()
which removes the row from the data set (or ifdeferRemoval
is true changes themarkRecordRemoved()
status for the record). Individual records can be marked to prevent removal - seerecordCanRemoveProperty
.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 tosaveEdits()
. Otherwise, the record will disappear from view. IfanimateRemoveRecord
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
.
deferRemoval
is true, when a record is marked as removed, the the icon will change to display theunremoveIcon
for this row. Clicking on this icon will callunmarkRecordRemoved()
to mark the record as no longer pending deletion.
If this method is called after the component has been drawn/initialized: Updates thecanRemoveRecords
property for this listGrid at runtime.- Parameters:
canRemoveRecords
- new canRemoveRecords value. Default value is false- Returns:
ListGrid
instance, for chaining setter calls- See Also:
- To change the position of the
remove-field, include an explicitly specified field with the attribute
-
getCanRemoveRecords
If set, provide UI for the user to remove records from the grid as an additional field showing theremoveIcon
, which, when clicked, will callremoveRecordClick()
which removes the row from the data set (or ifdeferRemoval
is true changes themarkRecordRemoved()
status for the record). Individual records can be marked to prevent removal - seerecordCanRemoveProperty
.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 tosaveEdits()
. Otherwise, the record will disappear from view. IfanimateRemoveRecord
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
.
deferRemoval
is true, when a record is marked as removed, the the icon will change to display theunremoveIcon
for this row. Clicking on this icon will callunmarkRecordRemoved()
to mark the record as no longer pending deletion.- Returns:
- Current canRemoveRecords value. Default value is false
- See Also:
- To change the position of the
remove-field, include an explicitly specified field with the attribute
-
setCanReorderFields
Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields. If true, can be overridden at the field level viaListGridField.canReorder
.- Parameters:
canReorderFields
- New canReorderFields value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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 viaListGridField.canReorder
.- Returns:
- Current canReorderFields value. Default value is true
- See Also:
-
setCanReorderRecords
Indicates whether records can be reordered by dragging within thisListGrid
.NOTE: If
canReorderRecords
is initially enabled or might bedynamically enabled
after the grid is created, it may be desirable to disabletouch scrolling
so that touch-dragging a record starts a reorder operation rather than a scroll, but see the discussion ofdrag handles
. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
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 thecanReorderRecords
attribute.- Parameters:
canReorderRecords
- new value forthis.canReorderRecords
. Default value is false- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getCanReorderRecords
Indicates whether records can be reordered by dragging within thisListGrid
.NOTE: If
canReorderRecords
is initially enabled or might bedynamically enabled
after the grid is created, it may be desirable to disabletouch scrolling
so that touch-dragging a record starts a reorder operation rather than a scroll, but see the discussion ofdrag handles
. IfCanvas.disableTouchScrollingForDrag
is set totrue
, then touch scrolling will be disabled automatically. However, foraccessibility
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
Depending on whetherDataSource.progressiveLoading
is active, the exact count of available rows may not be known, andcanRequestRowCount
controls whether the end user may explicitly request it by clicking theRowRangeDisplay
label.When this property is set to
true
, the user may request an accurate row count if one is not currently known byclicking
therowRangeDisplay
. To have a row count fetch operation occur automatically when progressive data is loaded instead of requiring a user interaction to initiate the fetch, seeautoFetchRowCount
.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 usingapplyRowCountToLength
as a default. For finer grained control, a developer may set both properties to false and manage behavior by explicitly callingfetchRowCount()
andlistGrid.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 whetherDataSource.progressiveLoading
is active, the exact count of available rows may not be known, andcanRequestRowCount
controls whether the end user may explicitly request it by clicking theRowRangeDisplay
label.When this property is set to
true
, the user may request an accurate row count if one is not currently known byclicking
therowRangeDisplay
. To have a row count fetch operation occur automatically when progressive data is loaded instead of requiring a user interaction to initiate the fetch, seeautoFetchRowCount
.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 usingapplyRowCountToLength
as a default. For finer grained control, a developer may set both properties to false and manage behavior by explicitly callingfetchRowCount()
andlistGrid.data.setFullLength()
from application code.- Returns:
- Current canRequestRowCount value. Default value is false
- See Also:
-
setCanResizeFields
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 updatingcanResizeFields
at runtime.- Parameters:
canResizeFields
- new value for this.canResizeFields. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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
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. SeesavedSearchDS
,savedSearchAdminRole
.To avoid leaking local storage, this setting will be disregarded, disabling the feature, unless the grid specifies
savedSearchId
, or an explicitlocal 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. SeesavedSearchDS
,savedSearchAdminRole
.To avoid leaking local storage, this setting will be disregarded, disabling the feature, unless the grid specifies
savedSearchId
, or an explicitlocal or global ID
is present.Note: this feature requires Smart GWT Pro or better.
- Returns:
- Current canSaveSearches value. Default value is true
-
setCanSelectAll
Controls whether a checkbox for selecting all records appears in the header withselectionAppearance
set to "checkbox" -
getCanSelectAll
Controls whether a checkbox for selecting all records appears in the header withselectionAppearance
set to "checkbox"- Returns:
- Current canSelectAll value. Default value is null
- See Also:
-
setCanSelectCells
Enables cell-level selection behavior as well ascell-level rollover
.To query and manipulate cell-level selections, use
getCellSelection()
to retrieve theCellSelection
.Note that the ListGrid has a data model of one
Record
per row, unlike theCubeGrid
which supports oneCellRecord
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 usingsetData()
plussaveLocally
:true rather than record-oriented DataSources and data binding. You can also usecanSelectCells
in conjunction withSelectionAppearance
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, therowEndEditAction
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
Enables cell-level selection behavior as well ascell-level rollover
.To query and manipulate cell-level selections, use
getCellSelection()
to retrieve theCellSelection
.Note that the ListGrid has a data model of one
Record
per row, unlike theCubeGrid
which supports oneCellRecord
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 usingsetData()
plussaveLocally
:true rather than record-oriented DataSources and data binding. You can also usecanSelectCells
in conjunction withSelectionAppearance
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, therowEndEditAction
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
Controls whether a checkbox for selectinggroups
appears in the group node ifSelectionAppearance
is set to"checkbox"
-
getCanSelectGroups
public boolean getCanSelectGroups()Controls whether a checkbox for selectinggroups
appears in the group node ifSelectionAppearance
is set to"checkbox"
- Returns:
- Current canSelectGroups value. Default value is false
- See Also:
-
setCanSelectSummaryRows
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 viasummaryRowFetchRequestProperties
.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 viasummaryRowFetchRequestProperties
.- Returns:
- Current canSelectSummaryRows value. Default value is false
-
setCanShowFilterEditor
Should a menu item allowing the user to show or hide thefilter editor
be displayed in theheaderContextmenu
?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 ifcanShowFilterEditor
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 thefilter editor
be displayed in theheaderContextmenu
?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 ifcanShowFilterEditor
is true.Enabling
filter via AI
forces this setting to true.- Returns:
- Current canShowFilterEditor value. Default value is true
- See Also:
-
setCanSort
Enables or disables interactive sorting behavior for this listGrid. Does not affect sorting by direct calls to thesort
orsetSort
methods.- Parameters:
canSort
- New canSort value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls
-
getCanSort
Enables or disables interactive sorting behavior for this listGrid. Does not affect sorting by direct calls to thesort
orsetSort
methods.- Returns:
- Current canSort value. Default value is true
-
setCanTabToHeader
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 ifSC.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
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 ifSC.setScreenReaderMode()
is called.- Returns:
- Current canTabToHeader value. Default value is null
- See Also:
-
setCanTabToSorter
Should thecorner 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
Should thecorner sort button
be included in the tab-order for the page?- Returns:
- Current canTabToSorter value. Default value is false
- See Also:
-
getCellContextMenu
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
Default height for each row in pixels. SeefixedRecordHeights
andenforceVClipping
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. SeefixedRecordHeights
andenforceVClipping
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
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
Returns the default WAI ARIA role for cells within this listGrid. SeegetCellRole()
Note : This is an advanced setting
- Parameters:
cellRole
- New cellRole value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getCellRole
Returns the default WAI ARIA role for cells within this listGrid. SeegetCellRole()
- 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 ifcellRole
is specified, it will be used.If neither property is set, the default implementation will return
"gridcell"
if this listGrid hasrole:"grid"
, otherwisenull
, meaning no role will be written out for cells. Default value is null
-
setChartConstructor
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
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
Default type of chart to plot.- Parameters:
chartType
- New chartType value. Default value is "Column"- Returns:
ListGrid
instance, for chaining setter calls
-
getChartType
Default type of chart to plot.- Returns:
- Current chartType value. Default value is "Column"
-
setCheckboxFieldFalseImage
IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for an unselected row. If unset, thebooleanFalseImage
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
IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for an unselected row. If unset, thebooleanFalseImage
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 IfselectionAppearance
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 thebooleanImageHeight
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
IfselectionAppearance
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 thebooleanImageHeight
for this grid.- Returns:
- Current checkboxFieldImageHeight value. Default value is null
-
setCheckboxFieldImageWidth
public ListGrid setCheckboxFieldImageWidth(Integer checkboxFieldImageWidth) throws IllegalStateException IfselectionAppearance
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 thebooleanImageWidth
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
IfselectionAppearance
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 thebooleanImageWidth
for this grid.- Returns:
- Current checkboxFieldImageWidth value. Default value is null
-
setCheckboxFieldPartialImage
IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for a partially selected row. If unset, thebooleanPartialImage
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
IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for a partially selected row. If unset, thebooleanPartialImage
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
IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for a selected row. If unset, thebooleanTrueImage
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
IfselectionAppearance
is set to"checkbox"
this property determines the image to display in the checkbox field for a selected row. If unset, thebooleanTrueImage
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
ForexpansionModes
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
ForexpansionModes
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
If we're showing aheaderContextMenu
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
If we're showing aheaderContextMenu
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 thefilterEditor
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 thefilterEditor
from being cleared when the user hides it.- Returns:
- Current clearCriteriaOnFilterEditorHide value. Default value is true
-
setClearFilterText
If we're showing aheaderContextMenu
for this grid, and afilter-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
If we're showing aheaderContextMenu
for this grid, and afilter-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
Title for the menu-item displayed in this component's header context-menu whenAI-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
Title for the menu-item displayed in this component's header context-menu whenAI-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
If we're showing aheaderContextMenu
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
If we're showing aheaderContextMenu
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
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 onhover
.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
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 onhover
.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 IfcanCollapseGroup
is true, will a click anywhere on the group row toggle the group's expanded state? If false, the user must click thegroupIcon
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()IfcanCollapseGroup
is true, will a click anywhere on the group row toggle the group's expanded state? If false, the user must click thegroupIcon
directly to toggle the group.- Returns:
- Current collapseGroupOnRowClick value. Default value is true
- See Also:
-
setConfigureGroupingText
If we're showing aheaderContextMenu
for this grid, and multi-grouping is enabled, this attribute is used as the title for a menu item that opens aMultiGroupDialog
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
If we're showing aheaderContextMenu
for this grid, and multi-grouping is enabled, this attribute is used as the title for a menu item that opens aMultiGroupDialog
to configure the grouping for this grid.- Returns:
- Current configureGroupingText value. Default value is "Configure Grouping..."
-
setConfigureSortText
If we're showing aheaderContextMenu
for this grid, and multi-sorting is enabled, this attribute is used as the title for a menu item that opens aMultiSortDialog
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
If we're showing aheaderContextMenu
for this grid, and multi-sorting is enabled, this attribute is used as the title for a menu item that opens aMultiSortDialog
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
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
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
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
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
Ifthis.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
Ifthis.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 The color of thefilterWindow criteria indicator
.- 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
The color of thefilterWindow criteria indicator
.- Returns:
- Current criteriaIndicatorColor value. Default value is "#33AAFF"
-
setCriteriaIndicatorHeaderColor
public ListGrid setCriteriaIndicatorHeaderColor(String criteriaIndicatorHeaderColor) throws IllegalStateException The color of thefilterWindow criteria indicator
when shown on thesorter button
or the lastheader button
in the grid header. The default is to usecriteriaIndicatorColor
.- 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
The color of thefilterWindow criteria indicator
when shown on thesorter button
or the lastheader button
in the grid header. The default is to usecriteriaIndicatorColor
.- Returns:
- Current criteriaIndicatorHeaderColor value. Default value is null
-
setData
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 providingdata
, you will typically callfetchData()
instead, which will automatically establishdata
as aResultSet
(see thefetchData()
docs for details).If you call
fetchData
, any previously supplieddata
is discarded. Also, it is not necessary to callsetData()
after callingfetchData()
.When calling
setData()
, ifdata
is provided as a RecordList or ResultSet, direct changes to the list using Framework APIs such asRecordList.add()
orRecordList.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 torefreshCell()
orrefreshRow()
to cause the ListGrid to visually update. Calling methods such asupdateData()
,removeData()
oraddData()
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 asautofitWidth
:true and aselection 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
A ListGrid is adataArity
: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
A ListGrid is adataArity
:multiple component.- Returns:
- Current dataArity value. Default value is "multiple"
- See Also:
-
setDataFetchDelay
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
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
How to fetch and manage records retrieve from the server. SeeFetchMode
.This setting only applies to the
ResultSet
automatically created by callingfetchData()
. If a pre-existing ResultSet is passed to setData() instead, it's existing setting forResultSet.fetchMode
applies.- Specified by:
setDataFetchMode
in interfaceDataBoundComponent
- 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
How to fetch and manage records retrieve from the server. SeeFetchMode
.This setting only applies to the
ResultSet
automatically created by callingfetchData()
. If a pre-existing ResultSet is passed to setData() instead, it's existing setting forResultSet.fetchMode
applies.- Specified by:
getDataFetchMode
in interfaceDataBoundComponent
- Returns:
- Current dataFetchMode value. Default value is "paged"
- See Also:
-
setDataSource
The DataSource that this component should bind to for default fields and for performingDataSource 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 interfaceDataBoundComponent
- Parameters:
dataSource
- DataSource to bind to. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
setDataSource
The DataSource that this component should bind to for default fields and for performingDataSource 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 interfaceDataBoundComponent
- Parameters:
dataSource
- DataSource to bind to. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
setDateFormatter
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 alsotimeFormatter
).
IfdatetimeFormatter
is specified, that will be applied by default to fields of type"datetime"
.Note that if
ListGridField.dateFormatter
orListGridField.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
orshort 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 setdateInputFormat
.- Parameters:
dateFormatter
- New dateFormatter value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
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 alsotimeFormatter
).
IfdatetimeFormatter
is specified, that will be applied by default to fields of type"datetime"
.Note that if
ListGridField.dateFormatter
orListGridField.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
orshort 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 setdateInputFormat
.- Returns:
- Current dateFormatter value. Default value is null
-
setDateInputFormat
If this is an editable listGrid, this property will specify theinputFormat
applied to editors for fields of type"date"
. May be overridden per field viaListGridField.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
Display format to use for fields specified as type 'datetime'. Default is to use the system-wide default date time format, configured viaDateUtil.setShortDatetimeDisplayFormat()
. Specify any validDateDisplayFormat
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 setdateInputFormat
.- Parameters:
datetimeFormatter
- New datetimeFormatter value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getDatetimeFormatter
Display format to use for fields specified as type 'datetime'. Default is to use the system-wide default date time format, configured viaDateUtil.setShortDatetimeDisplayFormat()
. Specify any validDateDisplayFormat
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 setdateInputFormat
.- Returns:
- Current datetimeFormatter value. Default value is null
- See Also:
-
setDefaultDateFieldWidth
Default width for date type fields. SeeautoFitDateFields
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
Default width for date type fields. SeeautoFitDateFields
for details on how this property is used.- Returns:
- Current defaultDateFieldWidth value. Default value is varies
-
setDefaultDateTimeFieldWidth
Default width for datetime type fields. SeeautoFitDateFields
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
Default width for datetime type fields. SeeautoFitDateFields
for details on how this property is used.- Returns:
- Current defaultDateTimeFieldWidth value. Default value is varies
-
setDefaultEditableDateFieldWidth
Default width for editable date type fields. SeeautoFitDateFields
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
Default width for editable date type fields. SeeautoFitDateFields
for details on how this property is used.- Returns:
- Current defaultEditableDateFieldWidth value. Default value is varies
-
setDefaultEditableDateTimeFieldWidth
Default width for editable datetime type fields. SeeautoFitDateFields
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
Default width for editable datetime type fields. SeeautoFitDateFields
for details on how this property is used.- Returns:
- Current defaultEditableDateTimeFieldWidth value. Default value is varies
-
setDefaultFields
An array of listGrid field configuration objects. When a listGrid is initialized, if this property is set and there is no value for thefields
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 singlefields
array directly to the class viaaddProperties()
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 useaddProperties()
on our new subclass to setdefaultFields
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
An array of listGrid field configuration objects. When a listGrid is initialized, if this property is set and there is no value for thefields
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 singlefields
array directly to the class viaaddProperties()
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 useaddProperties()
on our new subclass to setdefaultFields
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 Defaultfilter operator
to use for text-based fields in this grid'sfilter editor
, when producingAdvancedCriteria
. WhenallowFilterExpressions
orallowFilterOperators
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
oroptionDataSource
.- 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
Defaultfilter operator
to use for text-based fields in this grid'sfilter editor
, when producingAdvancedCriteria
. WhenallowFilterExpressions
orallowFilterOperators
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
oroptionDataSource
.- 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 theheaderContextMenu
whenallowFilterOperators
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
Text to show after the name of the default filterOperator in theheaderContextMenu
whenallowFilterOperators
is enabled.- Returns:
- Current defaultFilterOperatorSuffix value. Default value is "(default)"
-
setDefaultTimeFieldWidth
Default width for time type fields. SeeautoFitDateFields
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
Default width for time type fields. SeeautoFitDateFields
for details on how this property is used.- Returns:
- Current defaultTimeFieldWidth value. Default value is varies
-
setDeferRemoval
When enabled, the field shown bycanRemoveRecords
causes records to be marked for future removal viamarkRecordRemoved()
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
When enabled, the field shown bycanRemoveRecords
causes records to be marked for future removal viamarkRecordRemoved()
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
Should partially selected checkbox be deselected or selected on click? This setting affectsheader selection checkbox
,group\n checkboxes
and folder checkbox selection in a Tree data set.By default clicking a partially selected checkbox selects it.
-
getDeselectOnPartialCheckboxClick
Should partially selected checkbox be deselected or selected on click? This setting affectsheader 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
IfcanExpandRecords
is true andlistGrid.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
IfcanExpandRecords
is true andlistGrid.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
The field whose contents to show in the expanded portion of a record whencanExpandRecords
istrue
andlistGrid.expansionMode
isdetailField
.- Parameters:
detailField
- New detailField value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getDetailField
The field whose contents to show in the expanded portion of a record whencanExpandRecords
istrue
andlistGrid.expansionMode
isdetailField
.- Returns:
- Current detailField value. Default value is null
-
setDisabledGroupByPrompt
Prompt to indicate that grouping is disabled as the data set size exceedsgroupByMaxRecords
.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
Prompt to indicate that grouping is disabled as the data set size exceedsgroupByMaxRecords
.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
If a user is editing acanEdit: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 acanEdit: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
IfconfirmDiscardEdits
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
IfconfirmDiscardEdits
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
An automatically generated field that can be dragged to drag the current selection (where otherwise the grid itself might be scrolled). Visibility is controlled byshowInitialDragHandles
,showDragHandles()
, andhideDragHandles()
.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
The title to use for thedrag 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
tofalse
.Note : This is an advanced setting
- Parameters:
dragHandleFieldTitle
- New dragHandleFieldTitle value. Default value is " "- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getDragHandleFieldTitle
The title to use for thedrag 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
tofalse
.- Returns:
- Current dragHandleFieldTitle value. Default value is " "
- See Also:
-
setDragHandleIcon
Default icon to show in thedrag 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
Default icon to show in thedrag handle field
..- Returns:
- Current dragHandleIcon value. Default value is "[SKIN]/actions/drag.png"
- See Also:
-
setDragHandleIconSize
Default width and height ofdrag 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 ofdrag handle icons
for this ListGrid.- Returns:
- Current dragHandleIconSize value. Default value is 16
- See Also:
-
setDragScrollRedrawDelay
LikescrollRedrawDelay
, but applies when the component is being drag-scrolled (via a scrollbar). This value is typically set higher thanscrollRedrawDelay
to avoid too many concurrent fetches to the server forResultSet
-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()LikescrollRedrawDelay
, but applies when the component is being drag-scrolled (via a scrollbar). This value is typically set higher thanscrollRedrawDelay
to avoid too many concurrent fetches to the server forResultSet
-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
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
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
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
If drawing all rows would cause less thandrawAllMaxCells
cells to be rendered, the full dataset will instead be drawn even ifshowAllRecords
is false and the viewport size anddrawAheadRatio
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 thandrawAllMaxCells
cells to be rendered, the full dataset will instead be drawn even ifshowAllRecords
is false and the viewport size anddrawAheadRatio
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
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
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
Event that will trigger inline editing, seeListGridEditEvent
for options.Note this setting has no effect unless
canEdit
has been set to enable editing.See also
editOnFocus
andstartEditing()
.- Parameters:
editEvent
- New editEvent value. Default value is "doubleClick"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getEditEvent
Event that will trigger inline editing, seeListGridEditEvent
for options.Note this setting has no effect unless
canEdit
has been set to enable editing.See also
editOnFocus
andstartEditing()
.- Returns:
- Current editEvent value. Default value is "doubleClick"
- See Also:
-
setEditFailedBaseStyle
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 fromthis.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
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 fromthis.editFailedCSSText
- Returns:
- Current editFailedBaseStyle value. Default value is null
- See Also:
-
setEditFailedCSSText
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, usethis.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
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, usethis.editFailedBaseStyle
instead.- Returns:
- Current editFailedCSSText value. Default value is "color:red;border:1px solid red;"
- See Also:
-
setEditOnF2Keypress
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"
, theSpace
orEnter
key may also be used to start editing, depending on the value forgenerateClickOnSpace
,generateDoubleClickOnSpace
,generateClickOnEnter
andgenerateDoubleClickOnEnter
.If
canEdit
is false, oreditEvent
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
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"
, theSpace
orEnter
key may also be used to start editing, depending on the value forgenerateClickOnSpace
,generateDoubleClickOnSpace
,generateClickOnEnter
andgenerateDoubleClickOnEnter
.If
canEdit
is false, oreditEvent
is set to "none" this property has no effect.- Returns:
- Current editOnF2Keypress value. Default value is true
- See Also:
-
setEditOnFocus
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
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
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
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
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 usethis.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
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 usethis.editPendingBaseStyle
instead.- Returns:
- Current editPendingCSSText value. Default value is "color:#0066CC;"
- See Also:
-
setEditPendingMarkerStyle
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 byeditPendingCSSText
oreditPendingBaseStyle
.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
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 byeditPendingCSSText
oreditPendingBaseStyle
.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
Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.- Overrides:
setEditProxyConstructor
in classLayout
- 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
Default class used to construct theEditProxy
for this component when the component isfirst placed into edit mode
.- Overrides:
getEditProxyConstructor
in classLayout
- Returns:
- Current editProxyConstructor value. Default value is "GridEditProxy"
- See Also:
-
setEditSelectionType
IfselectOnEdit
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 theeditSelectionType
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
- For grids with
-
getEditSelectionType
IfselectOnEdit
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 theeditSelectionType
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"
- For grids with
-
setEmbeddedComponentIndent
This is the pixel-amount by which child components are offset within the grid-body, by default from the left, or from the right whenRTL
is in effect. Forexpanding rows
, this attribute is overridden byexpansionIndent
.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
This is the pixel-amount by which child components are offset within the grid-body, by default from the left, or from the right whenRTL
is in effect. Forexpanding rows
, this attribute is overridden byexpansionIndent
.This setting overrides the
general margin
for embedded-components, on the appropriate side.- Returns:
- Current embeddedComponentIndent value. Default value is 25
-
setEmbeddedComponentMargin
This is the space to apply as margin around child-components embedded in this grid. This value is overridden on one side forexpansion components
byexpansionIndent
and in other scenarios byembeddedComponentIndent
.- Parameters:
embeddedComponentMargin
- New embeddedComponentMargin value. Default value is 0- Returns:
ListGrid
instance, for chaining setter calls
-
getEmbeddedComponentMargin
This is the space to apply as margin around child-components embedded in this grid. This value is overridden on one side forexpansion components
byexpansionIndent
and in other scenarios byembeddedComponentIndent
.- Returns:
- Current embeddedComponentMargin value. Default value is 0
-
setEmptyAIHoverContents
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
Hover contents to use when the AI-generated hover text is empty.- Returns:
- Current emptyAIHoverContents value. Default value is "(Empty)"
- See Also:
-
setEmptyCellValue
The value to display for cells whose value is null or the empty string after applyingformatting
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 " "- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getEmptyCellValue
The value to display for cells whose value is null or the empty string after applyingformatting
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 " "
- See Also:
-
setEmptyMessage
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
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
The CSS style name applied to theemptyMessage
if displayed.- Parameters:
emptyMessageStyle
- New emptyMessageStyle value. Default value is "emptyMessage"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getEmptyMessageStyle
The CSS style name applied to theemptyMessage
if displayed.- Returns:
- Current emptyMessageStyle value. Default value is "emptyMessage"
- See Also:
-
setEmptyRowRangeDisplayValue
Row range summary display value
when the grid is empty.- Parameters:
emptyRowRangeDisplayValue
- New emptyRowRangeDisplayValue value. Default value is " "- Returns:
ListGrid
instance, for chaining setter calls
-
getEmptyRowRangeDisplayValue
Row range summary display value
when the grid is empty.- Returns:
- Current emptyRowRangeDisplayValue value. Default value is " "
-
setEnforceVClipping
For performance reasons, even whenfixedRecordHeights
is set, vertical clipping is not enforced by default for some kinds of content (such as images) on all browsers. SetenforceVClipping: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
For performance reasons, even whenfixedRecordHeights
is set, vertical clipping is not enforced by default for some kinds of content (such as images) on all browsers. SetenforceVClipping: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
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)
- Parameters:
enterKeyEditAction
- New enterKeyEditAction value. Default value is "done"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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)
- 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 astype "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
In a ListGrid that has a DataSource and has filter criteria that include values for fields declared astype "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
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
Height of the error icon, if we're showing icons when validation errors occur.- Returns:
- Current errorIconHeight value. Default value is 16
-
setErrorIconSrc
Src of the image to show as an error icon, if we're showing icons when validation errors occur. -
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
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
Height of the error icon, if we're showing icons when validation errors occur.- Returns:
- Current errorIconWidth value. Default value is 16
-
setEscapeKeyEditAction
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).
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
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).
autoSaveEdits
is true, this may cause a save of the current edit values- Returns:
- Current escapeKeyEditAction value. Default value is "cancel"
- See Also:
-
setExactRowCountFormat
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"exact"
.The variable
rowCount
is available for evaluation within this string and will be set to thecurrent row count
as alocale-formatted number
.- Parameters:
exactRowCountFormat
- New exactRowCountFormat value. Default value is "${rowCount}"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getExactRowCountFormat
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"exact"
.The variable
rowCount
is available for evaluation within this string and will be set to thecurrent row count
as alocale-formatted number
.- Returns:
- Current exactRowCountFormat value. Default value is "${rowCount}"
- See Also:
-
setExpansionCanEdit
ForexpansionModes
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
ForexpansionModes
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 ofcomponent-pooling
to employ forexpansionComponents
.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
The method ofcomponent-pooling
to employ forexpansionComponents
.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
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Automatically generated
HTMLFlow
for displaying the contents ofa specified field
in a record's expanded section whenlistGrid.expansionMode
isdetailField
.This component is an
com.smartgwt.client.types.AutoChild
and as such may be customized vialistGrid.expansionDetailFieldProperties
andlistGrid.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
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Automatically generated
HLayout
appearing in a record's expanded section whenlistGrid.expansionMode
isdetailRelated
. This component contains two other autoChild components, aDetailViewer
for viewing fields from the record which are not already present in the grid and a separate embeddedListGrid
for displaying other data related to this record via record.detailDS. SeeexpansionDetails
andexpansionRelated
for more information.This component is an
com.smartgwt.client.types.AutoChild
and as such may be customized vialistGrid.expansionDetailRelatedProperties
andlistGrid.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
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Automatically generated
DetailViewer
for displaying the details of a record in its expanded section whenlistGrid.expansionMode
isdetails
. 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 vialistGrid.expansionDetailsProperties
andlistGrid.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
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Automatically generated
DynamicForm
for editing the details of a record in its expanded section whenlistGrid.expansionMode
iseditor
. 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 buttonThis component is an
com.smartgwt.client.types.AutoChild
and as such may be customized vialistGrid.expansionEditorProperties
andlistGrid.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
WhenExpansionMode
is editor, should the row be collapsed following a save initiated by the expansion-component'ssave 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
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing 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 vialistGrid.expansionEditorSaveButtonProperties
andlistGrid.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
The title for theexpansionEditorSaveButton
.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 WhencanExpandRecords
is true andexpansionMode
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
WhencanExpandRecords
is true andexpansionMode
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 WhencanExpandRecords
is true andexpansionMode
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
WhencanExpandRecords
is true andexpansionMode
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
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 settingcom.smartgwt.client.types.AutoChild
properties, as mentioned under the docs forexpansionField
. Default value is null - Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setExpansionFieldFalseImage
IfcanExpandRecords
is set totrue
, this property determines the image to display in the expansion field for collapsed rows. If unset, thebooleanFalseImage
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
IfcanExpandRecords
is set totrue
, this property determines the image to display in the expansion field for collapsed rows. If unset, thebooleanFalseImage
will be used.- Returns:
- Current expansionFieldFalseImage value. Default value is null
- See Also:
-
setExpansionFieldImageHeight
public ListGrid setExpansionFieldImageHeight(Integer expansionFieldImageHeight) throws IllegalStateException IfcanExpandRecords
is set totrue
, 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 thebooleanImageHeight
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
IfcanExpandRecords
is set totrue
, 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 thebooleanImageHeight
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 theexpansionFieldTrueImage
andexpansionFieldFalseImage
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 theexpansionFieldTrueImage
andexpansionFieldFalseImage
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 theexpansionFieldTrueImage
andexpansionFieldFalseImage
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 theexpansionFieldTrueImage
andexpansionFieldFalseImage
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
Custom style to apply to the image in theexpansionField
displayed in collapsible rows whencanExpandRecords
is true. Affects the icons provided byexpansionFieldTrueImage
andexpansionFieldFalseImage
.- Parameters:
expansionFieldImageStyle
- New expansionFieldImageStyle value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getExpansionFieldImageStyle
Custom style to apply to the image in theexpansionField
displayed in collapsible rows whencanExpandRecords
is true. Affects the icons provided byexpansionFieldTrueImage
andexpansionFieldFalseImage
.- Returns:
- Current expansionFieldImageStyle value. Default value is null
- See Also:
-
setExpansionFieldImageWidth
public ListGrid setExpansionFieldImageWidth(Integer expansionFieldImageWidth) throws IllegalStateException IfcanExpandRecords
is set totrue
, 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 thebooleanImageWidth
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
IfcanExpandRecords
is set totrue
, 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 thebooleanImageWidth
for this grid.- Returns:
- Current expansionFieldImageWidth value. Default value is null
-
setExpansionFieldTrueImage
IfcanExpandRecords
is set totrue
, this property determines the image to display in the expansion field for expanded rows. If unset, thebooleanTrueImage
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
IfcanExpandRecords
is set totrue
, this property determines the image to display in the expansion field for expanded rows. If unset, thebooleanTrueImage
will be used.- Returns:
- Current expansionFieldTrueImage value. Default value is null
- See Also:
-
setExpansionIndent
WhencanExpandRecords
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 whenRTL
is in effect. If unset, assumes the width of theexpansionField
, 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
WhencanExpandRecords
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 whenRTL
is in effect. If unset, assumes the width of theexpansionField
, 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
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Automatically generated
VLayout
which fills a record's expanded section and contains other builtinexpansion-components
. You can also overridegetExpansionComponent()
to provide components of your own specification.This component is an
com.smartgwt.client.types.AutoChild
and as such may be customized vialistGrid.expansionLayoutProperties
andlistGrid.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
TheExpansionMode
for records in this grid.If
canExpandRecords
is true butexpansionMode
is not set, it defaults to "detailRelated" ifdetailDS
is set, or to "details" otherwise.- Parameters:
expansionMode
- New expansionMode value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getExpansionMode
TheExpansionMode
for records in this grid.If
canExpandRecords
is true butexpansionMode
is not set, it defaults to "detailRelated" ifdetailDS
is set, or to "details" otherwise.- Returns:
- Current expansionMode value. Default value is null
-
getExpansionRelated
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Automatically generated
ListGrid
for displaying data related to a record in its expanded section whenlistGrid.expansionMode
isrelated
. TheDataSource
containing the related data is provided bygetRelatedDataSource()
which, by default, returns the DataSource referred to inListGridRecord.detailDS
.This component is an
com.smartgwt.client.types.AutoChild
and as such may be customized vialistGrid.expansionRelatedProperties
andlistGrid.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
Screen to create (viacreateScreen()
) in lieu of callinggetExpansionComponent()
.If this grid has a
dataSource
, the created screen is provided with aCanvas.dataContext
that includes the record being expanded. Be sure the expansion screen meets theserequirements
to utilize thedataContext
.- 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
Screen to create (viacreateScreen()
) in lieu of callinggetExpansionComponent()
.If this grid has a
dataSource
, the created screen is provided with aCanvas.dataContext
that includes the record being expanded. Be sure the expansion screen meets theserequirements
to utilize thedataContext
.- Returns:
- Current expansionScreen value. Default value is null
-
setExplicitFetchDelay
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 usingexportData()
orexportClientData()
, background color to use for even-numbered rows, to create a "banded" or "ledger" effect. Odd-numbered rows will use theexportDefaultBGColor
.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
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, background color to use for even-numbered rows, to create a "banded" or "ledger" effect. Odd-numbered rows will use theexportDefaultBGColor
.See
ExportBGColor
for an overview.- Returns:
- Current exportAlternateRowBGColor value. Default value is null
- See Also:
-
setExportDefaultBGColor
Default background color to use when exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
.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
Default background color to use when exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
.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
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, whether fieldhorizontal header alignments
anddata 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 usingexportData()
orexportClientData()
, whether fieldhorizontal header alignments
anddata 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
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, 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 usingexportData()
orexportClientData()
, 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
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, causes theheaderHeight
andheaderSpan 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 usingexportData()
orexportClientData()
, causes theheaderHeight
andheaderSpan heights
to be applied to the corresponding cells in the spreadsheet.- Returns:
- Current exportHeaderHeights value. Default value is false
-
setExportHiddenFieldWidth
Width to size non-visible fields (which may be specified withexportFields
orDSRequest.exportFields
) duringexportData()
orexportClientData()
, if they have no defined numericwidth
.- 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 withexportFields
orDSRequest.exportFields
) duringexportData()
orexportClientData()
, if they have no defined numericwidth
.- Returns:
- Current exportHiddenFieldWidth value. Default value is 100
- See Also:
-
setExportRawNumbers
Dictates whether numeric values should be exported as raw numbers instead of formatted values when usingexportClientData()
.This property is only consulted if
exportRawValues
is not set to true at thegrid
orfield
level. That property causes all values, including numeric values, to be exported unformatted.This is useful for cases where an explicit ListGrid formatter function simply displays the number as a formatted string for the user (for example "1,234"). Exporting that formatted string rather than the underlying numeric value causes spreadsheet applications such as Excel to lose some functionality.
If this property is not explicitly set, numeric values will be exported as raw numbers for
XLS and OOXML export
only.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
Dictates whether numeric values should be exported as raw numbers instead of formatted values when usingexportClientData()
.This property is only consulted if
exportRawValues
is not set to true at thegrid
orfield
level. That property causes all values, including numeric values, to be exported unformatted.This is useful for cases where an explicit ListGrid formatter function simply displays the number as a formatted string for the user (for example "1,234"). Exporting that formatted string rather than the underlying numeric value causes spreadsheet applications such as Excel to lose some functionality.
If this property is not explicitly set, numeric values will be exported as raw numbers for
XLS and OOXML export
only.May be overridden at the field level via
ListGridField.exportRawNumbers
.- Returns:
- Current exportRawNumbers value. Default value is null
-
setExportRawValues
Dictates whether the data in this grid should be exported raw byexportClientData()
. 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 thefield 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
Dictates whether the data in this grid should be exported raw byexportClientData()
. 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 thefield level
.- Returns:
- Current exportRawValues value. Default value is null
-
setExportWidthScale
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. SeeexportFieldWidths
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. SeeexportFieldWidths
for where this is used.- Returns:
- Current exportWidthScale value. Default value is 0.12
-
setExportWrapHeaderTitles
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, whether titles in theListGrid header
andheaderSpans
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 usingexportData()
orexportClientData()
, whether titles in theListGrid header
andheaderSpans
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
Note: This property only has an effect in Internet ExplorerAdvanced 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 callsGridRenderer.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
. SeegetBaseStyle()
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 forGridRenderer.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
- When this property is set, ListGrid cells may be styled using the
-
setFetchDelay
If we're showing the filterEditor (showFilterEditor
is true), andfilterByCell
orfilterOnKeypress
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-filterNote : 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), andfilterByCell
orfilterOnKeypress
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
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 declaredfetchFields
, 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 aSavedSearch
or thefields
configuration includes fields not declared infetchFields
, those fields will be requested from the server even if they are not included infetchFields
.In addition, any fields that are referenced by declarative features, such as
UserFormula
orListGridField.visibleWhen
, will also be automatically included, even if not listed infetchFields
. Also applies to declarativeexpansion
andhover
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, orcanEditCell()
) or may be required when other components interact with the data (such as editing a record from the grid in a form viaDynamicForm.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 iffetchFields
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 (likefetchRequestProperties
),fetchFields
wins.Note that since
fetchFields
ultimately just setsDSRequest.outputs
,DataSourceField.outputWhen
settings will overridefetchFields
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
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 declaredfetchFields
, 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 aSavedSearch
or thefields
configuration includes fields not declared infetchFields
, those fields will be requested from the server even if they are not included infetchFields
.In addition, any fields that are referenced by declarative features, such as
UserFormula
orListGridField.visibleWhen
, will also be automatically included, even if not listed infetchFields
. Also applies to declarativeexpansion
andhover
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, orcanEditCell()
) or may be required when other components interact with the data (such as editing a record from the grid in a form viaDynamicForm.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 iffetchFields
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 (likefetchRequestProperties
),fetchFields
wins.Note that since
fetchFields
ultimately just setsDSRequest.outputs
,DataSourceField.outputWhen
settings will overridefetchFields
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
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 declaredfetchFields
, 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 aSavedSearch
or thefields
configuration includes fields not declared infetchFields
, those fields will be requested from the server even if they are not included infetchFields
.In addition, any fields that are referenced by declarative features, such as
UserFormula
orListGridField.visibleWhen
, will also be automatically included, even if not listed infetchFields
. Also applies to declarativeexpansion
andhover
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, orcanEditCell()
) or may be required when other components interact with the data (such as editing a record from the grid in a form viaDynamicForm.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 iffetchFields
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 (likefetchRequestProperties
),fetchFields
wins.Note that since
fetchFields
ultimately just setsDSRequest.outputs
,DataSourceField.outputWhen
settings will overridefetchFields
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
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 declaredfetchFields
, 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 aSavedSearch
or thefields
configuration includes fields not declared infetchFields
, those fields will be requested from the server even if they are not included infetchFields
.In addition, any fields that are referenced by declarative features, such as
UserFormula
orListGridField.visibleWhen
, will also be automatically included, even if not listed infetchFields
. Also applies to declarativeexpansion
andhover
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, orcanEditCell()
) or may be required when other components interact with the data (such as editing a record from the grid in a form viaDynamicForm.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 iffetchFields
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 (likefetchRequestProperties
),fetchFields
wins.Note that since
fetchFields
ultimately just setsDSRequest.outputs
,DataSourceField.outputWhen
settings will overridefetchFields
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 IfautoFetchData
istrue
, this attribute allows the developer to declaratively specifyDSRequest
properties for the initialfetchData()
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
IfautoFetchData
istrue
, this attribute allows the developer to declaratively specifyDSRequest
properties for the initialfetchData()
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
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 byDataSource.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
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 byDataSource.getAdvancedCriteriaDescription()
.- Returns:
- Current fieldCriteriaText value. Default value is "Field criteria:"
- See Also:
-
setFieldPickerFieldProperties
public ListGrid setFieldPickerFieldProperties(String... fieldPickerFieldProperties) throws IllegalStateException Names of properties onListGridField
for which theFieldPicker
should show an editing interface, for convenience.For example, specify ["frozen", "decimalPrecision"] to allow end users to modify
ListGridField.frozen
andListGridField.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
Names of properties onListGridField
for which theFieldPicker
should show an editing interface, for convenience.For example, specify ["frozen", "decimalPrecision"] to allow end users to modify
ListGridField.frozen
andListGridField.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
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
Instance ofFieldPickerWindow
used ifuseAdvancedFieldPicker
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
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 inDataBoundComponent.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
ListGridField
s after they've been passed to this function. Consider the following methods for more efficient, more incremental changes:resizeField()
,reorderField()
,showField()
,hideField()
, orsetFieldProperties()
.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 aDataSource
, the "default binding" is used. (seeDataBoundComponent.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:
- null - a newFields value of
-
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 inDataBoundComponent.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 oncesetFields()
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, usesetFieldProperties()
or more specific APIs such assetFieldTitle()
.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
Initialfield state
for the grid.ViewState
can be used to initialize all view properties of the grid. When doing so,fieldState
is not needed becauseviewState
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 theListGridFieldState
object passed in.
Used to restore previous state retrieved from the grid by a call togetFieldState()
.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.
IfisSparse
is not explicitly passed as a parameter, sparseness will be assumed ifDataBoundComponent.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
Initialfield state
for the grid.ViewState
can be used to initialize all view properties of the grid. When doing so,fieldState
is not needed becauseviewState
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
orsummary 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 ifDataBoundComponent.sparseFieldState
is true.
When applying sparse field state to a component viasetFieldState()
, 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:
-
setFilterButtonPrompt
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
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 IfshowFilterEditor
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
IfshowFilterEditor
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
If we're showing thefilterEditor
, 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 thefilterOnKeypress
attribute. Also note thatfilterOnKeypress:true
implies filtering will occur on change to edit values for cells, even iffilterByCell
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 thefilterEditor
, 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 thefilterOnKeypress
attribute. Also note thatfilterOnKeypress:true
implies filtering will occur on change to edit values for cells, even iffilterByCell
is not set to true.- Returns:
- Current filterByCell value. Default value is true
- See Also:
-
getFilterEditor
IfshowFilterEditor
is set to true, thefilterEditor
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 listGridmyListGrid
, 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
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 generatedfilterEditor
ifshowFilterEditor
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
Properties to apply to the automatically generatedfilterEditor
ifshowFilterEditor
is true.- Returns:
- Current filterEditorProperties value. Default value is null
-
setFilterLocalData
Causes filtering to be performed against the local data set, even when adataSource
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 aResultSet
, 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'sdataSource
.filterLocalData
includes both calls tofetchData()
andfilterData()
as well as automatic filtering when thefilterEditor
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
Causes filtering to be performed against the local data set, even when adataSource
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 aResultSet
, 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'sdataSource
.filterLocalData
includes both calls tofetchData()
andfilterData()
as well as automatic filtering when thefilterEditor
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
When this attribute is true and this component has been assigned asearchForm
or is showing thefilterEditor
, data will be filtered automatically as users change values in those components.In the
filterEditor
case, this is equivalent to settingFormItem.changeOnKeypress
to true for each text-based field in theListGridField.filterEditorProperties
whenfilterByCell
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 asearchForm
or is showing thefilterEditor
, data will be filtered automatically as users change values in those components.In the
filterEditor
case, this is equivalent to settingFormItem.changeOnKeypress
to true for each text-based field in theListGridField.filterEditorProperties
whenfilterByCell
is true.- Returns:
- Current filterOnKeypress value. Default value is false
- See Also:
-
setFilterUsingText
Text for the menu item shown in theheaderContextMenu
whenallowFilterOperators
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
Text for the menu item shown in theheaderContextMenu
whenallowFilterOperators
is enabled.- Returns:
- Current filterUsingText value. Default value is "Filter using"
-
setFilterViaAIMode
If filtering of the grid is enabled, filtering-via-AI can also be enabled by setting theAIServiceMode
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
If filtering of the grid is enabled, filtering-via-AI can also be enabled by setting theAIServiceMode
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
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
Title for the menu-item displayed in this component's header context-menu whenAI-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
Title for the menu-item displayed in this component's header context-menu whenAI-assisted filtering
is allowed.- Returns:
- Current filterViaAIText value. Default value is "Filter via AI..."
- See Also:
-
getFilterWindow
Instance ofWindow
used toshow
theFilterBuilder
.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 usingautoChild
features such as settingfilterWindowFilter
properties on a grid instance or globally by changing theListGrid
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
Advanced filtering criteria, eithersimple
oradvanced
, that is combined with thefilter editor criteria
during filtering.This criteria is normally configured via
advanced filtering dialog
shown because of theallowFilterWindow
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 forfilterWindowCriteria
.- Parameters:
filterWindowCriteria
- criteria for advanced filtering. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getFilterWindowCriteria
Advanced filtering criteria, eithersimple
oradvanced
, that is combined with thefilter editor criteria
during filtering.This criteria is normally configured via
advanced filtering dialog
shown because of theallowFilterWindow
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
Instance ofCanvas
used to show visual indicator thatfilterWindowCriteria
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
Instance ofFilterBuilder
shown infilterWindow
byshowFilterWindow()
. SeefilterWindow
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 thefilterWindow
.- 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
The instruction text to display at the top of thefilterWindow
.- 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
The title for theadvanced 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
The title for theadvanced filtering window
.- Returns:
- Current filterWindowTitle value. Default value is "Advanced Filtering"
- See Also:
-
setFirstCellStyle
The style to apply to the first cell in each row, whenstyledRowEnds
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
The style to apply to the first cell in each row, whenstyledRowEnds
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
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
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
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 defaultcellHeight
is treated as a minimum.Setting
fixedRecordHeights
to false enables thevirtualScrolling
system.NOTE:
- Setting
fixedRecordHeights to false for
CubeGrid
is not supported, though a similar option for the row headers is available asCubeGrid.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 forfixedRecordHeights
Note : This is an advanced setting
- Parameters:
fixedRecordHeights
- New fixedRecordHeights value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
- Setting
fixedRecordHeights to false for
-
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 defaultcellHeight
is treated as a minimum.Setting
fixedRecordHeights
to false enables thevirtualScrolling
system.NOTE:
- Setting
fixedRecordHeights to false for
CubeGrid
is not supported, though a similar option for the row headers is available asCubeGrid.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:
- Setting
fixedRecordHeights to false for
-
setFormulaBuilderSpanTitleSeparator
If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInFormulaBuilder
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
If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInFormulaBuilder
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
If we're showing aheaderContextMenu
for this grid andthis.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, withtitle
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
If we're showing aheaderContextMenu
for this grid andthis.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, withtitle
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
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
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
Maximum width available for anyfrozen 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 thefrozenFieldsMaxWidth
attribute- Parameters:
frozenFieldsMaxWidth
- new maximum width for frozen fields. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getFrozenFieldsMaxWidth
Maximum width available for anyfrozen 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
Maximum width available for anyfrozen 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 thefrozenFieldsMaxWidth
attribute- Parameters:
frozenFieldsMaxWidth
- new maximum width for frozen fields. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getFrozenFieldsMaxWidthAsInt
Maximum width available for anyfrozen 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
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
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
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
Dynamic String specifying the format for therow range summary value
whenRowRangeDisplayStyle
is set to"full"
.The following variables are available for evaluation within this string:
rowRange
: theformatted row range
rowCount
: theformatted row count
- Parameters:
fullRowRangeDisplayValue
- New fullRowRangeDisplayValue value. Default value is "Showing ${rowRange} of ${rowCount} rows"- Returns:
ListGrid
instance, for chaining setter calls
-
getFullRowRangeDisplayValue
Dynamic String specifying the format for therow range summary value
whenRowRangeDisplayStyle
is set to"full"
.The following variables are available for evaluation within this string:
rowRange
: theformatted row range
rowCount
: theformatted row count
- Returns:
- Current fullRowRangeDisplayValue value. Default value is "Showing ${rowRange} of ${rowCount} rows"
-
setGenerateClickOnEnter
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
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
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
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
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
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
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
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 thefilterWindowCriteria
, if any. The descriptive text is formatted byDataSource.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
The additional criteria prefix to show in filter editor field hover, the filter action button or the sorter button before the descriptive version of thefilterWindowCriteria
, if any. The descriptive text is formatted byDataSource.getAdvancedCriteriaDescription()
.- Returns:
- Current gridAdditionalCriteriaText value. Default value is "Grid additional criteria:"
- See Also:
-
setGridComponents
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 ofgridComponents
is an Array ofListGridComponent
s listing the standard components in their default order:[ListGridComponent.FILTER_EDITOR, ListGridComponent.HEADER, ListGridComponent.BODY, ListGridComponent.SUMMARY_ROW]
You can overridegridComponents
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 (egshowFilterEditor
). 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 standardListGridComponent
types may differ across different listGrids. For example if this grid has anyfrozen 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
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 ofgridComponents
is an Array ofListGridComponent
s listing the standard components in their default order:[ListGridComponent.FILTER_EDITOR, ListGridComponent.HEADER, ListGridComponent.BODY, ListGridComponent.SUMMARY_ROW]
You can overridegridComponents
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 (egshowFilterEditor
). 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 standardListGridComponent
types may differ across different listGrids. For example if this grid has anyfrozen 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
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 ofgridComponents
is an Array ofListGridComponent
s listing the standard components in their default order:[ListGridComponent.FILTER_EDITOR, ListGridComponent.HEADER, ListGridComponent.BODY, ListGridComponent.SUMMARY_ROW]
You can overridegridComponents
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 (egshowFilterEditor
). 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 standardListGridComponent
types may differ across different listGrids. For example if this grid has anyfrozen 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
IfshowGridSummary
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
IfshowGridSummary
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
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 asgroupByAsyncThreshold
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 asgroupByAsyncThreshold
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
List of fields to group grid records. If only a single field is used, that field may be specified as a string. After initialization, usegroupBy()
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
List of fields to group grid records. If only a single field is used, that field may be specified as a string. After initialization, usegroupBy()
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
If this grid isgrouped
, andshowGroupSummary
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 thegroupByFieldSummaries
attributeNote : 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
If this grid isgrouped
, andshowGroupSummary
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
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 togroupBy()
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 togroupBy()
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
Warning shown to the user when a grouping attempt failed as the data set length exceedsgroupByMaxRecords
.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 thegroupByMaxRecords
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 exceedsgroupByMaxRecords
.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
Warning shown to the user when a grouping attempt failed as the data set length exceedsgroupByMaxRecords
.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 thegroupByMaxRecords
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 exceedsgroupByMaxRecords
.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
If we're showing aheaderContextMenu
for this grid andthis.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, withtitle
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
If we're showing aheaderContextMenu
for this grid andthis.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, withtitle
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 andthis.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 dynamicgroupByText
string. Default value is "Group by ${title}" - See Also:
-
setGroupIcon
The URL of the base icon for the group icons in this listGrid. Default value may be overridden by thecurrent skin
. -
getGroupIcon
The URL of the base icon for the group icons in this listGrid. Default value may be overridden by thecurrent skin
.- Returns:
- Current groupIcon value. Default value is "[SKINIMG]/TreeGrid/opener.gif"
- See Also:
-
setGroupIconSize
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
Custom style to apply to thegroupIcon
displayed in collapsible rows whencanGroupBy
is true.- Parameters:
groupIconStyle
- New groupIconStyle value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getGroupIconStyle
Custom style to apply to thegroupIcon
displayed in collapsible rows whencanGroupBy
is true.- Returns:
- Current groupIconStyle value. Default value is null
- See Also:
-
setGroupIndentSize
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:
-
groupBy(java.lang.String...)
com.smartgwt.client.widgets.grid.ListGrid#getGroupNodeHTML
-
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:
-
groupBy(java.lang.String...)
com.smartgwt.client.widgets.grid.ListGrid#getGroupNodeHTML
-
setGroupLeadingIndent
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:
-
groupBy(java.lang.String...)
com.smartgwt.client.widgets.grid.ListGrid#getGroupNodeHTML
-
getGroupLeadingIndent
public int getGroupLeadingIndent()Default number of pixels by which to indent all groups.- Returns:
- Current groupLeadingIndent value. Default value is 10
- See Also:
-
groupBy(java.lang.String...)
com.smartgwt.client.widgets.grid.ListGrid#getGroupNodeHTML
-
setGroupNodeBaseStyle
- Parameters:
groupNodeBaseStyle
- New groupNodeBaseStyle value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getGroupNodeBaseStyle
- Returns:
- Current groupNodeBaseStyle value. Default value is null
-
setGroupNodeStyle
The CSS style thatgroup
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 forshowRollOver
,alternateRecordStyles
, etc). To enable stateful styling for groupNodes, set this property tonull
and specify agroupNodeBaseStyle
- Parameters:
groupNodeStyle
- New groupNodeStyle value. Default value is "groupNode"- Returns:
ListGrid
instance, for chaining setter calls
-
getGroupNodeStyle
The CSS style thatgroup
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 forshowRollOver
,alternateRecordStyles
, etc). To enable stateful styling for groupNodes, set this property tonull
and specify agroupNodeBaseStyle
- Returns:
- Current groupNodeStyle value. Default value is "groupNode"
-
setGroupSortDirection
WhensortByGroupFirst
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
WhensortByGroupFirst
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
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 becauseviewState
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 theListGridGroupState
object passed in.
Used to restore previous state retrieved from the grid by a call togetGroupState()
.- 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
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 becauseviewState
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 tosetGroupState()
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
IfshowGroupSummary
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
IfshowGroupSummary
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
ListGridRecord.customStyle
for the group-level summary row displayed whenshowGroupSummary
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
ListGridRecord.customStyle
for the group-level summary row displayed whenshowGroupSummary
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 generatedgroupTitleColumn
.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
Custom properties for the automatically generatedgroupTitleColumn
.See
showGroupTitleColumn
for an overview of the groupTitleColumn.- Returns:
- Current groupTitleColumnProperties value. Default value is null
-
setGroupTitleField
When a list grid isgrouped
, 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, agroupTitleColumn
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
When a list grid isgrouped
, 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, agroupTitleColumn
can be automatically generated to show the title for each group.- Returns:
- Current groupTitleField value. Default value is null
- See Also:
-
getGroupTree
The data tree that results from a call togroupBy()
. This will be aResultTree
ifdataSource
is present, otherwise it will be aTree
.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
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
- 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
- Returns:
- Returns the
role
for this listGrid'sheader
.If
headerAriaRole
is explicitly provided, it will be used.
Otherwise default implementation returns"row"
ifariaRole
is set to"grid"
. Default value is null
-
setHeaderAutoFitEvent
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
orListGridField.canAutoFitWidth
is set totrue
.- 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
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
orListGridField.canAutoFitWidth
is set totrue
.- Returns:
- Current headerAutoFitEvent value. Default value is "doubleClick"
-
setHeaderBackgroundColor
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
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
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
Set the CSS style used for the header as a whole.- Returns:
- Current headerBarStyle value. Default value is null
- See Also:
-
setHeaderBaseStyle
Button.baseStyle
to apply to the buttons in the header, and the sorter, for this ListGrid. Note that, depending on theClass
of the header buttons, you may also need to setheaderTitleStyle
.- 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
Button.baseStyle
to apply to the buttons in the header, and the sorter, for this ListGrid. Note that, depending on theClass
of the header buttons, you may also need to setheaderTitleStyle
.- Returns:
- Current headerBaseStyle value. Default value is null
- See Also:
-
setHeaderButtonAriaRole
- 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
- Returns:
- Returns the
role
for this listGrid'sheader buttons
.If
ListGridField.headerButtonAriaRole
orheaderButtonAriaRole
is set, it will be used.
Othewise, the default implementation returns"columnheader"
ifariaRole
is set to"grid"
,"button"
otherwise. Default value is null
-
setHeaderButtonAriaState
DefaultARIA state
forheader buttons
. SeegetHeaderButtonAriaState()
.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
- 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 anyListGridField.headerButtonAriaState
properties specified on the field itself, plus the following attributes:haspopup
- true if the button should show the header context menucolindex
- index of the column ifariaRole
is"grid"
sort
- "ascending", "descending" or "none" depending on the sort-state of the field
-
setHeaderButtonProperties
public ListGrid setHeaderButtonProperties(Button headerButtonProperties) throws IllegalStateException Properties to apply to all header buttons. Overrides defaults applied viaheaderButtonDefaults
.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
Properties to apply to all header buttons. Overrides defaults applied viaheaderButtonDefaults
.- Returns:
- Current headerButtonProperties value. Default value is null
- See Also:
-
getHeaderContextMenu
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
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
This property may be set to customize the alignment for the hover shown onListGrid.headerHover()
.- Parameters:
headerHoverAlign
- New headerHoverAlign value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getHeaderHoverAlign
This property may be set to customize the alignment for the hover shown onListGrid.headerHover()
.- Returns:
- Current headerHoverAlign value. Default value is null
-
setHeaderHoverHeight
Optional default height for the hover shown onListGrid.headerHover()
.- Parameters:
headerHoverHeight
- New headerHoverHeight value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getHeaderHoverHeight
Optional default height for the hover shown onListGrid.headerHover()
.- Returns:
- Current headerHoverHeight value. Default value is null
-
setHeaderHoverOpacity
This property may be set to customize the opacity for the hover shown onListGrid.headerHover()
.- Parameters:
headerHoverOpacity
- New headerHoverOpacity value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getHeaderHoverOpacity
This property may be set to customize the opacity for the hover shown onListGrid.headerHover()
.- Returns:
- Current headerHoverOpacity value. Default value is null
-
setHeaderHoverStyle
This property may be set to customize the css style for the hover shown onListGrid.headerHover()
.- Parameters:
headerHoverStyle
- New headerHoverStyle value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getHeaderHoverStyle
This property may be set to customize the css style for the hover shown onListGrid.headerHover()
.- Returns:
- Current headerHoverStyle value. Default value is null
- See Also:
-
setHeaderHoverVAlign
This property may be set to customize the vertical alignment for the hover shown onListGrid.headerHover()
.- Parameters:
headerHoverVAlign
- New headerHoverVAlign value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getHeaderHoverVAlign
This property may be set to customize the vertical alignment for the hover shown onListGrid.headerHover()
.- Returns:
- Current headerHoverVAlign value. Default value is null
-
setHeaderHoverWidth
Optional default width for the hover shown onListGrid.headerHover()
.- Parameters:
headerHoverWidth
- New headerHoverWidth value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getHeaderHoverWidth
Optional default width for the hover shown onListGrid.headerHover()
.- Returns:
- Current headerHoverWidth value. Default value is null
-
setHeaderHoverWrap
This property may be set to customize thewrap
attribute for the hover shown onListGrid.headerHover()
.- Parameters:
headerHoverWrap
- New headerHoverWrap value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getHeaderHoverWrap
This property may be set to customize thewrap
attribute for the hover shown onListGrid.headerHover()
.- Returns:
- Current headerHoverWrap value. Default value is null
-
getHeaderMenuButton
IfshowHeaderMenuButton
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 (seedisplayHeaderContextMenu()
).Several properties
exist to customize the appearance of the headerMenuButton. Also see thecom.smartgwt.client.types.AutoChild
documentation for information on how to make free-form modifications to autoChild widgetsThis 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
IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
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()IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
- Returns:
- Current headerMenuButtonHeight value. Default value is "100%"
- See Also:
-
setHeaderMenuButtonHeight
public ListGrid setHeaderMenuButtonHeight(String headerMenuButtonHeight) throws IllegalStateException IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
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
IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
- Returns:
- Current headerMenuButtonHeight value. Default value is "100%"
- See Also:
-
setHeaderMenuButtonIcon
IfshowHeaderMenuButton
is true, this property governs the icon shown on the auto-generatedheaderMenuButton
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
IfshowHeaderMenuButton
is true, this property governs the icon shown on the auto-generatedheaderMenuButton
- Returns:
- Current headerMenuButtonIcon value. Default value is "[SKIN]/ListGrid/headerMenuButton_icon.gif"
- See Also:
-
setHeaderMenuButtonIconHeight
public ListGrid setHeaderMenuButtonIconHeight(int headerMenuButtonIconHeight) throws IllegalStateException IfshowHeaderMenuButton
is true, this property governs the height of the icon shown on the auto-generatedheaderMenuButton
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()IfshowHeaderMenuButton
is true, this property governs the height of the icon shown on the auto-generatedheaderMenuButton
- Returns:
- Current headerMenuButtonIconHeight value. Default value is 7
-
setHeaderMenuButtonIconWidth
public ListGrid setHeaderMenuButtonIconWidth(int headerMenuButtonIconWidth) throws IllegalStateException IfshowHeaderMenuButton
is true, this property governs the width of the icon shown on the auto-generatedheaderMenuButton
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()IfshowHeaderMenuButton
is true, this property governs the width of the icon shown on the auto-generatedheaderMenuButton
- Returns:
- Current headerMenuButtonIconWidth value. Default value is 7
-
setHeaderMenuButtonSnapOffsetLeft
Offset of the right edge of aheaderMenuButton
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
Offset of the right edge of aheaderMenuButton
from the right edge of it's parent button.- Returns:
- Current headerMenuButtonSnapOffsetLeft value. Default value is 0
-
setHeaderMenuButtonWidth
IfshowHeaderMenuButton
is true, this property governs the width of the auto-generatedheaderMenuButton
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()IfshowHeaderMenuButton
is true, this property governs the width of the auto-generatedheaderMenuButton
- Returns:
- Current headerMenuButtonWidth value. Default value is 16
- See Also:
-
setHeaderRadius
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 theheader
, and to the right of thecorner sort-button
if it's visible, or the right of theheader
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 forheaderRadius
, which provides rounded corners for this grid'sheader 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
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 theheader
, and to the right of thecorner sort-button
if it's visible, or the right of theheader
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
IfshowHeaderShadow
is true, theCanvas.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
IfshowHeaderShadow
is true, theCanvas.shadowColor
for the header shadow.- Returns:
- Current headerShadowColor value. Default value is null
- See Also:
-
setHeaderShadowHOffset
IfshowHeaderShadow
is true, theCanvas.shadowHOffset
for the header shadowNote : 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()IfshowHeaderShadow
is true, theCanvas.shadowHOffset
for the header shadow- Returns:
- Current headerShadowHOffset value. Default value is 0
-
setHeaderShadowSoftness
IfshowHeaderShadow
is true, theCanvas.shadowSoftness
for the header shadowNote : 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()IfshowHeaderShadow
is true, theCanvas.shadowSoftness
for the header shadow- Returns:
- Current headerShadowSoftness value. Default value is 1
-
setHeaderShadowVOffset
IfshowHeaderShadow
is true, theCanvas.shadowVOffset
for the header shadowNote : 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()IfshowHeaderShadow
is true, theCanvas.shadowVOffset
for the header shadow- Returns:
- Current headerShadowVOffset value. Default value is 1
-
getHeaderSpan
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.headerSpans
are created via thecom.smartgwt.client.types.AutoChild
pattern, henceheaderSpanConstructor
,headerSpanDefaults
andheaderSpanProperties
are valid.- Returns:
- null
-
setHeaderSpanHeight
Default height for aheaderSpan
with no height specified.If
headerSpanHeight
is not specified (the default), headerSpans will be 1/2 ofheaderHeight
.- 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
Default height for aheaderSpan
with no height specified.If
headerSpanHeight
is not specified (the default), headerSpans will be 1/2 ofheaderHeight
.- Returns:
- Current headerSpanHeight value. Default value is null
-
setHeaderSpans
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. SeeHeaderSpan.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 setheaderHeight
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 toheaderSpans
. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
setHeaderTitleStyle
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 ifheaderButtonConstructor
is set toStretchImgButton
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
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 ifheaderButtonConstructor
is set toStretchImgButton
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 settingListGridField.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
Specifies vertical alignment in the column headers: "top", "center", or "bottom". Can be overridden for individual fields by settingListGridField.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
If true, causes thesummaryRow
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
If true, causes thesummaryRow
component to be hidden if it has no data after summaries have been recalculated- Returns:
- Current hideEmptySummaryRow value. Default value is null
-
setHideFilterEditorTitle
WhencanShowFilterEditor
is true, this is the title for the filterEditor show/hide menu-item, in theheaderContextmenu
, 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
WhencanShowFilterEditor
is true, this is the title for the filterEditor show/hide menu-item, in theheaderContextmenu
, 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 theHilite.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
If set, end users can create advanced hiliting rules that will use theHilite.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
If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInHiliteEditor
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
If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInHiliteEditor
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 afterformatting
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 afterformatting
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
Height for hilite icons for this listGrid. OverrideshiliteIconSize
. Can be overridden at the field level -
getHiliteIconHeight
Height for hilite icons for this listGrid. OverrideshiliteIconSize
. Can be overridden at the field level- Returns:
- Current hiliteIconHeight value. Default value is null
- See Also:
-
setHiliteIconLeftPadding
How much padding should there be on the left ofhilite icons
by default? Can be overridden at the field level -
getHiliteIconLeftPadding
public int getHiliteIconLeftPadding()How much padding should there be on the left ofhilite 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 WhenhiliteIcons
are present, where the hilite icon will be placed relative to the field value. SeeHiliteIconPosition
. 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
WhenhiliteIcons
are present, where the hilite icon will be placed relative to the field value. SeeHiliteIconPosition
. Can be overridden at the field level.- Returns:
- Current hiliteIconPosition value. Default value is "before"
- See Also:
-
setHiliteIconRightPadding
How much padding should there be on the right ofhilite icons
by default? Can be overridden at the field level -
getHiliteIconRightPadding
public int getHiliteIconRightPadding()How much padding should there be on the right ofhilite icons
by default? Can be overridden at the field level- Returns:
- Current hiliteIconRightPadding value. Default value is 2
- See Also:
-
setHiliteIcons
Specifies a list of icons that can be used inhilites
.hiliteIcons
should be specified as an Array ofSCImgURL
. When present, the hilite editing interface shown whenDataBoundComponent.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
Specifies a list of icons that can be used inhilites
.hiliteIcons
should be specified as an Array ofSCImgURL
. When present, the hilite editing interface shown whenDataBoundComponent.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
Default width and height ofhilite icons
for this component. Can be overridden at the component level via explicithiliteIconWidth
andhiliteIconHeight
, or at the field level viahiliteIconSize
,hiliteIconWidth
andhiliteIconHeight
- 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 ofhilite icons
for this component. Can be overridden at the component level via explicithiliteIconWidth
andhiliteIconHeight
, or at the field level viahiliteIconSize
,hiliteIconWidth
andhiliteIconHeight
- Returns:
- Current hiliteIconSize value. Default value is 12
- See Also:
-
setHiliteIconWidth
Width for hilite icons for this component. OverrideshiliteIconSize
. Can be overridden at the field level. -
getHiliteIconWidth
Width for hilite icons for this component. OverrideshiliteIconSize
. 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 whenhiliteCanReplaceValue
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
Title used for the text box shown whenhiliteCanReplaceValue
is set.- Returns:
- Current hiliteReplaceValueFieldTitle value. Default value is "Replace value with"
-
setHiliteRowOnFocus
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 ifshowRollOver
is true.- Parameters:
hiliteRowOnFocus
- New hiliteRowOnFocus value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
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 ifshowRollOver
is true.- Returns:
- Current hiliteRowOnFocus value. Default value is null
-
setHiliteViaAIMode
WhencanHiliteViaAI
istrue
, 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
WhencanHiliteViaAI
istrue
, the AI service mode to use.- Returns:
- Current hiliteViaAIMode value. Default value is "hybrid"
-
setHiliteViaAIText
Title for the menu item displayed in this component's header context menu whenAI-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
Title for the menu item displayed in this component's header context menu whenAI-assisted hiliting
is allowed.- Returns:
- Current hiliteViaAIText value. Default value is "Hilite via AI..."
- See Also:
-
setHoverMode
WhenshowHoverComponents
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 overridegetCellHoverComponent()
to provide a custom hover widget - in that case, this attribute is ignored.If
showHoverComponents
is true buthoverMode
is not set, it defaults to "detailRelated" ifdetailDS
is set, or to "details" otherwise. IfshowHoverComponents
is not set (ie, is null) andhoverMode
is set,showHoverComponents
defaults to true.- Parameters:
hoverMode
- New hoverMode value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getHoverMode
WhenshowHoverComponents
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 overridegetCellHoverComponent()
to provide a custom hover widget - in that case, this attribute is ignored.If
showHoverComponents
is true buthoverMode
is not set, it defaults to "detailRelated" ifdetailDS
is set, or to "details" otherwise. IfshowHoverComponents
is not set (ie, is null) andhoverMode
is set,showHoverComponents
defaults to true.- Returns:
- Current hoverMode value. Default value is null
-
setHoverScreen
Screen to create (viacreateScreen()
) in lieu of callinggetHoverComponent()
orgetCellHoverComponent()
.If this grid has a
dataSource
, the created screen is provided with aCanvas.dataContext
that includes the record being shown at the row.- Overrides:
setHoverScreen
in classCanvas
- 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
Screen to create (viacreateScreen()
) in lieu of callinggetHoverComponent()
orgetCellHoverComponent()
.If this grid has a
dataSource
, the created screen is provided with aCanvas.dataContext
that includes the record being shown at the row.- Overrides:
getHoverScreen
in classCanvas
- Returns:
- Current hoverScreen value. Default value is null
-
setHoverStyle
Style to apply to hovers shown over this grid.Note : This is an advanced setting
- Overrides:
setHoverStyle
in classCanvas
- Parameters:
hoverStyle
- New hoverStyle value. Default value is "gridHover"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getHoverStyle
Style to apply to hovers shown over this grid.- Overrides:
getHoverStyle
in classCanvas
- Returns:
- Current hoverStyle value. Default value is "gridHover"
- See Also:
-
setIconCursor
Default cursor to display when the user rolls over icons within cells of antype: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 forvalueIcons
.
SeegetValueIconCursor()
for more details.- Parameters:
iconCursor
- New iconCursor value. Default value is Canvas.POINTER- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getIconCursor
Default cursor to display when the user rolls over icons within cells of antype: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 forvalueIcons
.
SeegetValueIconCursor()
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 leveliconCursor
. Default value is Canvas.POINTER - See Also:
-
setIconPadding
When usingautoFitFieldWidths
, 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
When usingautoFitFieldWidths
, padding in pixels left on each side of fields that show images.- Returns:
- Current iconPadding value. Default value is 2
-
setImageSize
Default size of thumbnails shown for fieldTypes image and imageFile. Overrideable on a per-field basis viaListGridField.imageSize
orListGridField.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 viaListGridField.imageSize
orListGridField.imageWidth
/ListGridField.imageHeight
- Returns:
- Current imageSize value. Default value is 16
- See Also:
-
setIncludeHilitesInSummaryFields
When assembling a value for asummary 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 asummary 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
Property name on a record that will be checked to determine whether a record should be included when calculating totals for thegrid summary
.- Parameters:
includeInSummaryProperty
- New includeInSummaryProperty value. Default value is "includeInSummary"- Returns:
ListGrid
instance, for chaining setter calls
-
getIncludeInSummaryProperty
Property name on a record that will be checked to determine whether a record should be included when calculating totals for thegrid summary
.- Returns:
- Current includeInSummaryProperty value. Default value is "includeInSummary"
-
setInitialSort
An array ofSortSpecifier
objects used to set up the initial sort configuration for this grid. If specified, this will be used instead of anysortField
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
An array ofSortSpecifier
objects used to set up the initial sort configuration for this grid. If specified, this will be used instead of anysortField
specified.- Returns:
- Current initialSort value. Default value is null
-
setInstantScrollTrackRedraw
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, thescrollRedrawDelay
applies.- Parameters:
instantScrollTrackRedraw
- New instantScrollTrackRedraw value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls
-
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, thescrollRedrawDelay
applies.- Returns:
- Current instantScrollTrackRedraw value. Default value is true
-
setInvalidSummaryValue
Value to display to the user if showing summary values (throughshowGridSummary
,showGroupSummary
orlistGridFieldType:"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 - viasetCellFormatter()
orformatGridSummary()
, for example - this property has no effect.Note : This is an advanced setting
- Parameters:
invalidSummaryValue
- New invalidSummaryValue value. Default value is " "- Returns:
ListGrid
instance, for chaining setter calls
-
getInvalidSummaryValue
Value to display to the user if showing summary values (throughshowGridSummary
,showGroupSummary
orlistGridFieldType:"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 - viasetCellFormatter()
orformatGridSummary()
, for example - this property has no effect.- Returns:
- Current invalidSummaryValue value. Default value is " "
-
getIsGrouped
True if this listGrid is grouped, false otherwiseNote : 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
Ifrecord[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
Ifrecord[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
The style to apply to the last cell in each row, whenstyledRowEnds
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
The style to apply to the last cell in each row, whenstyledRowEnds
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
IfshowHeaderMenuButton
is true, when auto-fitting fields to the title width viaautoFitFieldWidths
orListGridField.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 thegrid level
. If not explicitly specified space will be left for fields withListGridField.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
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 classLayout
- Parameters:
leaveScrollbarGap
- New leaveScrollbarGap value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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 classLayout
- Returns:
- Current leaveScrollbarGap value. Default value is true
- See Also:
-
setLinkTextProperty
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
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
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 theEditing 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
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 theEditing Unsaved Records overview
for context about how newly added records behave.- Returns:
- Current listEndEditAction value. Default value is null
- See Also:
-
setLoadingDataMessage
The string to display in the body of a listGrid while data is being loaded. Use"${loadingImage}"
to includea loading image
.- Parameters:
loadingDataMessage
- New loadingDataMessage value. Default value is "${loadingImage} Loading data..."- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getLoadingDataMessage
The string to display in the body of a listGrid while data is being loaded. Use"${loadingImage}"
to includea loading image
.- Returns:
- Current loadingDataMessage value. Default value is "${loadingImage} Loading data..."
- See Also:
-
setLoadingDataMessageStyle
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
The CSS style name applied to the loadingDataMessage string if displayed.- Returns:
- Current loadingDataMessageStyle value. Default value is "loadingDataMessage"
- See Also:
-
setLoadingMessage
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 " "- Returns:
ListGrid
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
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 " "
-
setLoadingRowCountDisplayIcoHeight
Height for theloadingRowCountDisplayIcon
- Parameters:
loadingRowCountDisplayIcoHeight
- New loadingRowCountDisplayIcoHeight value. Default value is 16- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getLoadingRowCountDisplayIcoHeight
public int getLoadingRowCountDisplayIcoHeight()Height for theloadingRowCountDisplayIcon
- Returns:
- Current loadingRowCountDisplayIcoHeight value. Default value is 16
- See Also:
-
setLoadingRowCountDisplayIcon
The URL of the icon to display as arow 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
The URL of the icon to display as arow count value
when the row count is loading.- Returns:
- Current loadingRowCountDisplayIcon value. Default value is "[SKINIMG]/loading_horizontal.gif"
- See Also:
-
setLoadingRowCountDisplayIconWidth
Width for theloadingRowCountDisplayIcon
- Parameters:
loadingRowCountDisplayIconWidth
- New loadingRowCountDisplayIconWidth value. Default value is 16- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getLoadingRowCountDisplayIconWidth
public int getLoadingRowCountDisplayIconWidth()Width for theloadingRowCountDisplayIcon
- Returns:
- Current loadingRowCountDisplayIconWidth value. Default value is 16
- See Also:
-
setLocateColumnsBy
WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.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).
- Parameters:
locateColumnsBy
- New locateColumnsBy value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getLocateColumnsBy
WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.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).
- Returns:
- Current locateColumnsBy value. Default value is null
- See Also:
-
setLocateRowsBy
WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.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 thetitleField
, 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. TherowLocatorField
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.
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
WhenAutoTest.getElement()
is used to parse locator strings generated byAutoTest.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 thetitleField
, 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. TherowLocatorField
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.
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
When the length of the field specified byDataSourceField.length
exceeds this value, the ListGrid shows an edit field of typelongTextEditorType
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 byDataSourceField.length
exceeds this value, the ListGrid shows an edit field of typelongTextEditorType
rather than the standard text field when the field enters inline edit mode.- Returns:
- Current longTextEditorThreshold value. Default value is 255
- See Also:
-
setLongTextEditorType
When the length of the field specified byDataSourceField.length
exceedsthis.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
When the length of the field specified byDataSourceField.length
exceedsthis.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
WhencanExpandRecords
andcanExpandMultipleRecords
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 (seemaxExpandedRecordsPrompt
) 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
WhencanExpandRecords
andcanExpandMultipleRecords
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 (seemaxExpandedRecordsPrompt
) 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 variablecount
will be available and set to this.maxExpandedRecords. The string will be executed in the scope of the ListGrid sothis
may also be used to determine other information about this grid.Default value returns
This grid is limited to
[
simultaneously expanded records. Please collapse some expanded records and retry.maxExpandedRecords
]- 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
This is a dynamic string - text within${...}
will be evaluated as JS code when the message is displayed. Note that the local variablecount
will be available and set to this.maxExpandedRecords. The string will be executed in the scope of the ListGrid sothis
may also be used to determine other information about this grid.Default value returns
This grid is limited to
[
simultaneously expanded records. Please collapse some expanded records and retry.maxExpandedRecords
]- 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
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"maximum"
.The variable
rowCount
is available for evaluation within this string and will be set to thecurrent row count
as alocale-formatted number
.- Parameters:
maximumRowCountFormat
- New maximumRowCountFormat value. Default value is "-${rowCount}"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getMaximumRowCountFormat
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"maximum"
.The variable
rowCount
is available for evaluation within this string and will be set to thecurrent row count
as alocale-formatted number
.- Returns:
- Current maximumRowCountFormat value. Default value is "-${rowCount}"
- See Also:
-
setMaxSummaryRowRecords
IfshowGridSummary
is true, and summary records are being derived from a fetch against thesummaryRowDataSource
, this property may be set to specify the maximum expected number of results from the fetch opeeration. If specified, theDSRequest.startRow
for the summary row fetch operation will be zero and theDSRequest.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
IfshowGridSummary
is true, and summary records are being derived from a fetch against thesummaryRowDataSource
, this property may be set to specify the maximum expected number of results from the fetch opeeration. If specified, theDSRequest.startRow
for the summary row fetch operation will be zero and theDSRequest.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
Minimum size, in pixels, for ListGrid headers.
If this method is called after the component has been drawn/initialized: UpdatesminFieldWidth
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
Sets theminimum height
for the entire list (smaller than this doesn't tend to work very well). If not set, this value will be defaulted whendraw()
is called to something reasonable based on whether we're showing thefilter editor
,header
,summary rows
, and/or theempty message
. Any top or bottom CSS padding specified byemptyMessageStyle
will be taken into account, increasingminHeight
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 classCanvas
- Parameters:
minHeight
- New minHeight value. Default value is varies- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getMinHeight
public int getMinHeight()Sets theminimum height
for the entire list (smaller than this doesn't tend to work very well). If not set, this value will be defaulted whendraw()
is called to something reasonable based on whether we're showing thefilter editor
,header
,summary rows
, and/or theempty message
. Any top or bottom CSS padding specified byemptyMessageStyle
will be taken into account, increasingminHeight
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 classCanvas
- Returns:
- Current minHeight value. Default value is varies
- See Also:
-
setMinimumCellHeight
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 byCanvas.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 byCanvas.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
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"minimum"
.The variable
rowCount
is available for evaluation within this string and will be set to thecurrent row count
as alocale-formatted number
.- Parameters:
minimumRowCountFormat
- New minimumRowCountFormat value. Default value is "${rowCount}+"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getMinimumRowCountFormat
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"minimum"
.The variable
rowCount
is available for evaluation within this string and will be set to thecurrent row count
as alocale-formatted number
.- Returns:
- Current minimumRowCountFormat value. Default value is "${rowCount}+"
- See Also:
-
setMissingSummaryFieldValue
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
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
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
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 theMultiGroupDialog
which gets automatically generated whenconfigureGrouping()
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
Class-level defaults to apply to theMultiGroupDialog
which gets automatically generated whenconfigureGrouping()
is called.- Returns:
- Current multiGroupDialogDefaults value. Default value is null
-
setMultiGroupDialogProperties
public ListGrid setMultiGroupDialogProperties(MultiGroupDialog multiGroupDialogProperties) throws IllegalStateException Properties to apply to theMultiGroupDialog
which gets automatically generated whenconfigureGrouping()
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
Properties to apply to theMultiGroupDialog
which gets automatically generated whenconfigureGrouping()
is called.- Returns:
- Current multiGroupDialogProperties value. Default value is null
-
setNeverValidate
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
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
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
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
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
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
"Normal" baseStyle for this listGrid. Only applies ifbaseStyle
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 matchesnormalCellHeight
(and in Internet Explorer,fastCellUpdates
is false). OtherwisetallBaseStyle
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
"Normal" baseStyle for this listGrid. Only applies ifbaseStyle
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 matchesnormalCellHeight
(and in Internet Explorer,fastCellUpdates
is false). OtherwisetallBaseStyle
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
IfbaseStyle
is unset, base style will be derived fromnormalBaseStyle
if this grid has fixed row heights and the specifiedcellHeight
matches this value. OtherwisetallBaseStyle
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()IfbaseStyle
is unset, base style will be derived fromnormalBaseStyle
if this grid has fixed row heights and the specifiedcellHeight
matches this value. OtherwisetallBaseStyle
will be used.- Returns:
- Current normalCellHeight value. Default value is 20
-
setNoSavedSearchesText
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
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
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
Default alias to use for groups with no value- Returns:
- Current nullGroupTitle value. Default value is '-none-'
- See Also:
-
setOfflineMessageStyle
The CSS style name applied to theofflineMessage
if displayed.- Parameters:
offlineMessageStyle
- New offlineMessageStyle value. Default value is "offlineMessage"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getOfflineMessageStyle
The CSS style name applied to theofflineMessage
if displayed.- Returns:
- Current offlineMessageStyle value. Default value is "offlineMessage"
- See Also:
-
getOperatorIcon
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Inline icon shown inside
filter editor
fields whenallowFilterOperators
is enabled.- Returns:
- null
-
setOriginBaseStyle
Name of a CSS Style to use as thebaseStyle
for a cell that is currently a selection origin for shifted incremental cell selection. Only has an effect ifcanSelectCells
is true.- Parameters:
originBaseStyle
- New originBaseStyle value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getOriginBaseStyle
Name of a CSS Style to use as thebaseStyle
for a cell that is currently a selection origin for shifted incremental cell selection. Only has an effect ifcanSelectCells
is true.- Returns:
- Current originBaseStyle value. Default value is null
- See Also:
-
setOverflow
Sincebody
is configured with overflow: auto by default, no overflow is expected for theListGrid
itself so by default it has overflow: hidden.- Overrides:
setOverflow
in classLayout
- Parameters:
overflow
- New overflow value. Default value is Canvas.HIDDEN- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getOverflow
Sincebody
is configured with overflow: auto by default, no overflow is expected for theListGrid
itself so by default it has overflow: hidden.- Overrides:
getOverflow
in classLayout
- Returns:
- Current overflow value. Default value is Canvas.HIDDEN
- See Also:
-
setPendingAsyncCellValue
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 " "- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
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 " "
- See Also:
-
setPlaceholderAIHoverContents
Message to show in the hover while AI-generated hover text is being retrieved for fields specifying anaiHoverRequest
.- 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
Message to show in the hover while AI-generated hover text is being retrieved for fields specifying anaiHoverRequest
.- Returns:
- Current placeholderAIHoverContents value. Default value is "<b><i>Retrieving summary from AI...</i></b>"
- See Also:
-
setPoolComponentsPerColumn
Should recycledrecord components
, be pooled per column or per record. Only applies ifshowRecordComponentsByCell
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
Should recycledrecord components
, be pooled per column or per record. Only applies ifshowRecordComponentsByCell
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
IfshowRollOver
orhiliteRowOnFocus
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 (seearrowKeyAction
).
However, note that as the user interacts with the rows using the mouse, the rollover styling will be updated to reflect the mouse position ifshowRollOver
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 settingpreserveFocusStylingOnMouseOut
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
IfshowRollOver
orhiliteRowOnFocus
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 (seearrowKeyAction
).
However, note that as the user interacts with the rows using the mouse, the rollover styling will be updated to reflect the mouse position ifshowRollOver
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 settingpreserveFocusStylingOnMouseOut
to false.- Returns:
- Current preserveFocusStylingOnMouseOut value. Default value is true
-
setPreserveWhitespace
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 ofpre
orpre-wrap
. This avoids collapsing sequences of whitespace without requiring special characters.Note : This is an advanced setting
- Parameters:
preserveWhitespace
- New preserveWhitespace value. Default value is false- Returns:
ListGrid
instance, for chaining setter calls
-
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 ofpre
orpre-wrap
. This avoids collapsing sequences of whitespace without requiring special characters.- Returns:
- Current preserveWhitespace value. Default value is false
-
setPrintAutoFit
Whether cell contents should wrap during printing. Equivalent toAutofit
, but specific to printed output. -
getPrintAutoFit
Whether cell contents should wrap during printing. Equivalent toAutofit
, but specific to printed output.- Returns:
- Current printAutoFit value. Default value is true
- See Also:
-
setPrintBaseStyle
Style for non-header cells in printed output. Defaults tobaseStyle
if null.- Parameters:
printBaseStyle
- New printBaseStyle value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getPrintBaseStyle
Style for non-header cells in printed output. Defaults tobaseStyle
if null.- Returns:
- Current printBaseStyle value. Default value is null
- See Also:
-
setPrintBooleanBaseStyle
- 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
If set, thebooleanBaseStyle
to use whenprinting
.- Returns:
- Current printBooleanBaseStyle value. Default value is null
- See Also:
-
setPrintBooleanFalseImage
If set, thebooleanFalseImage
to use whenprinting
.If this,
printBooleanTrueImage
andprintBooleanPartialImage
are unset, this will be set to the defaultCheckboxItem.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
If set, thebooleanFalseImage
to use whenprinting
.If this,
printBooleanTrueImage
andprintBooleanPartialImage
are unset, this will be set to the defaultCheckboxItem.printUncheckedImage
.- Returns:
- Current printBooleanFalseImage value. Default value is null
- See Also:
-
setPrintBooleanPartialImage
If set, thebooleanPartialImage
to use whenprinting
.If this,
printBooleanTrueImage
andprintBooleanFalseImage
are unset, this will be set to the defaultCheckboxItem.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
If set, thebooleanPartialImage
to use whenprinting
.If this,
printBooleanTrueImage
andprintBooleanFalseImage
are unset, this will be set to the defaultCheckboxItem.printPartialSelectedImage
.- Returns:
- Current printBooleanPartialImage value. Default value is null
- See Also:
-
setPrintBooleanTrueImage
If set, thebooleanTrueImage
to use whenprinting
.If this,
printBooleanFalseImage
andprintBooleanPartialImage
are unset, this will be set to the defaultCheckboxItem.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
If set, thebooleanTrueImage
to use whenprinting
.If this,
printBooleanFalseImage
andprintBooleanPartialImage
are unset, this will be set to the defaultCheckboxItem.printCheckedImage
.- Returns:
- Current printBooleanTrueImage value. Default value is null
- See Also:
-
setPrintCheckboxFieldFalseImage
- Parameters:
printCheckboxFieldFalseImage
- New printCheckboxFieldFalseImage value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getPrintCheckboxFieldFalseImage
If set, thecheckboxFieldFalseImage
to use whenprinting
.- Returns:
- Current printCheckboxFieldFalseImage value. Default value is null
- See Also:
-
setPrintCheckboxFieldPartialImage
- Parameters:
printCheckboxFieldPartialImage
- New printCheckboxFieldPartialImage value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getPrintCheckboxFieldPartialImage
If set, thecheckboxFieldPartialImage
to use whenprinting
.- Returns:
- Current printCheckboxFieldPartialImage value. Default value is null
- See Also:
-
setPrintCheckboxFieldTrueImage
- Parameters:
printCheckboxFieldTrueImage
- New printCheckboxFieldTrueImage value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getPrintCheckboxFieldTrueImage
If set, thecheckboxFieldTrueImage
to use whenprinting
.- Returns:
- Current printCheckboxFieldTrueImage value. Default value is null
- See Also:
-
setPrintHeaderStyle
Style for header cells in printed output. Defaults toheaderBaseStyle
if null.- Parameters:
printHeaderStyle
- New printHeaderStyle value. Default value is "printHeader"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getPrintHeaderStyle
Style for header cells in printed output. Defaults toheaderBaseStyle
if null.- Returns:
- Current printHeaderStyle value. Default value is "printHeader"
- See Also:
-
setPrintMaxRows
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
-
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
Whether cell contents should wrap during printing. Equivalent towrapCells
, but specific to printed output. -
getPrintWrapCells
Whether cell contents should wrap during printing. Equivalent towrapCells
, but specific to printed output.- Returns:
- Current printWrapCells value. Default value is true
- See Also:
-
setQuickDrawAheadRatio
Alternative todrawAheadRatio
, to be used when the user is rapidly changing the grids viewport (for example drag scrolling through the grid). If unspecifieddrawAheadRatio
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 todrawAheadRatio
, to be used when the user is rapidly changing the grids viewport (for example drag scrolling through the grid). If unspecifieddrawAheadRatio
will be used in all cases- Returns:
- Current quickDrawAheadRatio value. Default value is 2.0
-
setRangeRowCountFormat
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"range"
.The following variables are available for evaluation within this string:
minRowCount
: the lower bound of this row count value fromgetRowCountRange()[0]
, as alocale-formatted number
.minRowCount
: the upper bound of this row count value fromgetRowCountRange()[1]
, as alocale-formatted number
.
- Parameters:
rangeRowCountFormat
- New rangeRowCountFormat value. Default value is "${minRowCount}-${maxRowCount}"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getRangeRowCountFormat
Format for the string returned fromgetFormattedRowCount()
whenrow count status
is"range"
.The following variables are available for evaluation within this string:
minRowCount
: the lower bound of this row count value fromgetRowCountRange()[0]
, as alocale-formatted number
.minRowCount
: the upper bound of this row count value fromgetRowCountRange()[1]
, as alocale-formatted number
.
- Returns:
- Current rangeRowCountFormat value. Default value is "${minRowCount}-${maxRowCount}"
- See Also:
-
setRecordBaseStyleProperty
This attribute allows custom base styles to be displayed on a per-record basis. To specify a custom base-style for some record setrecord[listGrid.recordBaseStyleProperty]
to the desired base style name - for example ifrecordBaseStyleProperty
is"_baseStyle"
, setrecord._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
This attribute allows custom base styles to be displayed on a per-record basis. To specify a custom base-style for some record setrecord[listGrid.recordBaseStyleProperty]
to the desired base style name - for example ifrecordBaseStyleProperty
is"_baseStyle"
, setrecord._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 andcanRemoveRecords
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
If set to false on a record andcanRemoveRecords
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
If set to false on a record, selection of that record is disallowed.- Returns:
- Current recordCanSelectProperty value. Default value is "canSelect"
-
setRecordCellRoleProperty
If this property is set on a record it will designate the WAI ARIA role for cells within this records rowNote : This is an advanced setting
- Parameters:
recordCellRoleProperty
- New recordCellRoleProperty value. Default value is "cellRole"- Returns:
ListGrid
instance, for chaining setter calls
-
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
IfshowRecordComponents
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, setrecordComponentHeight
and you will then be able to use frozen fields and avoid the whitespace side-effect of virtual scrolling by settingvirtualScrolling
:false.Similarly, if your recordComponents are never tall enough that they will expand the row beyond the
cellHeight
, setvirtualScrolling
:false to avoid the whitespace side-effect ofvirtual scrolling
and to allowfrozen 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 beyondcellHeight
(which would happen if the recordComponents height + 2*cellPadding
is larger thancellHeight
).
If this method is called after the component has been drawn/initialized: Setter for therecordComponentHeight
Note : This is an advanced setting
- Parameters:
recordComponentHeight
- recordComponent height. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getRecordComponentHeight
IfshowRecordComponents
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, setrecordComponentHeight
and you will then be able to use frozen fields and avoid the whitespace side-effect of virtual scrolling by settingvirtualScrolling
:false.Similarly, if your recordComponents are never tall enough that they will expand the row beyond the
cellHeight
, setvirtualScrolling
:false to avoid the whitespace side-effect ofvirtual scrolling
and to allowfrozen 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 beyondcellHeight
(which would happen if the recordComponents height + 2*cellPadding
is larger thancellHeight
).- Returns:
- Current recordComponentHeight value. Default value is null
- See Also:
-
setRecordComponentPoolingMode
public ListGrid setRecordComponentPoolingMode(RecordComponentPoolingMode recordComponentPoolingMode) The method ofcomponent-pooling
to employ forrecordComponents
.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 yourrecordComponents
, and not all of the controls apply to every record, yourupdateRecordComponent()
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 setpoolComponentsPerColumn
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
The method ofcomponent-pooling
to employ forrecordComponents
.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 yourrecordComponents
, and not all of the controls apply to every record, yourupdateRecordComponent()
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 setpoolComponentsPerColumn
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
ifshowRecordComponents
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, andCanvas.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"
ifshowRecordComponentsByCell
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
ifshowRecordComponents
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, andCanvas.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"
ifshowRecordComponentsByCell
is true, otherwise using"expand"
logic.
- Returns:
- Current recordComponentPosition value. Default value is null
- See Also:
-
setRecordDetailDSProperty
The name of the ListGridRecord property that specifies the DataSource to use whenlistGrid.expansionMode
is "related". The default isListGridRecord.detailDS
. Note that you can set thedetailDS
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
The name of the ListGridRecord property that specifies the DataSource to use whenlistGrid.expansionMode
is "related". The default isListGridRecord.detailDS
. Note that you can set thedetailDS
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
IfcanAcceptDroppedRecords
is true for this listGrid, this property governs whether the user can drop between, or over records within the grid. This controls whatRecordDropPosition
is passed to therecordDrop()
event handler.- Parameters:
recordDropAppearance
- New recordDropAppearance value. Default value is ListGrid.BETWEEN- Returns:
ListGrid
instance, for chaining setter calls
-
getRecordDropAppearance
IfcanAcceptDroppedRecords
is true for this listGrid, this property governs whether the user can drop between, or over records within the grid. This controls whatRecordDropPosition
is passed to therecordDrop()
event handler.- Returns:
- Current recordDropAppearance value. Default value is ListGrid.BETWEEN
-
setRecordEditProperty
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
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
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 aListGrid
orTreeGrid
) 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
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 aListGrid
orTreeGrid
) 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
When set to any valid CSS border-radius string, allows for rounded records in this grid by havinggetCellCSSText()
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 providefirstCellStyle
andlastCellStyle
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()
orgetCellStyle()
, 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 forrecordRadius
, 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
When set to any valid CSS border-radius string, allows for rounded records in this grid by havinggetCellCSSText()
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 providefirstCellStyle
andlastCellStyle
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()
orgetCellStyle()
, 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
Array ofRecordTypes
that should be rounded whenrecordRadius
is set to a valid CSS border-radius string.By default,
group-headers
and records showinggroup
orgrid
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
Array ofRecordTypes
that should be rounded whenrecordRadius
is set to a valid CSS border-radius string.By default,
group-headers
and records showinggroup
orgrid
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
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
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
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
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
Screen to create (viacreateScreen()
) in lieu of callinggetRecordComponent()
.If this grid has a
dataSource
, the created screen is provided with aCanvas.dataContext
that includes the record being shown at the row. Be sure the record screen meets theserequirements
to utilize thedataContext
.- 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
Screen to create (viacreateScreen()
) in lieu of callinggetRecordComponent()
.If this grid has a
dataSource
, the created screen is provided with aCanvas.dataContext
that includes the record being shown at the row. Be sure the record screen meets theserequirements
to utilize thedataContext
.- 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 whenshowRollOver
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
Name of the property that can be set on a per-record basis to disabled rollover for an individual record whenshowRollOver
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 agrid summary row
orgroup 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
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 agrid summary row
orgroup summary rows
more efficient.- Returns:
- Current recordSummaryAttributePrefix value. Default value is "_"
- See Also:
-
setRecordSummaryBaseStyle
If showing any record summary fields (IE: fields oftype:"summary"
), this attribute specifies a custom base style to apply to cells in the summary fieldNote : This is an advanced setting
- Parameters:
recordSummaryBaseStyle
- New recordSummaryBaseStyle value. Default value is "recordSummaryCell"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getRecordSummaryBaseStyle
If showing any record summary fields (IE: fields oftype:"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
Custom CSS text to be applied to records that have beenmarked 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
Custom CSS text to be applied to records that have beenmarked 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 whencanRemoveRecords
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
Configuration properties for the "remove field" displayed whencanRemoveRecords
is enabled.- Returns:
- Current removeFieldProperties value. Default value is null
-
setRemoveFieldTitle
The title to use for theremove field
.By default this title is not displayed in the remove column header button as the
removeFieldDefaults
setsListGridField.showTitle
tofalse
.Note : This is an advanced setting
- Parameters:
removeFieldTitle
- New removeFieldTitle value. Default value is " "- Returns:
ListGrid
instance, for chaining setter calls
-
getRemoveFieldTitle
The title to use for theremove field
.By default this title is not displayed in the remove column header button as the
removeFieldDefaults
setsListGridField.showTitle
tofalse
.- Returns:
- Current removeFieldTitle value. Default value is " "
-
setRemoveIcon
WhencanRemoveRecords
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
WhencanRemoveRecords
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
Default width and height ofremove 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 ofremove icons
for this ListGrid.- Returns:
- Current removeIconSize value. Default value is 16
-
setRemoveIconStyle
Custom style to apply to the image in theremoveField
displayed in rows whencanRemoveRecords
is true. Affects the icons provided byremoveIcon
andunremoveIcon
.- Parameters:
removeIconStyle
- New removeIconStyle value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getRemoveIconStyle
Custom style to apply to the image in theremoveField
displayed in rows whencanRemoveRecords
is true. Affects the icons provided byremoveIcon
andunremoveIcon
.- Returns:
- Current removeIconStyle value. Default value is null
- See Also:
-
setReselectOnUpdate
If true, when an update operation occurs on a selected record in adatabound
listGrid, ensure the updated record is re-selected when the operation completes. ThereselectOnUpdateNotifications
attributes governs whetherListGrid.selectionUpdated()
andListGrid.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 adatabound
listGrid, ensure the updated record is re-selected when the operation completes. ThereselectOnUpdateNotifications
attributes governs whetherListGrid.selectionUpdated()
andListGrid.selectionChanged()
will fire when this occurs.- Returns:
- Current reselectOnUpdate value. Default value is true
-
setReselectOnUpdateNotifications
public ListGrid setReselectOnUpdateNotifications(SelectionNotificationType reselectOnUpdateNotifications) ifreselectOnUpdate
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
ifreselectOnUpdate
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
Iftrue
, 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()Iftrue
, 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
If a page is rendered inRTL mode
, should cell alignments specifiedListGridField.cellAlign
be reversed (so analign:"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
If a page is rendered inRTL mode
, should cell alignments specifiedListGridField.cellAlign
be reversed (so analign:"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 IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
over arotated
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()IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
over arotated
header button.- Returns:
- Current rotatedHeaderMenuButtonHeight value. Default value is "100%"
- See Also:
-
setRotatedHeaderMenuButtonHeight
public ListGrid setRotatedHeaderMenuButtonHeight(String rotatedHeaderMenuButtonHeight) throws IllegalStateException IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
over arotated
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
IfshowHeaderMenuButton
is true, this property governs the height of the auto-generatedheaderMenuButton
over arotated
header button.- Returns:
- Current rotatedHeaderMenuButtonHeight value. Default value is "100%"
- See Also:
-
setRotatedHeaderMenuButtonWidth
public ListGrid setRotatedHeaderMenuButtonWidth(int rotatedHeaderMenuButtonWidth) throws IllegalStateException IfshowHeaderMenuButton
is true, this property governs the width of the auto-generatedheaderMenuButton
over arotated
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()IfshowHeaderMenuButton
is true, this property governs the width of the auto-generatedheaderMenuButton
over arotated
header button.- Returns:
- Current rotatedHeaderMenuButtonWidth value. Default value is 16
- See Also:
-
setRotateHeaderTitles
Whether to rotate the field titles so they're rendered vertically from bottom to top. Can be overridden for individual fields by settingListGridField.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 anyAutoFitWidthApproach
other than "value".You can use
headerTitleVAlign
orListGridField.valign
to control vertical positioning of the titles, andListGridField.align
to control the horizontal. You may also choose betweenclipping
orwrapping
, and setshowHeaderMenuButton
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
Whether to rotate the field titles so they're rendered vertically from bottom to top. Can be overridden for individual fields by settingListGridField.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 anyAutoFitWidthApproach
other than "value".You can use
headerTitleVAlign
orListGridField.valign
to control vertical positioning of the titles, andListGridField.align
to control the horizontal. You may also choose betweenclipping
orwrapping
, and setshowHeaderMenuButton
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
Returns a mapping of default WAI ARIA attributes for rows within this listGrid. SeegetRowAriaState()
Note : This is an advanced setting
- Parameters:
rowAriaState
- New rowAriaState value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getRowAriaState
Returns a mapping of default WAI ARIA attributes for rows within this listGrid. SeegetRowAriaState()
- 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 anyrecordRowAriaStateProperty
properties specified on the record itself, plus the following attributes:setsize
- total row count for the grid ifariaRole
is set to"list"
posinset
- index of the row ifariaRole
is set to"list"
rowindex
- index of the row ifariaRole
is set to"grid"
selected
- true if the record isselected
expanded
- true forexpanded records
oropen folders
-
setRowCountDisplayPrecision
When an exactrow count
is not known due to progressive loading, this attribute allows the formatted row count returned bygetFormattedRowCount()
and ultimately displayed in therowRangeDisplay label
to be rounded to a multiple of the specified value. If not explicitly set, this value defaults to thepage size
for the data.For example if the server reports a
DSResponse.totalRows
of320
while progressive loading is active (meaning this is not an exact row count), androwCountDisplayPrecision
is set to150
, the formatted rowCount may display300+
The precision will round either up or down depending on the
row count status
.rowCountStatus:"exact"
- this setting has no effectrowCountStatus:"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.
rowCountDisplayPrecision
, the exact reported row count value will be displayed. This could typically only occur ifrowCountDisplayPrecision
is more than thepage 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
When an exactrow count
is not known due to progressive loading, this attribute allows the formatted row count returned bygetFormattedRowCount()
and ultimately displayed in therowRangeDisplay label
to be rounded to a multiple of the specified value. If not explicitly set, this value defaults to thepage size
for the data.For example if the server reports a
DSResponse.totalRows
of320
while progressive loading is active (meaning this is not an exact row count), androwCountDisplayPrecision
is set to150
, the formatted rowCount may display300+
The precision will round either up or down depending on the
row count status
.rowCountStatus:"exact"
- this setting has no effectrowCountStatus:"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.
rowCountDisplayPrecision
, the exact reported row count value will be displayed. This could typically only occur ifrowCountDisplayPrecision
is more than thepage 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
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
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
IflocateRowsBy
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
IflocateRowsBy
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
IflocateRowsBy
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
IflocateRowsBy
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
An automatically generated field that displays the current row number whenshowRowNumbers
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
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
The CSS Style name for therowNumberField
.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
The CSS Style name for therowNumberField
.- Returns:
- Current rowNumberStyle value. Default value is "specialCol"
- See Also:
-
getRowRangeDisplay
RowRangeDisplay
autoChild, which may be retrieved by callinggetRowRangeDisplay()
.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 withRowRangeDisplay.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
How should thegetFormattedRowRange()
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
How should thegetFormattedRowRange()
format the row range and row count for display to the user?- Returns:
- Current rowRangeDisplayStyle value. Default value is "full"
- See Also:
-
setRowRangeFormat
Dynamic String specifying the format for thevisible row range
.The following variables are available for evaluation within this string:
startRow
: first visible row in the viewport as aformatted string
endRow
: last visible row in the viewport as aformatted string
- Parameters:
rowRangeFormat
- New rowRangeFormat value. Default value is "${startRow}-${endRow}"- Returns:
ListGrid
instance, for chaining setter calls
-
getRowRangeFormat
Dynamic String specifying the format for thevisible row range
.The following variables are available for evaluation within this string:
startRow
: first visible row in the viewport as aformatted string
endRow
: last visible row in the viewport as aformatted string
- Returns:
- Current rowRangeFormat value. Default value is "${startRow}-${endRow}"
-
setRowRole
Returns the default WAI ARIA role for rows within this listGrid. SeegetRowRole()
Note : This is an advanced setting
- Parameters:
rowRole
- New rowRole value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getRowRole
Returns the default WAI ARIA role for rows within this listGrid. SeegetRowRole()
- 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 ifrowRole
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 hasrole:"list"
, or"row"
for data rows if this listGrid hasariaRole:"grid"
. Default value is null
-
setRowSpanEditMode
IfallowRowSpanning
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
IfallowRowSpanning
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 whenuseRowSpanStyling
is enabled. SeeRowSpanSelectionMode
.- 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
Chooses the selection mode whenuseRowSpanStyling
is enabled. SeeRowSpanSelectionMode
.- Returns:
- Current rowSpanSelectionMode value. Default value is "forward"
-
setSaveByCell
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
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
Should the currentfilter-criteria
be included along with other details when saving this grid'sview-state
?If true, the current criteria will be saved when calling
getViewState()
and will be applied to the grid via a filter when callingsetViewState()
.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
Should the currentfilter-criteria
be included along with other details when saving this grid'sview-state
?If true, the current criteria will be saved when calling
getViewState()
and will be applied to the grid via a filter when callingsetViewState()
.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
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 aSavedSearches.defaultField
, the first user-specfic search marked default will be used, otherwise the first admn search marked defaultIf
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 aSavedSearches.defaultField
, the first user-specfic search marked default will be used, otherwise the first admn search marked defaultIf
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
Override ofSavedSearches.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
Override ofSavedSearches.adminRole
for this component.- Returns:
- Current savedSearchAdminRole value. Default value is null
-
getSavedSearchAdminSeparator
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
Override ofSavedSearches.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
Override ofSavedSearches.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
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
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
Text to show for the saved searches submenu.- Returns:
- Current savedSearchText value. Default value is "Saved views"
- See Also:
-
setSaveLocally
For grids with a specifieddataSource
, this property can be set totrue
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. SettingsaveLocally
is invalid if eitherfetchData()
is called or if aResultSet
is provided as the data model.saveLocally
mode includes changes made viainline editing
, record removal viacanRemoveRecords
, as well as programmatic calls toupdateData()
,addData()
andremoveData()
. 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 thefilterEditor
, to also work only with the local data set.If saveLocally is unset, and
filterLocalData
is true, the saveLocally behavior is enabled by defaultNote : 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
For grids with a specifieddataSource
, this property can be set totrue
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. SettingsaveLocally
is invalid if eitherfetchData()
is called or if aResultSet
is provided as the data model.saveLocally
mode includes changes made viainline editing
, record removal viacanRemoveRecords
, as well as programmatic calls toupdateData()
,addData()
andremoveData()
. 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 thefilterEditor
, 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
For editable grids with a specifieddataSource
, wheresaveLocally
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
andDataBoundComponent.updateOperation
are available to developers, allowing specification of an explicitOperationBinding
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
For editable grids with a specifieddataSource
, wheresaveLocally
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
andDataBoundComponent.updateOperation
are available to developers, allowing specification of an explicitOperationBinding
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 withariaRole:"list"
.When
screen reader mode
is enabled, for ListGrids withariaRole
set to"list"
, each row in the grid will be rendered as HTML with role"listItem"
.
In this mode, thescreenReaderCellSeparator
property, (along withscreenReaderIncludeFieldTitles
andscreenReaderRowSeparator
), 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 bygetRowAriaState()
.To entirely disable this feature, developers may set
screenReaderWriteRowLabelledBy
tofalse
. In this case other row aria attributes will still be picked up fromgetRowAriaState()
, including thesetsize
andposinset
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
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 withariaRole:"list"
.When
screen reader mode
is enabled, for ListGrids withariaRole
set to"list"
, each row in the grid will be rendered as HTML with role"listItem"
.
In this mode, thescreenReaderCellSeparator
property, (along withscreenReaderIncludeFieldTitles
andscreenReaderRowSeparator
), 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 bygetRowAriaState()
.To entirely disable this feature, developers may set
screenReaderWriteRowLabelledBy
tofalse
. In this case other row aria attributes will still be picked up fromgetRowAriaState()
, including thesetsize
andposinset
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 withariaRole:"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
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 withariaRole:"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:
-
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 withariaRole:"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
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 withariaRole:"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 Whenscreen reader mode
is enabled, for grids withariaRole
set to"list"
, should a custom aria-labelledby attribute be written out in addition to any otherrow aria properties
to ensure thecolumn titles
,screenReaderCellSeparator
andscreenReaderRowSeparator
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 forscreenReaderCellSeparator
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
Whenscreen reader mode
is enabled, for grids withariaRole
set to"list"
, should a custom aria-labelledby attribute be written out in addition to any otherrow aria properties
to ensure thecolumn titles
,screenReaderCellSeparator
andscreenReaderRowSeparator
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 forscreenReaderCellSeparator
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
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 viascrollWheelRedrawDelay
.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 viascrollWheelRedrawDelay
.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
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
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
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
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
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 specifiedscrollRedrawDelay
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 of250
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
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 specifiedscrollRedrawDelay
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 of250
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
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 theFilterEditor
orFilter 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 callfilterByEditor()
instead offetchData()
, as shown in the +exampleLink{additiveFilter} example.In particular, the grid will automatically filter when the
search()
orsubmit()
events fire on the form (happens if aSubmitItem
is present and is pressed), and will automatically trigger filtering if Enter is pressed in the form, as thoughsearchOnEnter
orsaveOnEnter
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 butcanShowFilterEditor
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 likeimplicitCriteria
.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
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 theFilterEditor
orFilter 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 callfilterByEditor()
instead offetchData()
, as shown in the +exampleLink{additiveFilter} example.In particular, the grid will automatically filter when the
search()
orsubmit()
events fire on the form (happens if aSubmitItem
is present and is pressed), and will automatically trigger filtering if Enter is pressed in the form, as thoughsearchOnEnter
orsaveOnEnter
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 butcanShowFilterEditor
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 likeimplicitCriteria
.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
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 theFilterEditor
orFilter 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 callfilterByEditor()
instead offetchData()
, as shown in the +exampleLink{additiveFilter} example.In particular, the grid will automatically filter when the
search()
orsubmit()
events fire on the form (happens if aSubmitItem
is present and is pressed), and will automatically trigger filtering if Enter is pressed in the form, as thoughsearchOnEnter
orsaveOnEnter
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 butcanShowFilterEditor
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 likeimplicitCriteria
.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
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 theFilterEditor
orFilter 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 callfilterByEditor()
instead offetchData()
, as shown in the +exampleLink{additiveFilter} example.In particular, the grid will automatically filter when the
search()
orsubmit()
events fire on the form (happens if aSubmitItem
is present and is pressed), and will automatically trigger filtering if Enter is pressed in the form, as thoughsearchOnEnter
orsaveOnEnter
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 butcanShowFilterEditor
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 likeimplicitCriteria
.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
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 unsetCell 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
andFormItem.selectOnFocus
.- Parameters:
selectCellTextOnClick
- New selectCellTextOnClick value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
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 unsetCell 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
andFormItem.selectOnFocus
.- Returns:
- Current selectCellTextOnClick value. Default value is null
-
setSelectedState
Returns a snapshot of the current selection within this listGrid as aListGridSelectedState
object.
This object can be passed tosetSelectedState()
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 theListGridSelectedState
object passed in.
Used to restore previous state retrieved from the grid by a call togetSelectedState()
.- 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
Returns a snapshot of the current selection within this listGrid as aListGridSelectedState
object.
This object can be passed tosetSelectedState()
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 uniqueprimaryKeys
, this method returns a snapshot of the component's current selection, as aListGridSelectedState
object.
This object can be passed tosetSelectedState()
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
If true, show the field-header for the sorted field (or the first field in amulti-sort
grid) in the selected state.- Parameters:
selectHeaderOnSort
- New selectHeaderOnSort value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls
-
getSelectHeaderOnSort
If true, show the field-header for the sorted field (or the first field in amulti-sort
grid) in the selected state.- Returns:
- Current selectHeaderOnSort value. Default value is true
-
setSelectionAppearance
How selection of rows should be presented to the user.For
selectionAppearance:"checkbox"
with multiple selection allowed, you would typically useselectionType
:"simple" (the default). BecauseselectionType
andselectionAppearance
are unrelated, the combination ofselectionAppearance:"checkbox"
andselectionType:"multiple"
results in a grid where multiple selection can only be achieved via shift-click or ctrl-click.If using
"checkbox"
for aListGrid
, see alsocheckboxField
for customization APIs.If using
"checkbox"
for aTreeGrid
, an extra icon,TreeGrid.getExtraIcon()
is not supported. Additionally onlyselectionType
:"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, viaTreeGrid.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. -
getSelectionAppearance
How selection of rows should be presented to the user.For
selectionAppearance:"checkbox"
with multiple selection allowed, you would typically useselectionType
:"simple" (the default). BecauseselectionType
andselectionAppearance
are unrelated, the combination ofselectionAppearance:"checkbox"
andselectionType:"multiple"
results in a grid where multiple selection can only be achieved via shift-click or ctrl-click.If using
"checkbox"
for aListGrid
, see alsocheckboxField
for customization APIs.If using
"checkbox"
for aTreeGrid
, an extra icon,TreeGrid.getExtraIcon()
is not supported. Additionally onlyselectionType
:"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, viaTreeGrid.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
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"
istrue
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
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"
istrue
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
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
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
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
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
When set to false, clicking a record'sexpansion 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'sexpansion field
will not add the record to the current selection.- Returns:
- Current selectOnExpandRecord value. Default value is true
-
setSeparatorRowStyle
CSS class to apply to rows marked asseparators
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
CSS class to apply to rows marked asseparators
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
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
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
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
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 theasynchGroupingPrompt
dialog duringasynchronous 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
If set to false, do not show theasynchGroupingPrompt
dialog duringasynchronous grouping
.- Returns:
- Current showAsynchGroupingPrompt value. Default value is null
-
setShowBackgroundComponents
Iftrue
this grid will create and show per-row backgroundComponents as detailedhere
.- Parameters:
showBackgroundComponents
- New showBackgroundComponents value. Default value is false- Returns:
ListGrid
instance, for chaining setter calls
-
getShowBackgroundComponents
Iftrue
this grid will create and show per-row backgroundComponents as detailedhere
.- Returns:
- Current showBackgroundComponents value. Default value is false
-
setShowCellContextMenus
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
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 haveshowHover
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
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 haveshowHover
unset or null as well.- Returns:
- Current showClippedValuesOnHover value. Default value is null
- See Also:
-
setShowCollapsedGroupSummary
Should group summaries be visible when the group is collapsed?This property only applies to
grouped
grids showinggroup 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 forshowCollapsedGroupSummary
- Parameters:
showCollapsedGroupSummary
- new showCollapsedGroupSummary value. Default value is false- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getShowCollapsedGroupSummary
Should group summaries be visible when the group is collapsed?This property only applies to
grouped
grids showinggroup 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
Whether to include fields markeddetail:true
from this component'sDataSource
.When this property is
true
, theListGrid
will include all detail fields unless fields have been specifically declared using thefields
array.Any field which has been included directly in the
fields
array will be included regardless of the fieldsdetail
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()
andListGridField.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 interfaceDataBoundComponent
- 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
Whether to include fields markeddetail:true
from this component'sDataSource
.When this property is
true
, theListGrid
will include all detail fields unless fields have been specifically declared using thefields
array.Any field which has been included directly in the
fields
array will be included regardless of the fieldsdetail
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()
andListGridField.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 interfaceDataBoundComponent
- Returns:
- Current showDetailFields value. Default value is true
- See Also:
-
setShowDropLines
Controls whether to show a drop-indicator during a drag and drop operation.- Overrides:
setShowDropLines
in classLayout
- Parameters:
showDropLines
- New showDropLines value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getShowDropLines
Controls whether to show a drop-indicator during a drag and drop operation.- Overrides:
getShowDropLines
in classLayout
- Returns:
- Current showDropLines value. Default value is true
- See Also:
-
setShowEllipsisWhenClipped
Should ellipses be displayed when cell content is clipped? May be overridden at the field level viaListGridField.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 viaListGridField.showEllipsisWhenClipped
- Returns:
- Current showEllipsisWhenClipped value. Default value is true
-
setShowEmptyMessage
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
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
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
WhenExpansionMode
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
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
andfilterOnKeypress
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 tofetchData()
.The default
search operator
for an item in the filterEditor can be set viaListGridField.filterOperator
. Whenfield.filterOperator
has been set calls to retrieve the criteria from the grid returnAdvancedCriteria
. See alsoallowFilterOperators
for a UI that allows end users to change the search operator on the flyNote that if
filterData()
orfetchData()
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:
In this example code we're usingCriteria newCriteria = myListGrid.getFilterEditorCriteria(); newCriteria = DataSource.combineCriteria(newCriteria, new Criteria("field1", "new value1") ); myListGrid.setCriteria(newCriteria);
getFilterEditorCriteria()
rather thangetCriteria()
- 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 usesDataSource.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 inAdvancedCriteria
, 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 theautoFetchTextMatchStyle
).
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 theshowFilterEditor
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 setclearCriteriaOnFilterEditorHide
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:
- If the top level criteria has operator of type "and":
-
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
andfilterOnKeypress
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 tofetchData()
.The default
search operator
for an item in the filterEditor can be set viaListGridField.filterOperator
. Whenfield.filterOperator
has been set calls to retrieve the criteria from the grid returnAdvancedCriteria
. See alsoallowFilterOperators
for a UI that allows end users to change the search operator on the flyNote that if
filterData()
orfetchData()
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:
In this example code we're usingCriteria newCriteria = myListGrid.getFilterEditorCriteria(); newCriteria = DataSource.combineCriteria(newCriteria, new Criteria("field1", "new value1") ); myListGrid.setCriteria(newCriteria);
getFilterEditorCriteria()
rather thangetCriteria()
- 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 usesDataSource.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 inAdvancedCriteria
, 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 theautoFetchTextMatchStyle
).
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:
- If the top level criteria has operator of type "and":
-
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 thefilterWindowCriteria
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
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 thefilterWindowCriteria
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
WhencanShowFilterEditor
is true, this is the title for the filterEditor show/hide menu-item, in theheaderContextmenu
, 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
WhencanShowFilterEditor
is true, this is the title for the filterEditor show/hide menu-item, in theheaderContextmenu
, 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 thatfilterWindowCriteria
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
Should an indicator be shown to indicate thatfilterWindowCriteria
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
Should this ListGrid show a summary row beneath the last record of the grid. This summary row will contain per-field summary information. SeeListGridField.showGridSummary
andgetGridSummaryFunction()
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 theshowGridSummary
attribute- Parameters:
showGridSummary
- new value for this.showGridSummary. Default value is false- Returns:
ListGrid
instance, for chaining setter calls
-
getShowGridSummary
Should this ListGrid show a summary row beneath the last record of the grid. This summary row will contain per-field summary information. SeeListGridField.showGridSummary
andgetGridSummaryFunction()
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
If this listGrid supportsgrouping
, 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 theListGridField.getGroupSummary()
method if specified, otherwise via the specifiedListGridField.summaryFunction
.
If this method is called after the component has been drawn/initialized: Setter for theshowGroupSummary
attribute- Parameters:
showGroupSummary
- new value for this.showGroupSummary. Default value is false- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getShowGroupSummary
If this listGrid supportsgrouping
, 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 theListGridField.getGroupSummary()
method if specified, otherwise via the specifiedListGridField.summaryFunction
.- Returns:
- Current showGroupSummary value. Default value is false
- See Also:
-
setShowGroupSummaryInHeader
If this grid isgrouped
, andshowGroupSummary
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 generatedgroupTitleColumn
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 forshowGroupSummaryInHeader
- Parameters:
showGroupSummaryInHeader
- new showGroupSummaryInHeader state. Default value is false- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getShowGroupSummaryInHeader
If this grid isgrouped
, andshowGroupSummary
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 generatedgroupTitleColumn
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
If this grid isgrouped
andshowGroupSummaryInHeader
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 totrue
which causes agroupTitleColumn
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 (unlessshowRowNumbers
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
If this grid isgrouped
andshowGroupSummaryInHeader
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 totrue
which causes agroupTitleColumn
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 (unlessshowRowNumbers
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
If this isgrouped
and hasfrozen 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, orshowGroupSummaryInHeader
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 isgrouped
and hasfrozen 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, orshowGroupSummaryInHeader
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
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
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 forCubeGrid
.- 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
Whether to show a context menu on the header with standard items for showing and hiding fields. Not supported forCubeGrid
.- Returns:
- Current showHeaderContextMenu value. Default value is true
- See Also:
-
setShowHeaderMenuButton
If set to true andshowHeaderContextMenu
is true, theheaderMenuButton
will be displayed when the user rolls over the header buttons in this grid. Not supported forCubeGrid
.- 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
If set to true andshowHeaderContextMenu
is true, theheaderMenuButton
will be displayed when the user rolls over the header buttons in this grid. Not supported forCubeGrid
.- Returns:
- Current showHeaderMenuButton value. Default value is true
-
setShowHeaderPartialSelection
Should partial selection of all records be shown in header with a special icon? The partial icon will show in the header whencanSelectAll
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 tofalse
. -
getShowHeaderPartialSelection
Should partial selection of all records be shown in header with a special icon? The partial icon will show in the header whencanSelectAll
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 tofalse
.- Returns:
- Current showHeaderPartialSelection value. Default value is null
- See Also:
-
setShowHeaderShadow
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
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 forCubeGrid
.- 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
Whether to show a context menu on the header span with standard items for showing and hiding fields. Not supported forCubeGrid
.- Returns:
- Current showHeaderSpanContextMenu value. Default value is true
- See Also:
-
setShowHeaderSpanTitlesInFormulaBuilder
public ListGrid setShowHeaderSpanTitlesInFormulaBuilder(Boolean showHeaderSpanTitlesInFormulaBuilder) If this grid has specifiedheaderSpans
, 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
If this grid has specifiedheaderSpans
, 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
If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using thehilite editor
.- Parameters:
showHeaderSpanTitlesInHiliteEditor
- New showHeaderSpanTitlesInHiliteEditor value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getShowHeaderSpanTitlesInHiliteEditor
If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using thehilite editor
.- Returns:
- Current showHeaderSpanTitlesInHiliteEditor value. Default value is true
- See Also:
-
setShowHeaderSpanTitlesInSortEditor
If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using themulti-sort editor
.- Parameters:
showHeaderSpanTitlesInSortEditor
- New showHeaderSpanTitlesInSortEditor value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getShowHeaderSpanTitlesInSortEditor
If this grid has specifiedheaderSpans
, should field titles be prefixed with the titles of the headerSpans in which they are contained when using themulti-sort editor
.- Returns:
- Current showHeaderSpanTitlesInSortEditor value. Default value is true
- See Also:
-
setShowHilitesInGroupSummary
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
If true, andcanHover
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 bycellHoverHTML()
.This is the default setting for the grid and can be overridden on a
per-field
basis.- Overrides:
setShowHover
in classCanvas
- Parameters:
showHover
- New showHover value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
setCanHover(java.lang.Boolean)
com.smartgwt.client.widgets.grid.ListGrid#cellHoverHTML
-
getShowHover
If true, andcanHover
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 bycellHoverHTML()
.This is the default setting for the grid and can be overridden on a
per-field
basis.- Overrides:
getShowHover
in classCanvas
- Returns:
- Current showHover value. Default value is true
- See Also:
-
getCanHover()
com.smartgwt.client.widgets.grid.ListGrid#cellHoverHTML
-
setShowHoverComponents
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 ahoverMode
is set butshowHoverComponents
is left null, it will default to true.Also supported at the
field-level
.- Overrides:
setShowHoverComponents
in classCanvas
- Parameters:
showHoverComponents
- New showHoverComponents value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
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 ahoverMode
is set butshowHoverComponents
is left null, it will default to true.Also supported at the
field-level
.- Overrides:
getShowHoverComponents
in classCanvas
- Returns:
- Current showHoverComponents value. Default value is null
-
setShowHoverOnDisabledCells
IfshowHover
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()IfshowHover
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 thedrag 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:
-
showDragHandles()
hideDragHandles()
com.smartgwt.client.widgets.grid.ListGrid#setDragHandleField
-
getShowInitialDragHandles
When set to true, shows thedrag handle field
on initial draw.- Returns:
- Current showInitialDragHandles value. Default value is null
- See Also:
-
setShowNewRecordRow
If this is an editable ListGrid, setting this property to true causes an extra row with thenewRecordRowMessage
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 notfetched data
, unlesssaveLocally
has been set.- Parameters:
showNewRecordRow
- New showNewRecordRow value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getShowNewRecordRow
If this is an editable ListGrid, setting this property to true causes an extra row with thenewRecordRowMessage
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 notfetched data
, unlesssaveLocally
has been set.- Returns:
- Current showNewRecordRow value. Default value is null
-
setShowPartialSelection
Should partially selected parents (in a Tree data set) be shown with special icon? This has an impact in grouped grids wherecanSelectGroups
is true. The partial icon will show up for the group header node when a group is partially selected. -
getShowPartialSelection
Should partially selected parents (in a Tree data set) be shown with special icon? This has an impact in grouped grids wherecanSelectGroups
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
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 usesnapTo-positioning
to place itself within the row or cell.The "expand" setting is incompatible with
frozen columns
unless allrecordComponents
are the same height and they are present in every row, in which case the fixed height of allrecordComponents
can be set viarecordComponentHeight
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 specifiedListGridField.valueIconClick()
handler) for icons based on field values which may be displayed alone in the cell or alongside standard content (seeListGridField.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
, andFormItem.icons
are a common way to add clickable buttons. You can alsoprovide different controls per record
. These options are usually better that usingrecordComponents
as custom editors, since you won't have to manage issues like making therecordComponent
appear only when editing, having changes affecteditValues
, triggering saves and handling validation errors, etc.
See
RecordComponentPoolingMode
for an overview of how best to optimize use ofrecordComponents
for different data sets.Regardless of the pooling mode, you can explicitly refresh record components via
invalidateRecordComponents()
andrefreshRecordComponent()
.Interaction with
column auto-fit
: per-cell record components are not taken into account when determining the size for column auto fit. The defaultgetDefaultFieldWidth()
implementation looks at cell content only. We typically recommend that, for fields showing record-components,ListGridField.autoFitWidth
andListGridField.canAutoFitWidth
be disabled, or if the record components are of a predictable size, aListGridField.defaultWidth
be specified.
This is particularly pertinent whererecordComponentPosition
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 theshowRecordComponents
attribute- Parameters:
showRecordComponents
- new value forthis.showRecordComponents
. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
setRecordComponentPosition(com.smartgwt.client.types.EmbeddedPosition)
setShowRecordComponentsByCell(java.lang.Boolean)
RecordComponentPoolingMode
showRecordComponent(com.smartgwt.client.widgets.grid.ListGridRecord, java.lang.Integer)
createRecordComponent(com.smartgwt.client.widgets.grid.ListGridRecord, java.lang.Integer)
updateRecordComponent(com.smartgwt.client.widgets.grid.ListGridRecord, java.lang.Integer, com.smartgwt.client.widgets.Canvas, boolean)
- consider using
-
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 usesnapTo-positioning
to place itself within the row or cell.The "expand" setting is incompatible with
frozen columns
unless allrecordComponents
are the same height and they are present in every row, in which case the fixed height of allrecordComponents
can be set viarecordComponentHeight
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 specifiedListGridField.valueIconClick()
handler) for icons based on field values which may be displayed alone in the cell or alongside standard content (seeListGridField.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
, andFormItem.icons
are a common way to add clickable buttons. You can alsoprovide different controls per record
. These options are usually better that usingrecordComponents
as custom editors, since you won't have to manage issues like making therecordComponent
appear only when editing, having changes affecteditValues
, triggering saves and handling validation errors, etc.
See
RecordComponentPoolingMode
for an overview of how best to optimize use ofrecordComponents
for different data sets.Regardless of the pooling mode, you can explicitly refresh record components via
invalidateRecordComponents()
andrefreshRecordComponent()
.Interaction with
column auto-fit
: per-cell record components are not taken into account when determining the size for column auto fit. The defaultgetDefaultFieldWidth()
implementation looks at cell content only. We typically recommend that, for fields showing record-components,ListGridField.autoFitWidth
andListGridField.canAutoFitWidth
be disabled, or if the record components are of a predictable size, aListGridField.defaultWidth
be specified.
This is particularly pertinent whererecordComponentPosition
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:
-
getRecordComponentPosition()
getShowRecordComponentsByCell()
RecordComponentPoolingMode
showRecordComponent(com.smartgwt.client.widgets.grid.ListGridRecord, java.lang.Integer)
createRecordComponent(com.smartgwt.client.widgets.grid.ListGridRecord, java.lang.Integer)
updateRecordComponent(com.smartgwt.client.widgets.grid.ListGridRecord, java.lang.Integer, com.smartgwt.client.widgets.Canvas, boolean)
- consider using
-
setShowRecordComponentsByCell
If true, showsrecordComponents
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
If true, showsrecordComponents
in cells, rather than just in records.- Returns:
- Current showRecordComponentsByCell value. Default value is null
-
setShowRollOver
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
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
When enabled, when the mouse moves over a row or cell (depending onuseCellRollOvers
), an arbitrary Canvas can be shown layered on top of the row or cell (therollOverCanvas
), layered underneath the row or cell (therollUnderCanvas
), 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. WithuseCellRollOvers
, 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 therollOverCanvas
.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 implementinggetRollOverCanvas()
and/orgetRollUnderCanvas()
.The rollOver/rollUnder canvas will be automatically added to the grid's
body
as anembedded component
.
For grids withfrozen 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
getFrozenRollOverCanvas()
orgetFrozenRollUnderCanvas()
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 therollOverCanvas
autoChild configuration.showRollOverCanvas
has no effect ifshowRollOver
isfalse
.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:
- If
-
getShowRollOverCanvas
When enabled, when the mouse moves over a row or cell (depending onuseCellRollOvers
), an arbitrary Canvas can be shown layered on top of the row or cell (therollOverCanvas
), layered underneath the row or cell (therollUnderCanvas
), 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. WithuseCellRollOvers
, 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 therollOverCanvas
.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 implementinggetRollOverCanvas()
and/orgetRollUnderCanvas()
.The rollOver/rollUnder canvas will be automatically added to the grid's
body
as anembedded component
.
For grids withfrozen 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
getFrozenRollOverCanvas()
orgetFrozenRollUnderCanvas()
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 therollOverCanvas
autoChild configuration.showRollOverCanvas
has no effect ifshowRollOver
isfalse
.See also
showSelectedRollOverCanvas
.- Returns:
- Current showRollOverCanvas value. Default value is null
- See Also:
- If
-
setShowRollOverInExpansion
This setting causes theroll 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
This setting causes theroll 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
If roll overs are enabled, should therollUnderCanvas
be displayed?Use of the
showRollUnderCanvas
is enabled ifshowRollOver
istrue
, and eithershowRollOverCanvas
istrue
andshowRollUnderCanvas
is unset, orshowRollUnderCanvas
is explicitly set totrue
.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
If roll overs are enabled, should therollUnderCanvas
be displayed?Use of the
showRollUnderCanvas
is enabled ifshowRollOver
istrue
, and eithershowRollOverCanvas
istrue
andshowRollUnderCanvas
is unset, orshowRollUnderCanvas
is explicitly set totrue
.See also
showSelectedRollUnderCanvas
.- Returns:
- Current showRollUnderCanvas value. Default value is null
- See Also:
-
setShowRowNumbers
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
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
This setting causes theroll 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
This setting causes theroll 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
This setting causes theroll 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 relatedshowSelectedRollOverCanvas
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
This setting causes theroll 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 relatedshowSelectedRollOverCanvas
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
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
Should the "Selected" style be applied to selected records?- Returns:
- Current showSelectedStyle value. Default value is true
-
setShowSelectionCanvas
IfselectionType
is set toSelectionStyle.SINGLE
, setting this property totrue
means selection will be displayed to the user with theselectionCanvas
and/orselectionUnderCanvas
rather than with CSS styling.If
showSelectionCanvas
is set totrue
, then theselectionUnderCanvas
will automatically be enabled unlessshowSelectionUnderCanvas
is set tofalse
.NOTE: It is recommended to use the
selectionUnderCanvas
rather than theselectionCanvas
if possible because theselectionCanvas
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 theselectionCanvas
and it simply provides custom styling, then theselectionUnderCanvas
should be used instead.With
frozen fields
, theselectionCanvas
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
IfselectionType
is set toSelectionStyle.SINGLE
, setting this property totrue
means selection will be displayed to the user with theselectionCanvas
and/orselectionUnderCanvas
rather than with CSS styling.If
showSelectionCanvas
is set totrue
, then theselectionUnderCanvas
will automatically be enabled unlessshowSelectionUnderCanvas
is set tofalse
.NOTE: It is recommended to use the
selectionUnderCanvas
rather than theselectionCanvas
if possible because theselectionCanvas
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 theselectionCanvas
and it simply provides custom styling, then theselectionUnderCanvas
should be used instead.With
frozen fields
, theselectionCanvas
is displayed only over the non-frozen fields of the selected row.- Returns:
- Current showSelectionCanvas value. Default value is null
- See Also:
-
setShowSelectionUnderCanvas
IfselectionType
is set toSelectionStyle.SINGLE
, and eithershowSelectionCanvas
istrue
andshowSelectionUnderCanvas
is unset, orshowSelectionUnderCanvas
is explicitly set totrue
, then selection will be displayed to the user with theselectionCanvas
and/orselectionUnderCanvas
rather than with CSS styling. SettingshowSelectionUnderCanvas
tofalse
will disable the use of theselectionUnderCanvas
.With
frozen fields
, theselectionUnderCanvas
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
IfselectionType
is set toSelectionStyle.SINGLE
, and eithershowSelectionCanvas
istrue
andshowSelectionUnderCanvas
is unset, orshowSelectionUnderCanvas
is explicitly set totrue
, then selection will be displayed to the user with theselectionCanvas
and/orselectionUnderCanvas
rather than with CSS styling. SettingshowSelectionUnderCanvas
tofalse
will disable the use of theselectionUnderCanvas
.With
frozen fields
, theselectionUnderCanvas
is displayed only behind the non-frozen fields of the selected row.- Returns:
- Current showSelectionUnderCanvas value. Default value is null
- See Also:
-
setShowSortArrow
Indicates whether a sorting arrow should appear for the listGrid, and its location. SeeSortArrow
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
Indicates whether a sorting arrow should appear for the listGrid, and its location. SeeSortArrow
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
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
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
WhenheaderSpans
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 aTreeGrid
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
WhenheaderSpans
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 aTreeGrid
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
If this list grid is showing anyfrozen
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 totrue
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
If this list grid is showing anyfrozen
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 totrue
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
Ifrecord[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 ofrecord[this.singleCellValueProperty]
.- Parameters:
singleCellValueProperty
- New singleCellValueProperty value. Default value is "singleCellValue"- Returns:
ListGrid
instance, for chaining setter calls
-
getSingleCellValueProperty
Ifrecord[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 ofrecord[this.singleCellValueProperty]
.- Returns:
- Current singleCellValueProperty value. Default value is "singleCellValue"
-
setSkinImgDir
Where do 'skin' images (those provided with the class) live?Note : This is an advanced setting
- Overrides:
setSkinImgDir
in classCanvas
- Parameters:
skinImgDir
- New skinImgDir value. Default value is "images/ListGrid/"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getSkinImgDir
Where do 'skin' images (those provided with the class) live?- Overrides:
getSkinImgDir
in classCanvas
- Returns:
- Current skinImgDir value. Default value is "images/ListGrid/"
- See Also:
-
setSkipLineBreaks
Whether to skip line breaks for all fields by default whenescaping HTML
. This property can be overridden at the field level byListGridField.skipLineBreaks
.- Parameters:
skipLineBreaks
- New skipLineBreaks value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getSkipLineBreaks
Whether to skip line breaks for all fields by default whenescaping HTML
. This property can be overridden at the field level byListGridField.skipLineBreaks
.- Returns:
- Current skipLineBreaks value. Default value is null
- See Also:
-
setSortArrowMenuButtonSpaceOffset
WhenleaveHeaderMenuButtonSpace
is true, configures the amount of space beyond theheaderMenuButtonWidth
on the right side of a ListGrid header button (left forRTL 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
orsortDescendingImage
are changed.- Parameters:
sortArrowMenuButtonSpaceOffset
- New sortArrowMenuButtonSpaceOffset value. Default value is 7- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getSortArrowMenuButtonSpaceOffset
public int getSortArrowMenuButtonSpaceOffset()WhenleaveHeaderMenuButtonSpace
is true, configures the amount of space beyond theheaderMenuButtonWidth
on the right side of a ListGrid header button (left forRTL 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
orsortDescendingImage
are changed.- Returns:
- Current sortArrowMenuButtonSpaceOffset value. Default value is 7
- See Also:
-
setSortAscendingImage
Image to show when sorted in ascending order. Can be either a regularSCImgURL
src, or anImgHTMLProperties
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
Image to show when sorted in ascending order. Can be either a regularSCImgURL
src, or anImgHTMLProperties
object.- Returns:
- Current sortAscendingImage value. Default value is {...}
- See Also:
-
setSortAscendingImage
Image to show when sorted in ascending order. Can be either a regularSCImgURL
src, or anImgHTMLProperties
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
Image to show when sorted in ascending order. Can be either a regularSCImgURL
src, or anImgHTMLProperties
object.- Returns:
- Current sortAscendingImage value. Default value is {...}
- See Also:
-
setSortBinaryByFileName
For any fields oftype "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 theBinaryFields
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 thedataProperties
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 oftype "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 theBinaryFields
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 thedataProperties
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
If set, whenever grouping is performed by an end user or by a programmatic call togroupBy()
, 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 tosetSort()
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
If set, whenever grouping is performed by an end user or by a programmatic call togroupBy()
, 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 tosetSort()
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
Image to show when sorted in descending order. Can be either a regularSCImgURL
src, or anImgHTMLProperties
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
Image to show when sorted in descending order. Can be either a regularSCImgURL
src, or anImgHTMLProperties
object.- Returns:
- Current sortDescendingImage value. Default value is {...}
- See Also:
-
setSortDescendingImage
Image to show when sorted in descending order. Can be either a regularSCImgURL
src, or anImgHTMLProperties
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
Image to show when sorted in descending order. Can be either a regularSCImgURL
src, or anImgHTMLProperties
object.- Returns:
- Current sortDescendingImage value. Default value is {...}
- See Also:
-
setSortDirection
Sorting direction of this ListGrid. If specified when the ListGrid is initialized, this property will be the default sorting direction for thesortField
. May be overridden by specifyingListGridField.sortDirection
.After initialization, this property will be updated on
sort()
orsetSort()
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'ssortDirection
to the direction of the first sort. In particular, if there is aninitialSort
orsortField
, thensortDirection
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, orsortDirection
.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 beunsorted
. SeeEditing
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
Sorting direction of this ListGrid. If specified when the ListGrid is initialized, this property will be the default sorting direction for thesortField
. May be overridden by specifyingListGridField.sortDirection
.After initialization, this property will be updated on
sort()
orsetSort()
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'ssortDirection
to the direction of the first sort. In particular, if there is aninitialSort
orsortField
, thensortDirection
will be updated during initialization to the direction of the first sort.- Returns:
- Current sortDirection value. Default value is "ascending"
- See Also:
-
setSortEditorSpanTitleSeparator
If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInSortEditor
is true, this string will be inserted between the headerSpan title(s) and the field title in the field chooser grid on themulti-sort editor
- Parameters:
sortEditorSpanTitleSeparator
- New sortEditorSpanTitleSeparator value. Default value is " - "- Returns:
ListGrid
instance, for chaining setter calls
-
getSortEditorSpanTitleSeparator
If this grid has specifiedheaderSpans
, andshowHeaderSpanTitlesInSortEditor
is true, this string will be inserted between the headerSpan title(s) and the field title in the field chooser grid on themulti-sort editor
- Returns:
- Current sortEditorSpanTitleSeparator value. Default value is " - "
-
setSorterButtonTitle
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
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
Specifies the field by which this grid should be initially sorted. Can be set to either afield 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()
orsetSort()
. Details about the current sort of a live grid can be retrieved by callinggetSortField()
orgetSort()
- 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
Specifies the field by which this grid should be initially sorted. Can be set to either afield 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()
orsetSort()
. Details about the current sort of a live grid can be retrieved by callinggetSortField()
orgetSort()
-
setSortField
Specifies the field by which this grid should be initially sorted. Can be set to either afield 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()
orsetSort()
. Details about the current sort of a live grid can be retrieved by callinggetSortField()
orgetSort()
- 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
If we're showing aheaderContextMenu
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
If we're showing aheaderContextMenu
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
If we're showing aheaderContextMenu
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
If we're showing aheaderContextMenu
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
WhenleaveHeaderMenuButtonSpace
is true, configures the amount of space beyond theheaderMenuButtonWidth
on the right side of a ListGrid header button (left forRTL mode
) to reserve for the sort numeral ifmulti-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
orsortDescendingImage
are changed.- Parameters:
sortNumeralMenuButtonSpaceOffset
- New sortNumeralMenuButtonSpaceOffset value. Default value is 9- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getSortNumeralMenuButtonSpaceOffset
public int getSortNumeralMenuButtonSpaceOffset()WhenleaveHeaderMenuButtonSpace
is true, configures the amount of space beyond theheaderMenuButtonWidth
on the right side of a ListGrid header button (left forRTL mode
) to reserve for the sort numeral ifmulti-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
orsortDescendingImage
are changed.- Returns:
- Current sortNumeralMenuButtonSpaceOffset value. Default value is 9
- See Also:
-
setSortNumeralStyle
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
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
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 becauseviewState
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 ofSortSpecifier
s) to match theListGridSortState
object passed in.
Used to restore previous state retrieved from the grid by a call togetSortState()
.- 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
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 becauseviewState
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 tosetSortState()
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
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 theClass
of the header buttons, you may also need to setheaderTitleStyle
.- 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
Button.baseStyle
to apply to the field header buttons for this ListGrid when showing header spans. Note that, depending on theClass
of the header buttons, you may also need to setheaderTitleStyle
.- Returns:
- Current spannedHeaderBaseStyle value. Default value is null
- See Also:
-
setStopOnErrors
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
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
When set to true, the first and last cells in each row will be styled with an additional CSS class, via thefirstCellStyle
andlastCellStyle
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()
orgetCellCSSText()
, 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
When set to true, the first and last cells in each row will be styled with an additional CSS class, via thefirstCellStyle
andlastCellStyle
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()
orgetCellCSSText()
, 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
Default CSS class for the ListGrid as a whole.- Overrides:
setStyleName
in classCanvas
- Parameters:
styleName
- New styleName value. Default value is "listGrid"- See Also:
-
getStyleName
Default CSS class for the ListGrid as a whole.- Overrides:
getStyleName
in classCanvas
- Returns:
- Current styleName value. Default value is "listGrid"
- See Also:
-
getSummaryRow
Automatically generated ListGrid for displaying grid summary information (seeshowGridSummary
).This component is an
com.smartgwt.client.types.AutoChild
and as such may be customized by callingsetAutoChildProperties("summaryRow", summaryRowProperties);
wheresummaryRowProperties
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
IfshowGridSummary
is true, and asummaryRowDataSource
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". OtherwiseautoFetchTextMatchStyle
will be used. This can be overridden viasummaryRowFetchRequestProperties
.Note : This is an advanced setting
- Parameters:
summaryRowCriteria
- New summaryRowCriteria value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getSummaryRowCriteria
IfshowGridSummary
is true, and asummaryRowDataSource
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". OtherwiseautoFetchTextMatchStyle
will be used. This can be overridden viasummaryRowFetchRequestProperties
.- Returns:
- Current summaryRowCriteria value. Default value is null
-
setSummaryRowDataSource
public ListGrid setSummaryRowDataSource(DataSource summaryRowDataSource) throws IllegalStateException IfshowGridSummary
is true, by default summary values are calculated on the client based on the current data-set for the grid (seegetGridSummary()
andgetGridSummaryFunction()
).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
andsummaryRowFetchRequestProperties
. Note that ifmaxSummaryRowRecords
is specified this will be passed to the server as theDSRequest.endRow
for the summaryRowFetchRequest. Developers may modify this property in order to display multiple summaryRowRecords from a summaryRowDataSource fetchNote 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
IfshowGridSummary
is true, by default summary values are calculated on the client based on the current data-set for the grid (seegetGridSummary()
andgetGridSummaryFunction()
).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
andsummaryRowFetchRequestProperties
. Note that ifmaxSummaryRowRecords
is specified this will be passed to the server as theDSRequest.endRow
for the summaryRowFetchRequest. Developers may modify this property in order to display multiple summaryRowRecords from a summaryRowDataSource fetchNote that specifying a
summaryRowDataSource
completely bypasses the standard client-side grid summary calculation logic.- Returns:
- Current summaryRowDataSource value. Default value is null
-
setSummaryRowFetchRequestProperties
IfshowGridSummary
is true, and asummaryRowDataSource
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 aDSRequest.operationId
to perform a custom fetch operation which retrieved only summary values based on criteria.Note that
DSRequest.startRow
andDSRequest.endRow
will be configured to only request the firstmaxSummaryRowRecords
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
IfshowGridSummary
is true, and asummaryRowDataSource
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 aDSRequest.operationId
to perform a custom fetch operation which retrieved only summary values based on criteria.Note that
DSRequest.startRow
andDSRequest.endRow
will be configured to only request the firstmaxSummaryRowRecords
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
Default height for thesummary row autoChild
. Note that this height is a minimum - the summary row hasautoFitData
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 thesummary row autoChild
. Note that this height is a minimum - the summary row hasautoFitData
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
- Parameters:
summaryRowStyle
- New summaryRowStyle value. Default value is "gridSummaryCell"- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getSummaryRowStyle
baseStyle
for thesummaryRow
- Returns:
- Current summaryRowStyle value. Default value is "gridSummaryCell"
- See Also:
-
setTableRowStyle
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
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
"Tall" baseStyle for this listGrid. Only applies ifbaseStyle
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 matchesnormalCellHeight
, in which casenormalBaseStyle
will be used. Note that in Internet Explorer iffastCellUpdates
is true,tallBaseStyle
will also be used even if the cellHeight matches the specifiednormalCellHeight
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
"Tall" baseStyle for this listGrid. Only applies ifbaseStyle
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 matchesnormalCellHeight
, in which casenormalBaseStyle
will be used. Note that in Internet Explorer iffastCellUpdates
is true,tallBaseStyle
will also be used even if the cellHeight matches the specifiednormalCellHeight
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
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 specifiedscrollRedrawDelay
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
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 specifiedscrollRedrawDelay
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
Default image to use for the dragTracker when things are dragged within or out of this list. Can be either a regularSCImgURL
src, or anImgHTMLProperties
object.Note : This is an advanced setting
- Parameters:
trackerImage
- New trackerImage value. Default value is {...}- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
setDragTrackerMode(com.smartgwt.client.types.DragTrackerMode)
com.smartgwt.client.widgets.grid.ListGrid#getDragTrackerIcon
SCImgURL
-
getTrackerImage
Default image to use for the dragTracker when things are dragged within or out of this list. Can be either a regularSCImgURL
src, or anImgHTMLProperties
object.- Returns:
- Current trackerImage value. Default value is {...}
- See Also:
-
getDragTrackerMode()
com.smartgwt.client.widgets.grid.ListGrid#getDragTrackerIcon
SCImgURL
-
setTrackerImage
Default image to use for the dragTracker when things are dragged within or out of this list. Can be either a regularSCImgURL
src, or anImgHTMLProperties
object.Note : This is an advanced setting
- Parameters:
trackerImage
- New trackerImage value. Default value is {...}- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
setDragTrackerMode(com.smartgwt.client.types.DragTrackerMode)
com.smartgwt.client.widgets.grid.ListGrid#getDragTrackerIcon
SCImgURL
-
getTrackerImageAsImgHTMLProperties
Default image to use for the dragTracker when things are dragged within or out of this list. Can be either a regularSCImgURL
src, or anImgHTMLProperties
object.- Returns:
- Current trackerImage value. Default value is {...}
- See Also:
-
getDragTrackerMode()
com.smartgwt.client.widgets.grid.ListGrid#getDragTrackerIcon
SCImgURL
-
setUnfreezeFieldText
If we're showing aheaderContextMenu
for this grid andthis.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, withtitle
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
If we're showing aheaderContextMenu
for this grid andthis.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, withtitle
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
If we're showing aheaderContextMenu
for this grid, andthis.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
If we're showing aheaderContextMenu
for this grid, andthis.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
Value to return fromgetFormattedRowCount()
when the row count is unknown- Parameters:
unknownRowCountDisplayValue
- New unknownRowCountDisplayValue value. Default value is "many"- Returns:
ListGrid
instance, for chaining setter calls
-
getUnknownRowCountDisplayValue
Value to return fromgetFormattedRowCount()
when the row count is unknown- Returns:
- Current unknownRowCountDisplayValue value. Default value is "many"
-
setUnremoveIcon
WhencanRemoveRecords
is enabled, this icon will be shown in the auto generated field fro removing records if the record has been marked as removed viamarkRecordRemoved()
. 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
WhencanRemoveRecords
is enabled, this icon will be shown in the auto generated field fro removing records if the record has been marked as removed viamarkRecordRemoved()
. 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
Should thesummary row
orgroup summaries
be updated during editing of grid records? This can be set false to improve performance when a large number ofListGridFields
orDataSourceFields
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 assaveAllEdits()
.- Parameters:
updateSummariesDuringEditing
- New updateSummariesDuringEditing value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getUpdateSummariesDuringEditing
public boolean getUpdateSummariesDuringEditing()Should thesummary row
orgroup summaries
be updated during editing of grid records? This can be set false to improve performance when a large number ofListGridFields
orDataSourceFields
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 assaveAllEdits()
.- Returns:
- Current updateSummariesDuringEditing value. Default value is true
- See Also:
-
setUseAdvancedCriteria
Should thefilter-editor
in this grid always produceAdvancedCriteria
?- Parameters:
useAdvancedCriteria
- New useAdvancedCriteria value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getUseAdvancedCriteria
Should thefilter-editor
in this grid always produceAdvancedCriteria
?- 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 theFieldPicker
will be shown instead of the column picker submenu if there are more fields in the grid thanadvancedFieldPickerThreshold
.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
If set to true, an advanced field picker based on theFieldPicker
will be shown instead of the column picker submenu if there are more fields in the grid thanadvancedFieldPickerThreshold
.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
Are rollovers cell-level or row-level?- Parameters:
useCellRollOvers
- New useCellRollOvers value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls
-
getUseCellRollOvers
Are rollovers cell-level or row-level?- Returns:
- Current useCellRollOvers value. Default value is null
-
setUseClientFiltering
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'sdataProperties
and overrides any value set there.While the default value is null, the effective default is true, since
useClientFiltering
is true onResultSet
.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
- You can easily prevent client-side
filtering for a given field by setting
-
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'sdataProperties
and overrides any value set there.While the default value is null, the effective default is true, since
useClientFiltering
is true onResultSet
.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
- You can easily prevent client-side
filtering for a given field by setting
-
setUseCopyPasteShortcuts
For ListGrids withcanSelectCells: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
If this property is unset, default behavior will enable these shortcuts if
canSelectCells
is true, andcanDragSelectText
andselectCellTextOnClick
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
- ctrl+c: retrieve selected cell data via a call to
-
getUseCopyPasteShortcuts
For ListGrids withcanSelectCells: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
If this property is unset, default behavior will enable these shortcuts if
canSelectCells
is true, andcanDragSelectText
andselectCellTextOnClick
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
- ctrl+c: retrieve selected cell data via a call to
-
setUseMultiSelectForFilterValueMaps
IfshowFilterEditor
is true, when creating a SelectItem for editing criteria for a field with a ValueMap, should the SelectItem default tomultiple: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()IfshowFilterEditor
is true, when creating a SelectItem for editing criteria for a field with a ValueMap, should the SelectItem default tomultiple:true
?This overrides
SearchForm.useMultiSelectForValueMaps
on the filterEditor's edit form.- Returns:
- Current useMultiSelectForFilterValueMaps value. Default value is true
-
setUseRemoteValidators
IfsaveLocally
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 totrue
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
IfsaveLocally
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 totrue
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
Enables various styling behaviors that potentially make sense whengetRowSpan()
has been overridden to introduce spanning cells, and spanning is largest on the left and smaller as cells go to the right. Specifically:- computes
banded styling
based on the span of the cell in the left-most column - enables
cell-level selection
, includingcell-level rollover
styling - enables row-span-sensitive cell selection. See also
RowSpanSelectionMode
for available behaviors
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
- computes
-
getUseRowSpanStyling
Enables various styling behaviors that potentially make sense whengetRowSpan()
has been overridden to introduce spanning cells, and spanning is largest on the left and smaller as cells go to the right. Specifically:- computes
banded styling
based on the span of the cell in the left-most column - enables
cell-level selection
, includingcell-level rollover
styling - enables row-span-sensitive cell selection. See also
RowSpanSelectionMode
for available behaviors
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
- computes
-
setValidateByCell
Whether client-side validation checks should be performed when the user moves between cells in the current edit row. If unset, defaults toeditByCell
.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, setneverValidate
:true.- Parameters:
validateByCell
- New validateByCell value. Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
getValidateByCell
Whether client-side validation checks should be performed when the user moves between cells in the current edit row. If unset, defaults toeditByCell
.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, setneverValidate
:true.- Returns:
- Current validateByCell value. Default value is null
- See Also:
-
setValidateOnChange
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
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
Height for value icons for this listGrid. OverridesvalueIconSize
. 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
Height for value icons for this listGrid. OverridesvalueIconSize
. Can be overridden at the field level- Returns:
- Current valueIconHeight value. Default value is null
- See Also:
-
setValueIconLeftPadding
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:
-
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
ImageColumns overview and related methods
-
setValueIconRightPadding
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:
-
com.smartgwt.client.widgets.grid.ListGridField#getValueIcons
ImageColumns overview and related methods
-
setValueIconSize
Default width and height of value icons for this ListGrid. Can be overridden at the listGrid level via explicitvalueIconWidth
andvalueIconHeight
, or at the field level viaListGridField.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 explicitvalueIconWidth
andvalueIconHeight
, or at the field level viaListGridField.valueIconSize
,ListGridField.valueIconWidth
and {ListGridField.valueIconHeight}- Returns:
- Current valueIconSize value. Default value is 16
- See Also:
-
setValueIconWidth
Width for value icons for this listGrid. OverridesvalueIconSize
. 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
Width for value icons for this listGrid. OverridesvalueIconSize
. Can be overridden at the field level- Returns:
- Current valueIconWidth value. Default value is null
- See Also:
-
setViewState
Initial view state may be provided for the listGrid at init time. To set view state at runtime, usesetViewState()
.
SeeListGridViewState
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". SeecanSaveSearches
for how to enable menu options to save searches in grids. Note that each saved search includes thefull 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 theListGridViewState
object passed in.
Used to restore previous state retrieved from the grid by a call togetViewState()
.- 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
Initial view state may be provided for the listGrid at init time. To set view state at runtime, usesetViewState()
.
SeeListGridViewState
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". SeecanSaveSearches
for how to enable menu options to save searches in grids. Note that each saved search includes thefull 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 aListGridViewState
object.
This string can be stored over page-reloads (for example, inbrowser local storage
or as field value in a record stored to aDataSource
) and then reapplied to the grid viasetViewState()
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
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 therecordComponents subsystem
, as recordComponents expand the rows that contain them. This flag should be manually enabled when callingaddEmbeddedComponent()
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
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 therecordComponents subsystem
, as recordComponents expand the rows that contain them. This flag should be manually enabled when callingaddEmbeddedComponent()
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
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
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
IfcanRemoveRecords
is true, when the user clicks the remove icon for some record, should we show a warning message (defined aswarnOnRemovalMessage
) and allow the user to cancel removal?- Parameters:
warnOnRemoval
- New warnOnRemoval value. Default value is false- Returns:
ListGrid
instance, for chaining setter calls
-
getWarnOnRemoval
IfcanRemoveRecords
is true, when the user clicks the remove icon for some record, should we show a warning message (defined aswarnOnRemovalMessage
) and allow the user to cancel removal?- Returns:
- Current warnOnRemoval value. Default value is false
-
setWarnOnRemovalMessage
Warning message to show the user on a click on the 'remove' icon ifcanRemoveRecords
is true andwarnOnRemoval
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
Warning message to show the user on a click on the 'remove' icon ifcanRemoveRecords
is true andwarnOnRemoval
is true.- Returns:
- Current warnOnRemovalMessage value. Default value is "Are you sure you want to delete this record?"
-
setWarnOnUnmappedValueFieldChange
If a field hasListGridField.displayField
specified and has noListGridField.optionDataSource
, this field will display the value from thedisplayField
of each record by default (for more on this behavior seeListGridField.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
tofalse
.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:
- 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
- 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.
Note : This is an advanced setting
- Parameters:
warnOnUnmappedValueFieldChange
- New warnOnUnmappedValueFieldChange value. Default value is true- Returns:
ListGrid
instance, for chaining setter calls
-
getWarnOnUnmappedValueFieldChange
If a field hasListGridField.displayField
specified and has noListGridField.optionDataSource
, this field will display the value from thedisplayField
of each record by default (for more on this behavior seeListGridField.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
tofalse
.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:
- 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
- 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.
- Returns:
- Current warnOnUnmappedValueFieldChange value. Default value is true
-
setWrapCells
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, fixedcellHeight
to reveal more content, or setfixedRecordHeights
to false to allow auto-sizing.
If this method is called after the component has been drawn/initialized: Setter forwrapCells
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
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, fixedcellHeight
to reveal more content, or setfixedRecordHeights
to false to allow auto-sizing.- Returns:
- Current wrapCells value. Default value is false
- See Also:
-
setWrapHeaderSpanTitles
IfHeaderSpan.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
IfHeaderSpan.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
IfListGridField.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
IfListGridField.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
Perform a DataSource "add" operation to add new records to this component's DataSource.- Parameters:
newRecord
- new record- See Also:
-
addData
- See Also:
-
addData
Perform a DataSource "add" operation to add new records to this component's DataSource.- Parameters:
newRecord
- new recordcallback
- method to call on operation completionrequestProperties
- additional properties to set on the DSRequest that will be issued- See Also:
-
addEmbeddedComponent
Attaches the component to the provided record. Ifposition
is specified as"within"
Canvas.snapTo
andCanvas.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 settingcanDragResize
: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 embedrecord
- record to attach the component to
-
addEmbeddedComponent
-
addEmbeddedComponent
public void addEmbeddedComponent(Canvas component, ListGridRecord record, Integer rowNum, Integer colNum) -
addEmbeddedComponent
public void addEmbeddedComponent(Canvas component, ListGridRecord record, Integer rowNum, Integer colNum, EmbeddedPosition position) Attaches the component to the provided record. Ifposition
is specified as"within"
Canvas.snapTo
andCanvas.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 settingcanDragResize
: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 embedrecord
- record to attach the component torowNum
- rowNum of the record to attach the component tocolNum
- colNum in which to embed the componentposition
- positioning with respect to the record or cell (Defaults to "expand").
-
addSort
Adds anotherSortSpecifier
to this grid's sort configuration and resorts.- Parameters:
sortSpecifier
- A SortSpecifier object indicating an additional field and direction to sort by
-
applyCellData
Applies a set of Records containing coordinate-based data as returned bygetSelectedCellData()
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
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
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 customsetSortHandler
). 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 - callsetSort()
instead.- Parameters:
sortSpecifiers
- Array ofSortSpecifier
objects
-
askForSort
public void askForSort()Show a dialog to configure the sorting of multiple fields on this component. Calls through toMultiSortDialog.askForSort()
, passing this component as the fieldSource and the currentsort-specification
if there is one.The generated multiSortDialog can be customized via
multiSortDialogDefaults
,multiSortDialogProperties
. -
autoFitField
Programmatically cause a field to auto-fit horizontally to it's contents or title.Does not establish permanent auto-fitting - use
setAutoFitWidth()
orsetAutoFitFieldWidths()
to do so.Note that unlike the ongoing autoFit set up by
autoFitFieldWidths
orListGridField.autoFitWidth
, any specifiedListGridField.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 theautoFitWidthApproach
.- 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 inautoFitWidthApproach
) Does not establish permanent auto-fitting - usesetAutoFitWidth()
to do so.Note that unlike the ongoing autoFit set up by
autoFitFieldWidths
orListGridField.autoFitWidth
, any specifiedListGridField.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
Perform a one-time horizontal auto-fit of the fields passed. Fields will be sized to match their contents or title (as specified inautoFitWidthApproach
) Does not establish permanent auto-fitting - usesetAutoFitWidth()
to do so.Note that unlike the ongoing autoFit set up by
autoFitFieldWidths
orListGridField.autoFitWidth
, any specifiedListGridField.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
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 viagetEditValues()
.
Note: This is an override point.
For more information on editing, see the
editing overview
.- Parameters:
rowNum
- row number for the cellcolNum
- column number of the cell- Returns:
- Whether to allow editing this cell
- See Also:
-
canExpandRecord
Indicates whether a given record or rowNum can be expanded. The default implementation checks the value ofcanExpandRecords
andrecord[
.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 withrowNum
- rowNum of the record to work with- Returns:
- true if the record can be expanded
-
canSelectCell
public boolean canSelectCell(int rowNum, int colNum) IfcanSelectCells
is set totrue
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 selectedcolNum
- colNum being selected- Returns:
- return false to disallow selection
-
addCellSavedHandler
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()
orfield.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 interfaceHasCellSavedHandlers
- Parameters:
handler
- the cellSaved handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellClickHandler
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 interfaceHasCellClickHandlers
- Parameters:
handler
- the cellClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellContextClickHandler
Add a cellContextClick handler.Called when a cell receives a contextclick event.
- Specified by:
addCellContextClickHandler
in interfaceHasCellContextClickHandlers
- Parameters:
handler
- the cellContextClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellDoubleClickHandler
Add a cellDoubleClick handler.Called when a cell receives a double click event.
- Specified by:
addCellDoubleClickHandler
in interfaceHasCellDoubleClickHandlers
- Parameters:
handler
- the cellDoubleClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellErrorIconHoverHandler
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 withinCellErrorIconHoverHandler.onCellErrorIconHover(com.smartgwt.client.widgets.grid.events.CellErrorIconHoverEvent)
to suppress this default behavior.- Specified by:
addCellErrorIconHoverHandler
in interfaceHasCellErrorIconHoverHandlers
- Parameters:
handler
- the cellErrorIconHover handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellErrorIconOutHandler
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 interfaceHasCellErrorIconOutHandlers
- Parameters:
handler
- the cellErrorIconOut handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellErrorIconOverHandler
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 interfaceHasCellErrorIconOverHandlers
- Parameters:
handler
- the cellErrorIconOver handler- Returns:
HandlerRegistration
used to remove this handler
-
cellHasChanges
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 changescolNum
- index of the col to check for changes- Returns:
- returns true if the cell has unsaved edits
- See Also:
-
cellHasErrors
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 errorsfieldID
- 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
Add a cellHover handler.Called when the mouse hovers over a cell if
this.canHover
istrue
. To suppress the hover text from being shown ifshowHover
istrue
forthis
or the field, cancel theCellHoverEvent
. 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 interfaceHasCellHoverHandlers
- Parameters:
handler
- the cellHover handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellMouseDownHandler
Add a cellMouseDown handler.Called when a cell receives a mousedown event.
- Specified by:
addCellMouseDownHandler
in interfaceHasCellMouseDownHandlers
- Parameters:
handler
- the cellMouseDown handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellMouseUpHandler
Add a cellMouseUp handler.Called when a cell receives a mouseup event.
- Specified by:
addCellMouseUpHandler
in interfaceHasCellMouseUpHandlers
- Parameters:
handler
- the cellMouseUp handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellOutHandler
Add a cellOut handler.Called when the mouse pointer leaves a cell
- Specified by:
addCellOutHandler
in interfaceHasCellOutHandlers
- Parameters:
handler
- the cellOut handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellOverHandler
Add a cellOver handler.Called when the mouse pointer enters a cell
- Specified by:
addCellOverHandler
in interfaceHasCellOverHandlers
- Parameters:
handler
- the cellOver handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellSelectionChangedHandler
Add a cellSelectionChanged handler.Called when (cell-based) selection changes within this grid.
- Specified by:
addCellSelectionChangedHandler
in interfaceHasCellSelectionChangedHandlers
- Parameters:
handler
- the cellSelectionChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
addCellValueHoverHandler
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 withinCellValueHoverHandler.onCellValueHover(com.smartgwt.client.widgets.grid.events.CellValueHoverEvent)
to suppress this default behavior.- Specified by:
addCellValueHoverHandler
in interfaceHasCellValueHoverHandlers
- Parameters:
handler
- the cellValueHover handler- Returns:
HandlerRegistration
used to remove this handler
-
cellValueHoverHTML
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 cellcolNum
- column number of the celldefaultHTML
- the HTML that would have been displayed by default. SeeHTMLString
- Returns:
- HTML to be displayed in the hover. If null or an empty string, then the hover is canceled.
See
HTMLString
- See Also:
-
cellValueIsClipped
Is the value in a given cell clipped?- Parameters:
rowNum
- row number of the cellcolNum
- 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
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
- See Also:
-
chartData
- 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 fielddataFields
- optional list of fields to use as labels. By default, all fields are used.dataRows
- set of records to chart. Can be obtained by eggrid.data.getRange()
.chartProperties
- properties to pass to the created chartlabelFieldFirst
- 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 builtinClear Filter menu-item
, clears all user-visible criteria applied to this grid, including values and filter-operators in thefilter-row
and criteria in theadvanced 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 thefilterEditor
but will not change their currentoperator
or clear associatedoperator-icons
. SeeclearAllCriteria()
for a means of doing that. -
clearCriteria
- See Also:
-
clearCriteria
Clear the current criteria used to filter data. This method clears filter-values from fields in thefilterEditor
but will not change their currentoperator
or clear associatedoperator-icons
. SeeclearAllCriteria()
for a means of doing that.- Parameters:
callback
- callback to invoke on completionrequestProperties
- 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 forfieldName
- col index or field name of cell to add validation error for- See Also:
-
clearFieldSearchOperator
Clears the current search operator from a field in the grid'sfilter row
. This will reset the field to itsdefault operator
and, unlessalwaysShowOperatorIcon
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 - seesetFieldSearchOperator()
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, usesetFieldSearchOperator()
.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 fromsuppressFilter
- 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 theadvanced 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-savedview state
as described inautoPersistViewState
.- See Also:
-
clearSort
public void clearSort()This method clears any existing sort on this grid by callingsetSort()
with a null parameter. The internal list ofSortSpecifier
s is removed and the grid is unsorted. -
closeGroup
Closes the node represented by the "record" parameter, if it is a folder and is not already closed. This method only applies togrouped
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
Collapses a givenrecord
which has been previously expanded usingexpandRecord()
.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 overridecollapseRecord
to take care of clean-up for such components.- Parameters:
record
- record to collapse
-
collapseRecords
Collapses the passed list of expandedrecords
. CallscollapseRecord
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
WhenshowRecordComponents
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 implementupdateRecordComponent()
which allows already created components to be altered for re-use in new records. See theshowRecordComponents
overview for more information.- Parameters:
record
- record to create a component forcolNum
- cell to which the component applies- Returns:
- return the component to embed in the passed record
-
addCriteriaChangedHandler
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 interfaceHasCriteriaChangedHandlers
- Parameters:
handler
- the criteriaChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
addDataArrivedHandler
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 aResultSet
. This ResultSet may have been created manually and applied to the grid via a call toListGrid.setData()
or may have been created and automatically assigned ifListGrid.fetchData()
was used to populate the grid. This method is fired directly in response todataArrived()
firing on the data object.Note that
dataArrived()
, unlikeListGrid.dataChanged()
, only fires in limited circumstances - when data for aResultSet
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 toListGrid.dataChanged()
.- Specified by:
addDataArrivedHandler
in interfaceHasDataArrivedHandlers
- Parameters:
handler
- the dataArrived handler- Returns:
HandlerRegistration
used to remove this handler
-
addDataChangedHandler
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:
- a call to
ListGrid.addData()
,ListGrid.updateData()
, orListGrid.removeData()
-
DataSource
updates from the server forResultSet
data (triggered by record editing, etc.) - fetches arriving back from the server for
ResultSet
data - changes to array data if made through APIs such as Array.set(), Array.add(), etc.
- cache invalidation
- filtering
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 forResultSet
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, anListGrid.addData()
,ListGrid.updateData()
, orListGrid.removeData()
, or aDataSource
update forResultSet
data (the first three reasons listed above) but otherwise will be null.- Specified by:
addDataChangedHandler
in interfaceHasDataChangedHandlers
- Parameters:
handler
- the dataChanged handler- Returns:
HandlerRegistration
used to remove this handler
- a call to
-
dataChangedComplete
public void dataChangedComplete()Notification method fired when thegrid data has changed
. -
dataChangedComplete
Notification method fired when thegrid 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 rangeendRow
- 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 fordontHideEditor
- 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 cancelcolNum
- 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
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 cancelcolNum
- 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
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()
andtoggleSort()
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 customsetSortHandler
). 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 - callsetSort()
instead.- Parameters:
sortSpecifiers
- Array ofSortSpecifier
objects
-
addDrawAreaChangedHandler
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 theoldStartCol
,oldEndCol
range reported by this method. Frozen fields are assumed never to be scrolled out of view.- Specified by:
addDrawAreaChangedHandler
in interfaceHasDrawAreaChangedHandlers
- 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:
-
willAcceptDrop()
com.smartgwt.client.widgets.grid.ListGrid#transferDragData
-
addEditCompleteHandler
Add a editComplete handler.Callback fired when inline edits have been successfully saved.
No default implementation.
- Specified by:
addEditCompleteHandler
in interfaceHasEditCompleteHandlers
- 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
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
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 interfaceHasEditFailedHandlers
- Parameters:
handler
- the editFailed handler- Returns:
HandlerRegistration
used to remove this handler
-
addEditorEnterHandler
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()
orListGrid.setEditValues()
.Can also be overridden on a per-field basis via
field.editorEnter
.- Specified by:
addEditorEnterHandler
in interfaceHasEditorEnterHandlers
- Parameters:
handler
- the editorEnter handler- Returns:
HandlerRegistration
used to remove this handler
-
addEditorExitHandler
Add a editorExit handler.Callback fired when the user attempts to navigate away from the current edit cell, or complete the current edit.
Call
EditorExitEvent.cancel()
from withinEditorExitHandler.onEditorExit(com.smartgwt.client.widgets.grid.events.EditorExitEvent)
from this method to cancel the default behavior (Saving / cancelling the current edit / moving to the next edit cell).This callback is typically used to dynamically update values or value maps for related fields (via
ListGrid.setEditValue()
andListGrid.setEditorValueMap()
respectively, or to implement custom navigation (viastartEditing(rowNum,colNum)
.Can be overridden at the field level as field.editorExit.
- Specified by:
addEditorExitHandler
in interfaceHasEditorExitHandlers
- 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 ifautoSaveEdits
is true, the value will be saved to the server.- See Also:
-
expandRecord
Expands a givenrecord
by creating a subcomponent and inserting it in to the record's grid-row. A number of built-inexpansionModes
are supported by the default implementation ofgetExpansionComponent()
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
Expands the passed list ofrecords
by creating a subcomponent for each record and inserting them it in to the record's grid-row. CallsexpandRecord
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 specifiedexport format
.A variety of DSRequest settings, such as
exportAs
andDSRequest.exportFilename
, affect the exporting process: seeexportResults
for further detail.If this component is
databound
and not all records that match the currentfilter-criteria
havebeen loaded
, you can callloadAllRecords()
- this method accepts a callback which is fired when all necessary data has arrived. When that callback fires, a call toexportClientData
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
ListGridField.escapeHTML
setting on a field determines how escaped and unescaped HTML values are handled. In particular, ifescapeHTML
is not set for a field, a value like "<FOO>" will be exported as the empty string, and you'd need the escaped value "<FOO>" 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 isdatabound
and you specify a validoperationId
in the properties passed to this method, the call will go through the instance methodDataSource.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. - Set
-
exportClientData
- See Also:
-
exportClientData
Exports this component's data with client-side formatters applied, so is suitable for direct display to users, using the specifiedexport format
.A variety of DSRequest settings, such as
exportAs
andDSRequest.exportFilename
, affect the exporting process: seeexportResults
for further detail.If this component is
databound
and not all records that match the currentfilter-criteria
havebeen loaded
, you can callloadAllRecords()
- this method accepts a callback which is fired when all necessary data has arrived. When that callback fires, a call toexportClientData
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
ListGridField.escapeHTML
setting on a field determines how escaped and unescaped HTML values are handled. In particular, ifescapeHTML
is not set for a field, a value like "<FOO>" will be exported as the empty string, and you'd need the escaped value "<FOO>" 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 isdatabound
and you specify a validoperationId
in the properties passed to this method, the call will go through the instance methodDataSource.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 specifyingexportData
on the request properties allows the developer to pass in an explicit data set to export.callback
- Optional callback. If you specifyexportToClient
: 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:
- Set
-
fetchRelatedData
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 recordschema
- schema of the DataSource record, or DataBoundComponent already bound to that schema- See Also:
-
fetchRelatedData
-
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 recordschema
- schema of the DataSource record, or DataBoundComponent already bound to that schemacallback
- callback to invoke on completionrequestProperties
- additional properties to set on the DSRequest that will be issued- See Also:
-
fetchRowCount
public void fetchRowCount()For databound grids, method will fall through toResultSet.fetchRowCount()
, allowing developers to request an accurate row count from the dataSource whenprogressive loading is active
.- See Also:
-
fetchRowCount
- See Also:
-
fetchRowCount
For databound grids, method will fall through toResultSet.fetchRowCount()
, allowing developers to request an accurate row count from the dataSource whenprogressive 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 thegetRowCount()
andgetRowCountStatus()
methods.dsRequest
- Custom properties for the row count fetch request- See Also:
-
fieldIsEditable
Can the field be edited? This method looks atcanEdit
for the grid as well as theListGridField.canEdit
value, to determine whether editing is allowed. This method's return value is not authoritative for editibility sincecanEditCell()
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 atcanEdit
for the grid as well as theListGridField.canEdit
value, to determine whether editing is allowed. This method's return value is not authoritative for editibility sincecanEditCell()
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
Can the field be edited? This method looks atcanEdit
for the grid as well as theListGridField.canEdit
value, to determine whether editing is allowed. This method's return value is not authoritative for editibility sincecanEditCell()
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
Check whether a field is currently visible- Parameters:
field
- field to be checked- Returns:
- true if the field is currently visible, false otherwise.
-
addFieldStateChangedHandler
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 interfaceHasFieldStateChangedHandlers
- 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
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 theSearchForm
attribute, which requires no code.May fire as criteria values are being edited if
ListGrid.filterByCell
orListGrid.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 theadvanced filtering dialog
. A call toListGrid.getFilterEditorCriteria()
does not include theadvanced filtering criteria
.If you wish to access the
criteria
applied to the grid without picking up any edits to the Filter Editor, useListGrid.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 specifiedListGrid.autoFetchTextMatchStyle
is picked upDSRequest request = new DSRequest(); request.setTextMatchStyle(grid.getAutoFetchTextMatchStyle()); grid.filterData(grid.getFilterEditorCriteria(), null, request);
- Specified by:
addFilterEditorSubmitHandler
in interfaceHasFilterEditorSubmitHandlers
- Parameters:
handler
- the filterEditorSubmit handler- Returns:
HandlerRegistration
used to remove this handler
-
focusInCell
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 rowcol
- 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
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
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
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 interfaceHasFormulaUpdatedHandlers
- Parameters:
handler
- the formulaUpdated handler- Returns:
HandlerRegistration
used to remove this handler
-
freezeField
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
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
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
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 (seemarkRecordRemoved()
as well as records with unsaved changes to field values.- Returns:
- Array of rowNums for rows with edit values pending submission.
- See Also:
-
getAllFields
Get the complete array of fields for this ListGrid, including fields that are not currently visible or were specified implicitly viadataSource
.This list of fields is only valid once the ListGrid has been
drawn
or oncesetFields()
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, usesetFieldProperties()
or more specific APIs such assetFieldTitle()
.- Returns:
- Array of all fields in the ListGrid
-
getAriaState
Dynamically retrieves the aria properties to write out for this listGrid inscreen reader mode
.If
ariaRole
is set to"grid"
this will return an object withrowcount
andcolcount
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
Retrieves dynamically calculated defaultARIA state mapping
properties for this listGrid. These will be combined with explicitly specified aria state as described ingetAriaState()
.Overridden by ListGrid to pick up aria-rowcount and aria-colcount.
- Overrides:
getAriaStateDefaults
in classCanvas
- Returns:
- dynamically calculated default aria state properties
-
getBaseStyle
Return the base styleName for this cell. Has the following implementation by default:- If
this.editFailedBaseStyle
is defined, and the cell is displaying a validation error return this value. - If
this.editFailedPendingStyle
is defined, and the cell is displaying an edit value that has not yet been saved (seeautoSaveEdits
) return this value. - Otherwise return
record[listGrid.recordBaseStyleProperty]
, if defined, otherwisefield.baseStyle
.
baseStyle
is specified this will be used. Otherwise for grids showing fixed height rows which matchnormalCellHeight
normalBaseStyle
will be used. For grids with variable, or modified cell heights,tallBaseStyle
will be used.Note also that enabling
fastCellUpdates
will cause thetallBaseStyle
to be used rather thannormalBaseStyle
.As noted under
enforceVClipping
, cell content which renders taller than the available space within a cell may cause rows to expand even iffixedRecordHeights
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 benull
for a new edit row at the end of this grid's data set.rowNum
- row number for the cellcolNum
- column number of the cell- Returns:
- CSS class for this cell.
See
CSSStyleName
- See Also:
- If
-
getCellAriaState
Returns a map ofWAI 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 cellcolNum
- column index of the cellrecord
- record for the cell in questionrole
- ARIA role for the cell as returned bygetCellRole()
- Returns:
- Object containing aria property names and values to write into the cell's HTML
- See Also:
-
getCellContextMenuItems
IfshowCellContextMenus
istrue
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 inrowNum
- Index of the record the user clicked incolNum
- Index of the column the user clicked in- Returns:
-
getCellCSSText
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 getCellRecordrowNum
- row number for the cellcolNum
- column number of the cell- Returns:
- CSS text for this cell
- See Also:
-
getCellErrors
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
WhenshowHoverComponents
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, setCanvas.hoverAutoDestroy
to false on the returned component.If you return a component that fetches data or loads content dynamically:
- 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
- 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 - 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 forrowNum
- row number for the cellcolNum
- column number of the cell- Returns:
- the component to show as a hover
-
getCellPageRect
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 cellcolNum
- 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 usingrow 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 forcolNum
- column number of cell to return the row span for- Returns:
- number of cells spanned by the cell that spans through these coordinates
-
getCellSelection
WhencanSelectCells
is active, returns theCellSelection
object that tracks and manages the current selection. Returns null ifcanSelectCells
is false.- Returns:
- current cellSelection
-
getCellStartRow
public int getCellStartRow(int rowNum, int colNum) When usingrow 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 returnedcolNum
- column number of cell for which the start row should be returned- Returns:
- row number where spanning starts
-
getCellStyle
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 ofGridRenderer.getBaseStyle()
and the state of the record using the rules described inCellStyleSuffixes
.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 columnrowNum
- number of the rowcolNum
- number of the column- Returns:
- CSS style for this cell.
See
CSSStyleName
- See Also:
- attaching a custom style to a record by setting
-
getColumnLeft
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
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
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
Returns the expansion component derived fromgetExpansionComponent()
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
Returns the expansion component derived fromgetExpansionComponent()
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
Returns an array of widths of the visible fields in thisListGrid
, in px. This method is implemented by callinggetFieldWidth()
for each field. If field widths cannot be determined, the returned array will contain nulls.- Returns:
- field widths in px
-
setDefaultFieldWidthCustomizer
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 thefield auto fit
behavior. Note that this method returns a size for content, so will not be consulted ifautoFitWidthApproach
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 avalueIcon
as a value, and for boolean fields which show a checkbox value, the width will be calculated based on the icon size andiconPadding
. For other fields thegetFieldContentWidth()
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 theListGridField.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
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, unlikegetDefaultFormattedValue()
this method will call any explicit cell formatter specified on the field passed in (though it will not call acomponent 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
andcolNum
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 objectfield
- the field object- Returns:
- Default formatted value
- See Also:
-
getDefaultFormattedFieldValue
-
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, unlikegetDefaultFormattedValue()
this method will call any explicit cell formatter specified on the field passed in (though it will not call acomponent 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
andcolNum
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 objectfield
- the field objectrowNum
- rowNum (passed to any field level cell formatter)colNum
- colNum (passed to any field level cell formatter)- Returns:
- Default formatted value
- See Also:
-
getDefaultFormattedValue
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 somelink
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 objectrowNum
- rowNum for the cellcolNum
- colNum for the cell- Returns:
- Cell value with default formatters applied
- See Also:
-
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
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 keysfield
- 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
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 returnedcolNum
- 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
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, thenCanvas.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
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, thenCanvas.getOffsetY()
will be used.- Returns:
- row number, or -2 if beyond last drawn row
-
getExpandedRecords
- Returns:
- All expanded records in the grid
-
getExpansionComponent
WhencanExpandRecords
is true, gets the embedded-component to show as a given record's expansionComponent. This component is then housed ina 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 overridecollapseRecord()
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
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, background color to use for the cell at the given rowNum and colNum.See
ExportBGColor
for an overview.- Parameters:
rowNum
- row number of cellcolNum
- column number of cellrecord
- 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
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, 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
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, background color to use for the given rowNum.See
ExportBGColor
for an overview.- Parameters:
rowNum
- row numberrecord
- 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
When exporting data to Excel/OpenOffice format usingexportData()
orexportClientData()
, 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 cellcolNum
- column number of cellrecord
- 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
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, usegetFieldByName()
.When using
DataBinding
, the field definition may be a mix of information derived fromfields
anddataSource
.- Parameters:
colNum
- number or name of the field- Returns:
- field definition
-
getField
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, usegetFieldByName()
.When using
DataBinding
, the field definition may be a mix of information derived fromfields
anddataSource
.- Parameters:
colNum
- number or name of the field- Returns:
- field definition
- See Also:
-
getFieldByName
Given a field name, return the appropriate field definition. UnlikegetField()
, this method will return the field definition even if it's not visible in the grid. -
getFieldContentWidth
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
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
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
Returns the current search-operator applied to criteria for a given field in this grid'sfilter row
. Typically, this will be the operator most recently selected by the user, or applied by a call tosetCriteria()
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
Return the title of a field, specified by name or index.- Parameters:
fieldId
- name or index of the field- Returns:
- Field title.
-
getFieldTitle
Return the title of a field, specified by name or index.- Parameters:
fieldId
- name or index of the field- Returns:
- Field title.
-
getFieldWidth
Returns a numeric value for the width of some field within thisListGrid
.- 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
IfshowFilterEditor
is true, this method will return the criteria currently displayed in thefilterEditor
. Note that these values may differ from the criteria returned bygetCriteria()
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
IfshowFilterEditor
is true, this method will return the criteria currently displayed in thefilterEditor
. Note that these values may differ from the criteria returned bygetCriteria()
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
Extracts and returns the criteria for the passed field from thefilterEditor
. The result can be anAdvancedCriteria
, if the field in question produces more than one restriction, such as separategreaterThan
andlessThan
criteria for a range.- Parameters:
fieldName
- name of the field to get the criteria for- Returns:
- the passed field's filterEditor criterion
-
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
Returns thecurrent 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 currentrowCount 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 ofrowCountDisplayPrecision
."exact"
: The row count will be formatted usingexactRowCountFormat
"minimum"
: The row count will be formatted usingminimumRowCountFormat
"approximate"
: The row count will be formatted usingapproximateRowCountFormat
"maximum"
: The row count will be formatted usingmaximumRowCountFormat
"range"
: The row count range will be formatted usingrangeRowCountFormat
"unknown"
: TheunknownRowCountDisplayValue
will be displayed"loading"
: TheloadingRowCountDisplayIcon
will be displayed
getRowRangeDisplayValue()
.- Returns:
- the formatted rowCount display value
- See Also:
-
getFormattedRowRange
Uses therowRangeFormat
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
For grids with frozen columns, this method is called to retrieve thefrozenRollOverCanvas
when the user moves over a new row or cell ifshowRollOverCanvas
is true, or when the user moves over the selected record ifshowSelectedRollOverCanvas
is true.The default implementation uses the
com.smartgwt.client.types.AutoChild
subystem to create thefrozenRollOverCanvas
based on therollOverCanvas
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 unlessuseCellRollOvers
is true for the grid.- Returns:
- the embedded component
-
getFrozenRollUnderCanvas
For grids with frozen columns, this method is called to retrieve thefrozenRollUnderCanvas
whenshowing a rollUnder canvas
or showing arollUnder canvas for the selected record
.The default implementation uses the
com.smartgwt.client.types.AutoChild
subystem to create therollUnderCanvas
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 unlessuseCellRollOvers
is true for the grid.- Returns:
- the embedded component
-
getGridSummary
WhenshowGridSummary
istrue
this method is called for each field which will show a grid summary value (as described inListGridField.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 thestandard summary function
for the field to calculate the summary based on the current data set
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 nextdata change
, unless you callrecalculateGridSummary()
.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
This method returns the data displayed in thesummaryRow
whenshowGridSummary
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
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
If this grid isgrouped
, andshowGroupSummary
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 calculatedgroupNode
- 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 isgrouped
, andshowGroupSummary
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 calculatedgroupNode
- object with specified groupValue and groupName for this grouprecalculate
- if set to false and the node has existing summary data, returns the stored summary data, rather than recalculating- Returns:
- summary record(s)
-
getGroupTreeSelection
If this gridis grouped
, this method will return the current selection. Unlike the standardgetSelection method
, this method will returngroup nodes
in addition to standardListGridRecord
s 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
- See Also:
-
getGroupTreeSelection
public ListGridRecord[] getGroupTreeSelection(boolean excludePartialSelection, boolean groupNodesOnly) If this gridis grouped
, this method will return the current selection. Unlike the standardgetSelection method
, this method will returngroup nodes
in addition to standardListGridRecord
s 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 astrue
, 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
IfshowHeaderContextMenu
istrue
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 thefields
array. Note: if the user right-clicked the sorter button this parameter will benull
.- Returns:
- See Also:
-
getHeaderSpanContextMenuItems
Return the menus items that should be shown in a menu triggered from aheaderSpan
. The default implementation returns the parent element's context menu, unlessshowHeaderSpanContextMenu
istrue
, in which case it returns standard items for showing / hiding fields and freezing / unfreezing header spans. Note that no column picker will be shown unlessshowTreeColumnPicker
istrue
.- Parameters:
headerSpan
- the component representing the headerSpan. This component will have all the properties specified viaheaderSpans
.- Returns:
- return false instead to avoid showing any menu
-
getRecord
Return the pointer to a particular record by record number. Synonym forgetCellRecord()
.- Parameters:
recordNum
- row index of record to return.- Returns:
- Record object for the row.
- See Also:
-
com.smartgwt.client.widgets.grid.ListGrid#getCellRecord
getEditedRecord(int)
-
getRecordComponent
Retrieve therecordComponent
currently being shown at the given coordinates.recordComponents
are dynamically assigned to row/cell coordinates and, depending on therecordComponentPoolingMode
, any kind of redraw of the containing ListGrid (due to sort change, scrolling, editing etc) may cause arecordComponent
to be assigned to another row,clear()ed
or permanentlydestroy()ed
.Hence you should always call
getRecordComponent()
right before taking action on therecordComponent
- don't cache the component associated with row/cell coordinate. Similarly, it's invalid to callgetRecordComponent()
during a redraw (for example, fromformatting
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
Retrieve therecordComponent
currently being shown at the given coordinates.recordComponents
are dynamically assigned to row/cell coordinates and, depending on therecordComponentPoolingMode
, any kind of redraw of the containing ListGrid (due to sort change, scrolling, editing etc) may cause arecordComponent
to be assigned to another row,clear()ed
or permanentlydestroy()ed
.Hence you should always call
getRecordComponent()
right before taking action on therecordComponent
- don't cache the component associated with row/cell coordinate. Similarly, it's invalid to callgetRecordComponent()
during a redraw (for example, fromformatting
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 forcolNum
- optional column number to get the record component for- Returns:
- record component, or null if none is shown at these coordintes
- See Also:
-
getRecordDropPosition
Returns theRecordDropPosition
for some record drop operation. This value is passed to therecordDrop()
event notification method.Default implementation determines the position to return based on the specified
recordDropAppearance
for the grid and they-coordinate of the drop event
.- Returns:
- record drop position.
-
getRecordIndex
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
Returns theDataSource
containing data related to the passed record. Used whencanExpandRecords
is true andExpansionMode
is "related". The default implementation returns the DataSource specified inListGridRecord.detailDS
if set, otherwisedetailDS
.- Parameters:
record
- The record to get the Related dataSource for.- Returns:
- The related DataSource for the "record" param
-
getRollOverCanvas
This method is called to retrieve therollOverCanvas
when the user moves over a new row or cell ifshowRollOverCanvas
is true, or when the user moves over the selected record ifshowSelectedRollOverCanvas
is true.The default implementation uses the
com.smartgwt.client.types.AutoChild
subystem to create therollOverCanvas
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 unlessuseCellRollOvers
is true for the grid.- Returns:
- the embedded component
-
getRollUnderCanvas
This method is called to retrieve therollUnderCanvas
when the user moves over a new row or cell ifshowing a rollUnder canvas
or showing arollUnder canvas for the selected record
.The default implementation uses the
com.smartgwt.client.types.AutoChild
subystem to create therollUnderCanvas
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 unlessuseCellRollOvers
is true for the grid.- Returns:
- the embedded component
-
getRowCount
Retrieves therow count
for the grid, which may differ from the reporteddata length
ifprogressive loading
is enabled.See also
getRowCountStatus()
- Returns:
- current row count for the grid
- See Also:
-
getRowCountRange
Retrieves therow count range
for listGrids whereprogressive loading
is active and the row count has been specified as arange
.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
This method indicates whethergetRowCount()
reflects an accurate row-count for this listGrid. An accurate row count may not currently be available ifprogressiveLoading
is active.See
RowCountStatus
for further details.- Returns:
- Current row-count status for this grid
- See Also:
-
getRowErrors
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
Return the height this row should be. Default is this.cellHeight. IffixedRecordHeights
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 getCellRecordrowNum
- row number- Returns:
- height in pixels
-
getRowNum
Synonym ofgetRecordIndex()
.- 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. SeegetRowTop()
.- Parameters:
rowNum
-- Returns:
- Y-coordinate
- See Also:
-
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. UsegetRowPageTop()
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
Returns theview state
for this ListGrid as last saved by theautoPersistViewState
setting.- Returns:
- last auto-saved view state for the grid.
See
ListGridViewState
- See Also:
-
getSelectedRecord
Returns the first selected record in this grid.This method is appropriate if the
selectionType
isSelectionStyle.SINGLE
, or if you only care about the first selected record in a multiple-record selection. To access all selected records, usegetSelection()
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
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
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
Returns the currentSortSpecifiers
for this ListGrid. Will return null if this grid has never been sorted (and has no specifiedinitialSort
orsortField
).Note that if sorting was applied via
sort()
[rather thansetSort()
] the sortSpecifiers returned will have been created based on the specified sort field / direction passed intosort()
.- Specified by:
getSort
in interfaceDataBoundComponent
- 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
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 setshowSortNumerals
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 thesortNumeral
HTML for.sortIndex
- The sort index for the field.- Returns:
- The HTML for this field's sortNumeral.
See
HTMLString
-
getSortSpecifier
Returns theSortSpecifier
for the passed fieldName, or null if the field is not sorted. -
getSummaryFieldValue
Get the computed value of asummary field
.- Parameters:
field
- field that has a summary formatrecord
- record to use to compute formula value- Returns:
- formula result
-
getToggleFreezeText
If we're showing aheaderContextMenu
for this grid andthis.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
orunfreezeFieldText
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
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
Returns the cursor to display when the mouse pointer is over avalueIcon
in a a cell.Default behavior will display the
ListGridField.iconCursor
if specified, otherwise the"pointer"
cursor if aListGridField.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 valueIconrecord
- record being rolled overvalue
- 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
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 theListGrid.data
object has been updated. On successful grouping thefields
argument will list the new grouping and theListGrid.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 exceedingListGrid.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 callbackListGrid.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 callingListGrid.groupBy()
before the initial fetch, and instead do it in the thefetch callback
.- Specified by:
addGroupByCompleteHandler
in interfaceHasGroupByCompleteHandlers
- Parameters:
handler
- the groupByComplete handler- Returns:
HandlerRegistration
used to remove this handler
-
groupSortNormalizer
WhensortByGroupFirst
is active, the sortingnormalizer
applied for implicit sorting by the field(s) used for grouping.No default implementation.
- Parameters:
record
- record to normalizefieldName
- name of the field on which sorting occurred. SeeFieldName
context
- the grid is passed to allow property and method access- Returns:
- normalized value for sorting
- See Also:
-
addGroupStateChangedHandler
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 interfaceHasGroupStateChangedHandlers
- Parameters:
handler
- the groupStateChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
addGroupTreeChangedHandler
Add a groupTreeChanged handler.Callback fired when a
grouping
operation completes, whether it started as a direct call toListGrid.groupBy()
orListGrid.regroup()
or data changing, including incremental changes.If
changeType
is "groupBy",ListGrid.groupBy()
should have been called at the beginning of the operation, andListGrid.groupByComplete()
will be called immediately before this method. IfchangeType
is "regroup", thenListGrid.regroup()
should have been called at the beginning of the operation.- Specified by:
addGroupTreeChangedHandler
in interfaceHasGroupTreeChangedHandlers
- Parameters:
handler
- the groupTreeChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
addGroupByHandler
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 alsoListGrid.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 callbackListGrid.regroup()
.- Specified by:
addGroupByHandler
in interfaceHasGroupByHandlers
- Parameters:
handler
- the groupBy handler- Returns:
HandlerRegistration
used to remove this handler
-
addRegroupHandler
Add a regroup handler.Callback fired when a regroup operation is begun, either from a direct call to
ListGrid.regroup()
, or because ofdata arriving from the server
when the grid is alreadygrouped
.After this call, the Framework should eventually call
ListGrid.groupTreeChanged()
.- Specified by:
addRegroupHandler
in interfaceHasRegroupHandlers
- Parameters:
handler
- the regroup handler- Returns:
HandlerRegistration
used to remove this handler
-
hasChanges
Whether the grid as a whole has any unsaved edits, in any row. Note that this method will return true if any rows aremarked 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
Whether the grid as a whole has any unsaved edits, in any row. Note that this method will return true if any rows aremarked 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
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
Add a headerDoubleClick handler.Handle a double click in the list header.
By default, calls
ListGrid.autoFitField()
ifListGrid.canAutoFitFields
is true andListGrid.headerAutoFitEvent
is"doubleClick"
.- Specified by:
addHeaderDoubleClickHandler
in interfaceHasHeaderDoubleClickHandlers
- Parameters:
handler
- the headerDoubleClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addHeaderHoverHandler
Add a headerHover handler.Handle a hover over a button in the header.
- Specified by:
addHeaderHoverHandler
in interfaceHasHeaderHoverHandlers
- Parameters:
handler
- the headerHover handler- Returns:
HandlerRegistration
used to remove this handler
-
headerHoverHTML
Returns the HTML that is displayed by the defaultheaderHover
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 hovereddefaultHTML
- the HTML that would have been displayed by default. SeeHTMLString
- 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 thedrag handle field
, if currently shown.- See Also:
-
hideField
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 ensurerecalculateSummaries()
is only run once.- Parameters:
field
- field to hide- See Also:
-
hideField
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 ensurerecalculateSummaries()
is only run once.- Parameters:
field
- field to hidesuppressRelayout
- if passed, don't relayout non-explicit sized fields to fit the available space- See Also:
-
hideFields
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
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
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 hidesuppressRelayout
- if passed, don't relayout non-explicit sized fields to fit the available space
-
addHilitesChangedHandler
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 viagetHilites()
.- Specified by:
addHilitesChangedHandler
in interfaceHasHilitesChangedHandlers
- Parameters:
handler
- the hilitesChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
invalidateRecordComponents
public void invalidateRecordComponents()Invalidates the currently visible set ofrecordComponents
and gets fresh ones for the visible rows in the grid according to therecordComponentPoolingMode
See also
refreshRecordComponent()
which allows you to refresh a specific recordComponent -
isCheckboxField
Identifies whether the passed-in field is the specially generatedcheckboxField
used whenSelectionAppearance
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
Whether a givenrecord
is expanded or collapsed.- Parameters:
record
- record in question- Returns:
- true if the node is expanded
-
isExpansionField
Identifies whether the passed-in field is the specially generatedexpansionField
used whencanExpandRecords
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 currentlyexporting 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
If this listGrid isgrouped
, 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
When using tree-oriented selection modes likeTreeGrid.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
Identifies whether the passed-in field is the specially generatedrowNumberField
used whenshowRowNumbers
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
Returns true if the record is selected.- Parameters:
record
- record to check- Returns:
- true if record is selected; false otherwise
- See Also:
-
isSortField
Returnstrue
if the passed fieldName is in the current sort-specification. -
isSummaryRecord
Returns whether the supplied record is a group or grid summary record. Useful in conjunction withgetGroupMembers()
for determining which records are group summary records.- Parameters:
record
- Record object such as fromgetGroupMembers()
- Returns:
- whether record is summary
-
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
- See Also:
-
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.
- Parameters:
maxRecords
- optional maximum record count - if passed, no fetch takes place if maxRecords is below the known length of the datacallback
- 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 usemarkForRedraw()
instead of callingCanvas.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 classCanvas
- See Also:
-
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 usemarkForRedraw()
instead of callingCanvas.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 classCanvas
- Parameters:
reason
- reason for performing the redraw- See Also:
-
markRecordRemoved
public void markRecordRemoved(int rowNum) Marks a record deleted such that a later call tosaveEdits()
orsaveAllEdits()
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
Marks an array of records deleted such that a later call tosaveEdits()
orsaveAllEdits()
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 tosaveEdits()
orsaveAllEdits()
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
Marks an array of records deleted such that a later call tosaveEdits()
orsaveAllEdits()
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 thoughmarkRecordRemoved()
had been called.- See Also:
-
addBodyKeyPressHandler
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 interfaceHasBodyKeyPressHandlers
- Parameters:
handler
- the bodyKeyPress handler- Returns:
HandlerRegistration
used to remove this handler
-
addRecordCollapseHandler
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 interfaceHasRecordCollapseHandlers
- Parameters:
handler
- the recordCollapse handler- Returns:
HandlerRegistration
used to remove this handler
-
addRecordExpandHandler
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 interfaceHasRecordExpandHandlers
- Parameters:
handler
- the recordExpand handler- Returns:
HandlerRegistration
used to remove this handler
-
addHeaderClickHandler
Add a headerClick handler.Handler fired when the user clicks a header in this listGrid before any other processing occurs. Call
HeaderClickEvent.cancel()
from withinHeaderClickHandler.onHeaderClick(com.smartgwt.client.widgets.grid.events.HeaderClickEvent)
to suppress the default header click handling- Specified by:
addHeaderClickHandler
in interfaceHasHeaderClickHandlers
- Parameters:
handler
- the headerClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addRecordClickHandler
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 interfaceHasRecordClickHandlers
- Parameters:
handler
- the recordClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addRecordDropHandler
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 thedragDataAction
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, andaddDropValues
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 withinRecordDropHandler.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 theindex
will be one higher than the last record. This includes a drop into an empty ListGrid, whereindex
will be 0.- Specified by:
addRecordDropHandler
in interfaceHasRecordDropHandlers
- Parameters:
handler
- the recordDrop handler- Returns:
HandlerRegistration
used to remove this handler
-
addRemoveRecordClickHandler
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'redeferring 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 interfaceHasRemoveRecordClickHandlers
- Parameters:
handler
- the removeRecordClick handler- Returns:
HandlerRegistration
used to remove this handler
-
openGroup
Opens the node represented by the "record" parameter, if it is a folder and is not already open. This method only applies togrouped
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 thegrid summary
, by either re-calculating from already-loaded data or doing a new fetch from thesummaryRowDataSource
.Note unlike
recalculateSummaries()
, this method will not force a refresh of field-level summaries (seeListGridField.recordSummaryFunction
) or group level summaries (seeshowGroupSummary
). -
recalculateSummaries
public void recalculateSummaries()Recalculates values for fields withsummary-functions
oruser formulae
defined and for values displayed in thegrid summary
andgroup summary rows
. -
recalculateSummaries
- See Also:
-
recalculateSummaries
Recalculates values for fields withsummary-functions
oruser formulae
defined and for values displayed in thegrid summary
andgroup summary rows
.- Parameters:
records
- Optional array of records to recalculate summaries for, or null for all recordsfields
- Optional array of fields to recalculate summaries for, or null for all fieldsNote that the records should be from
data
; thus, if the grid is grouped, the records should be from the grouped data rather thanoriginalData
.
-
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 eventrecord
- the record that was clicked onrecordNum
- 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 arrayvalue
- 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 (seelistGrid.getEditedRecord()
).- Returns:
- return false to cancel default behavior
- See Also:
-
addRecordDoubleClickHandler
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 interfaceHasRecordDoubleClickHandlers
- Parameters:
handler
- the recordDoubleClick handler- Returns:
HandlerRegistration
used to remove this handler
-
recordMarkedAsRemoved
Returns true if the specified record is marked as removed via a call tomarkRecordRemoved()
- 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 thegrid 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 refreshcolNum
- 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 refreshcolNum
- column number of cell to refresh- See Also:
-
refreshData
public void refreshData()UnlikeinvalidateCache
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 aDataSource
associated with it to use this method.If
refreshData()
is called while the grid is waiting for a response fromfetchData()
therefreshData()
call will be aborted. This is because the fetch has higher priority.If
fetchData()
is called while the grid is waiting for a response fromrefreshData()
and thefetchData()
call has altered the criteria or sort specifiers, therefreshData()
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 callingrefreshData()
you first need to calldiscardAllEdits()
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 forpaged
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 afterrefreshData()
, 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 onrefreshData()
should use the callback to do so. -
refreshData
UnlikeinvalidateCache
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 aDataSource
associated with it to use this method.If
refreshData()
is called while the grid is waiting for a response fromfetchData()
therefreshData()
call will be aborted. This is because the fetch has higher priority.If
fetchData()
is called while the grid is waiting for a response fromrefreshData()
and thefetchData()
call has altered the criteria or sort specifiers, therefreshData()
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 callingrefreshData()
you first need to calldiscardAllEdits()
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 forpaged
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 afterrefreshData()
, 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 onrefreshData()
should use the callback to do so.- Parameters:
callback
- callback method to run once the refresh completes.- See Also:
-
refreshFields
public void refreshFields()Re-evaluatesListGridField.showIf()
for each field, dynamically showing and hiding the appropriate set of fields -
refreshRecordComponent
public void refreshRecordComponent(int rowNum) Discards anyrecordComponent
currently assigned to the specified record (or cell) and gets a fresh one, according to therecordComponentPoolingMode
See also
invalidateRecordComponents()
which allows you to refresh all record components that are currently visible in the grid.- Parameters:
rowNum
- Row to refresh
-
refreshRecordComponent
Discards anyrecordComponent
currently assigned to the specified record (or cell) and gets a fresh one, according to therecordComponentPoolingMode
See also
invalidateRecordComponents()
which allows you to refresh all record components that are currently visible in the grid.- Parameters:
rowNum
- Row to refreshcolNum
- Column to refresh. This parameter should be passed ifshowRecordComponentsByCell
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
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
-
removeData
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 thedsResponse
parameter will be null.requestProperties
- additional properties to set on any DSRequest that will be issued- See Also:
-
removeEmbeddedComponent
Removes an embedded component previously associated with the provided record. If a Canvas is passed as therecord
parameter, it is assumed to be a component and the record is detected automatically from it. IfdestroyOnUnEmbed
istrue
for the component, it will also be destroyed.- Parameters:
record
- record that the component was previously attached to or the component itself
-
removeEmbeddedComponent
Removes an embedded component previously associated with the provided record. If a Canvas is passed as therecord
parameter, it is assumed to be a component and the record is detected automatically from it. IfdestroyOnUnEmbed
istrue
for the component, it will also be destroyed.- Parameters:
record
- record that the component was previously attached to or the component itselfcomponent
- 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 ifcanRemoveRecords
is true. Default behavior will remove the record from the data set, or if we'redeferring 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
- See Also:
-
removeSelectedData
- 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 removedrequestProperties
- additional properties to set on the DSRequest that will be issuedqueueCallback
- 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 reordermoveToPosition
- 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, inclusiveend
- End of the range of fields to move, non-inclusivemoveDelta
- 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 setListGridField.autoFitWidth
to false if it was previously true.- Parameters:
fieldNum
- Number of the field to resizenewWidth
- New width of the field
-
resort
public void resort()If a list has become unsorted due to data modification or a call tounsort()
, this method will resort the list by the previoussort-specifier
array, if there is one, or by the previous sort-field and -direction. -
rowClick
Event handler for when rows in the body are clicked upon. The default implementation handles firingstartEditing()
if appropriate, and firesListGridField.recordClick()
and/orrecordClick()
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 returningfalse
).- Parameters:
record
- record object returned from getCellRecord()recordNum
- index of the row where the click occurredfieldNum
- index of the col where the click occurred- See Also:
-
rowClick
Event handler for when rows in the body are clicked upon. The default implementation handles firingstartEditing()
if appropriate, and firesListGridField.recordClick()
and/orrecordClick()
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 returningfalse
).- Parameters:
record
- record object returned from getCellRecord()recordNum
- index of the row where the click occurredfieldNum
- index of the col where the click occurredkeyboardGenerated
- indicates whether this was a synthesized record click in response to a keyboard event- See Also:
-
addRowContextClickHandler
Add a rowContextClick handler.Called when a row receives a contextclick event.
- Specified by:
addRowContextClickHandler
in interfaceHasRowContextClickHandlers
- Parameters:
handler
- the rowContextClick handler- Returns:
HandlerRegistration
used to remove this handler
-
rowDoubleClick
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 occurredfieldNum
- 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 occurredfieldNum
- index of the col where the click occurredkeyboardGenerated
- indicates whether this was a synthesized record doubleclick in response to a keyboard event- See Also:
-
addRowEditorEnterHandler
Add a rowEditorEnter handler.Callback fired when the user starts editing a new row.
- Specified by:
addRowEditorEnterHandler
in interfaceHasRowEditorEnterHandlers
- Parameters:
handler
- the rowEditorEnter handler- Returns:
HandlerRegistration
used to remove this handler
-
addRowEditorExitHandler
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 withinRowEditorExitHandler.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 interfaceHasRowEditorExitHandlers
- Parameters:
handler
- the rowEditorExit handler- Returns:
HandlerRegistration
used to remove this handler
-
rowHasChanges
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 userecordMarkedAsRemoved()
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
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 userecordMarkedAsRemoved()
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 changesignorePendingValues
- 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
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
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 interfaceHasRowHoverHandlers
- Parameters:
handler
- the rowHover handler- Returns:
HandlerRegistration
used to remove this handler
-
addRowMouseDownHandler
Add a rowMouseDown handler.Called when a row receives a mousedown event.
- Specified by:
addRowMouseDownHandler
in interfaceHasRowMouseDownHandlers
- Parameters:
handler
- the rowMouseDown handler- Returns:
HandlerRegistration
used to remove this handler
-
addRowMouseUpHandler
Add a rowMouseUp handler.Called when a row receives a mouseup event.
- Specified by:
addRowMouseUpHandler
in interfaceHasRowMouseUpHandlers
- Parameters:
handler
- the rowMouseUp handler- Returns:
HandlerRegistration
used to remove this handler
-
addRowOutHandler
Add a rowOut handler.Called when the mouse pointer leaves a row
- Specified by:
addRowOutHandler
in interfaceHasRowOutHandlers
- Parameters:
handler
- the rowOut handler- Returns:
HandlerRegistration
used to remove this handler
-
addRowOverHandler
Add a rowOver handler.Called when the mouse pointer enters a row
- Specified by:
addRowOverHandler
in interfaceHasRowOverHandlers
- 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
Other, standard callbacks such as
ListGrid.editComplete()
,ListGrid.editFailed()
andListGrid.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
- See Also:
-
saveEdits
- See Also:
-
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
Other, standard callbacks such as
ListGrid.editComplete()
,ListGrid.editFailed()
andListGrid.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 thecallback
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.. SeeCallback
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 alsoResultSet
.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()
orscrollToCell
fromListGrid.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 viewcolNum
- Column index of the cell to scroll into view- See Also:
-
scrollToCell
- See Also:
-
scrollToCell
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 alsoResultSet
.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()
orscrollToCell
fromListGrid.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 viewcolNum
- Column index of the cell to scroll into viewxPosition
- 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
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 viewxPosition
- 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
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 viewyPosition
- Vertical position of scrolled row (optional)- See Also:
-
addSelectionChangedHandler
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 togetSelection()
from within this event may not return a valid set of selected records if the event has been triggered by a call toselectAllRecords()
ordeselectAllRecords()
- in this case use theselectionUpdated()
event instead.- Specified by:
addSelectionChangedHandler
in interfaceHasSelectionChangedHandlers
- Parameters:
handler
- the selectionChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
addSelectionUpdatedHandler
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 interfaceHasSelectionUpdatedHandlers
- 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 rangeendRow
- 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 rangeendRow
- end of selection range (non-inclusive)newState
- new selection state (if null, defaults to true)- See Also:
-
setAutoFitWidth
Setter forListGridField.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, useresizeField()
.- Parameters:
fieldName
- field to auto-fitautoFit
- Should autoFitWidth be enabled or disabled?
-
setDontAutoDestroyComponent
IfshowRecordComponents
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 ofcreateRecordComponent()
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
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 editedvalues
- New values for the row
-
setFieldButtonProperties
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 updateproperties
- new properties to apply to the header button
-
setFieldCellIcon
Change theListGridField.cellIcon
for a field after the grid is created- Parameters:
fieldName
- field to updatecellIcon
- new cellIcon for the field. SeeSCImgURL
-
setFieldError
Set a validation error for some cell.- Parameters:
rowNum
- row index of cell to add validation error forfieldName
- col index or field name of cell to add validation error forerrorMessage
- validation error/errors for the cell.- See Also:
-
setFieldHeaderBaseStyle
Update theListGridField.headerBaseStyle
for a field within the grid at runtime.- Parameters:
name
- name of the field.newStyle
- new baseStyle for the field header. SeeCSSStyleName
-
setFieldHeaderTitleStyle
Update theListGridField.headerTitleStyle
for a field within the grid at runtime.- Parameters:
name
- name of the field.newStyle
- new titleTyle for the field header. SeeCSSStyleName
-
setFieldIcon
Change theListGridField.icon
for a field after the grid is created- Parameters:
fieldName
- field to updateicon
- icon for the field. SeeSCImgURL
-
setFieldMaxWidth
public void setFieldMaxWidth(int fieldNum, int width) UpdatesListGridField.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) UpdatesListGridField.minWidth
for the specified field and redraws the associated column if required.- Parameters:
fieldNum
- name of the field, or index.width
-- See Also:
-
setFieldProperties
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-inListGridField
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
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-inListGridField
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
Applies a newsearch operator
to a field in the grid'sfilter 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
orfilterOnKeypress
are set.In general, if the field has a current filter-value, it will be cleared if
- the new operator does not require a value (operator-type
none
-isBlank
, for example) - the current and new operators have different
value-types
andallowFilterExpressions
is false - the
item has an
optionDataSource
or valueMap which no longer includes the current value
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, ifalwaysShowOperatorIcon
is false, the operatorIcon is hidden. SeeclearFieldSearchOperator()
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 tooperator
- id of the search operator to apply
- the new operator does not require a value (operator-type
-
setFieldTitle
Change the title of a field after the grid is created.- Parameters:
fieldNum
- name of the field, or index.title
- new title
-
setFieldTitle
Change the title of a field after the grid is created.- Parameters:
fieldNum
- name of the field, or index.title
- new title
-
setFilterEditorCriteria
IfshowFilterEditor
is true, this method will update the criteria shown in thefilterEditor
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
Update theHeaderSpan.headerBaseStyle
for a span within the grid at runtime.- Parameters:
name
- name of the headerSpan, as specified viaHeaderSpan.name
.newStyle
- new baseStyle for the headerSpan. SeeCSSStyleName
-
setHeaderSpanButtonProperties
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 updateproperties
- new properties to apply to the header button
-
setHeaderSpanHeaderTitle
Update the headerTitle of aheaderSpan
dynamically.- Parameters:
name
- name of the headerSpan, as specified viaHeaderSpan.name
.newTitle
- new headerTitle for the headerSpan
-
setHeaderSpanTitle
Update the title of aheaderSpan
dynamically.- Parameters:
name
- name of the headerSpan, as specified viaHeaderSpan.name
.newTitle
- new title for the headerSpan
-
setHeaderSpanTitleStyle
Update theHeaderSpan.headerTitleStyle
for a span within the grid at runtime.- Parameters:
name
- name of the headerSpan, as specified viaHeaderSpan.name
.newTitle
- new titleStyle for the headerSpan. SeeCSSStyleName
-
setHideOnPhone
Updates theListGridField.hideOnPhone
attribute at runtime.- Parameters:
field
- field or field name to updatehideOnPhone
- new setting for hideOnPhone property
-
setHideOnTablet
Updates theListGridField.hideOnTablet
attribute at runtime.- Parameters:
field
- field or field name to updatehideOnTablet
- new setting for hideOnTablet property
-
setRowErrors
Set the validation errors for some row (replacing any pre-existent validation errors)Note that in the case of a
grouped listGrid
, or aTreeGrid
, 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 forerrors
- validation errors for the row in the format{fieldName:errorMessage, ...}
or
{fieldName:[errorMessage1, errorMessage2], ...}
- See Also:
-
addSetSortHandler
Add a setSort handler.Optional notification fired when either user or framework code calls
setSort()
. This notification fires before the default behavior; useevent.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 ofsortSpecifier
s passed to it:- Change the grid UI (show directional arrows, numerals to indicate sort priority, etc)
- Actually sort the grid data
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 interfaceHasSetSortHandlers
- Parameters:
handler
- the setSort handler- Returns:
HandlerRegistration
used to remove this handler
-
setUserAIFilterRequest
If filter-via-AI is enabled (seefilterViaAIMode
), this utility method first callsAI.buildCriterion()
to buildAdvancedCriteria
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) -
setUserAIFilterRequest
public void setUserAIFilterRequest(UserAIRequest userAIFilterRequest, BuildCriterionRequest buildRequestProperties, BuildCriterionResponseCallback callback) If filter-via-AI is enabled (seefilterViaAIMode
), this utility method first callsAI.buildCriterion()
to buildAdvancedCriteria
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 thatuserAIRequest
will be overridden byuserAIFilterRequest
,dataSource
will be overridden by this grid'sDataSource
, andmode
will be overridden byfilterViaAIMode
.callback
- optional callback to fire.
-
setUserCriteriaState
Reset this grid's user-criteria to match theListGridUserCriteriaState
object passed in.Used to restore previous state retrieved from the grid by a call to
getUserCriteriaState()
.- Parameters:
userCriteriaState
- Object describing the desired criteria. SeeListGridUserCriteriaState
- See Also:
-
setUserFormula
Updates theuserFormula
of the specified field. This method is preferred over setting the the 'userFormula' property of the field directly because it also updates any component dependencies and recalculates the field. If the formula is not passed, it is assumed that the formula has already been updated and only the dependency propagation logic will run.Known component dependencies are:
- the cached record values of the formula for this field
- the common formula variable => field name map maintained by the component for calls to the FormulaBuilder
- any generated field that references the field's calculated values
- Parameters:
field
- field owning the formula- See Also:
-
setUserFormula
Updates theuserFormula
of the specified field. This method is preferred over setting the the 'userFormula' property of the field directly because it also updates any component dependencies and recalculates the field. If the formula is not passed, it is assumed that the formula has already been updated and only the dependency propagation logic will run.Known component dependencies are:
- the cached record values of the formula for this field
- the common formula variable => field name map maintained by the component for calls to the FormulaBuilder
- any generated field that references the field's calculated values
- Parameters:
field
- field owning the formula- See Also:
-
setUserFormula
Updates theuserFormula
of the specified field. This method is preferred over setting the the 'userFormula' property of the field directly because it also updates any component dependencies and recalculates the field. If the formula is not passed, it is assumed that the formula has already been updated and only the dependency propagation logic will run.Known component dependencies are:
- the cached record values of the formula for this field
- the common formula variable => field name map maintained by the component for calls to the FormulaBuilder
- any generated field that references the field's calculated values
- Parameters:
field
- field owning the formulauserFormula
- optional formula to install- See Also:
-
setUserFormulaText
Updates theUserFormula.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
Updates theUserFormula.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
Updates theUserFormula.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 formulatext
- optional formula text to install- See Also:
-
setUserSummary
Updates theuserSummary
of the specified field. This method is preferred over setting the 'userSummary' property of the field directly because it also updates any component dependencies and recomputes the field. If the summary is not passed, it is assumed that the summary has already been updated and only the dependency propagation logic will run.Known component dependencies are:
- the cached record values of the summary for this field
- any generated field that references the field's computed summaries
- Parameters:
field
- field owning the summary- See Also:
-
setUserSummary
Updates theuserSummary
of the specified field. This method is preferred over setting the 'userSummary' property of the field directly because it also updates any component dependencies and recomputes the field. If the summary is not passed, it is assumed that the summary has already been updated and only the dependency propagation logic will run.Known component dependencies are:
- the cached record values of the summary for this field
- any generated field that references the field's computed summaries
- Parameters:
field
- field owning the summary- See Also:
-
setUserSummary
Updates theuserSummary
of the specified field. This method is preferred over setting the 'userSummary' property of the field directly because it also updates any component dependencies and recomputes the field. If the summary is not passed, it is assumed that the summary has already been updated and only the dependency propagation logic will run.Known component dependencies are:
- the cached record values of the summary for this field
- any generated field that references the field's computed summaries
- Parameters:
field
- field owning the summaryuserSummary
- optional summary to install- See Also:
-
setUserSummaryText
Updates theUserSummary.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
Updates theUserSummary.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
Updates theUserSummary.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 summarytext
- optional summary text to install- See Also:
-
shouldIncludeHiliteInSummaryField
When assembling a value for asummary 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 fieldusedFieldName
- 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 theaiFilterWindow
, which allows the user to ask the AI to filter data by describing which records should be included. -
showAIHiliteWindow
public void showAIHiliteWindow()Shows theaiFilterWindow
, 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 anyrow number
field) that can be dragged to drag the current selection. This feature is useful intouch 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 supportsDual Input Mode
such as Microsoft Surface.Note that the
drag handle field
will never be shown unlesscanReorderRecords
orcanDragRecordsOut
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:
-
showField
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
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 showsuppressRelayout
- If passed, don't resize non-explicitly sized columns to fill the available space.- See Also:
-
showFields
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
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
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 forfilterWindowCriteria
allowing end-users to edit the advanced filter. This method can be called directly but it is also used to show the dialog whenallowFilterWindow
is enabled and the user chooses the"Advanced Filtering"
menu option.Note: this feature requires Smart GWT Pro or better.
-
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, orsortDirection
.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 beunsorted
. SeeEditing
for further details.- Returns:
- sorting worked
- See Also:
-
sort
- See Also:
-
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, orsortDirection
.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 beunsorted
. SeeEditing
for further details.- Parameters:
sortField
- the field name or column number to sort bysortDirection
- the direction to sort in- Returns:
- sorting worked
- See Also:
-
addSortChangedHandler
Add a sortChanged handler.Notification method executed when the
sort specifiers
change for this grid.- Specified by:
addSortChangedHandler
in interfaceHasSortChangedHandlers
- Parameters:
handler
- the sortChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
addSorterClickHandler
Add a sorterClick handler.Notification method fired when the user clicks on the corner
sort button
. CallSorterClickEvent.cancel()
from withinSorterClickHandler.onSorterClick(com.smartgwt.client.widgets.grid.events.SorterClickEvent)
to suppress the sort.- Specified by:
addSorterClickHandler
in interfaceHasSorterClickHandlers
- Parameters:
handler
- the sorterClick handler- Returns:
HandlerRegistration
used to remove this handler
-
addSorterContextClickHandler
Add a sorterContextClick handler.Notification method fired when the user right-clicks on the corner
sort button
. CallSorterContextClickEvent.cancel()
from withinSorterContextClickHandler.onSorterContextClick(com.smartgwt.client.widgets.grid.events.SorterContextClickEvent)
to suppress the default behavior of showing the sorter's context menu.- Specified by:
addSorterContextClickHandler
in interfaceHasSorterContextClickHandlers
- Parameters:
handler
- the sorterContextClick handler- Returns:
HandlerRegistration
used to remove this handler
-
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 optionalsuppressFocus
parameter.- Returns:
- true if we are editing the cell, false if not editing for some reason
- See Also:
-
startEditing
- See Also:
-
startEditing
- See Also:
-
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 optionalsuppressFocus
parameter.- Parameters:
rowNum
- Row number of the cell to edit. Defaults to first editable rowcolNum
- Column number of the cell to edit. Defaults to first editable columnsuppressFocus
- 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 theEditing 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 alsoListGridField.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 whenlistEndEditAction
is "next".If editing is already underway elsewhere in the grid, startEditingNew() behaves just like
startEditing()
.- See Also:
-
startEditingNew
- See Also:
-
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 theEditing 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 alsoListGridField.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 whenlistEndEditAction
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 recordsuppressFocus
- 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
Notification fired when a user either creates a new summary field or edits an existing summary field.- Parameters:
field
- the summary fieldsummary
- the new or updated summary definition
-
toggleSort
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
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
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
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
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 tomarkRecordRemoved()
.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 callsunsort()
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. SeeEditing
for further details on editing records in a sorted ListGrid. -
updateData
Perform a DataSource "update" operation to update existing records in this component's DataSource.- Parameters:
updatedRecord
- updated record- See Also:
-
updateData
-
updateData
Perform a DataSource "update" operation to update existing records in this component's DataSource.- Parameters:
updatedRecord
- updated recordcallback
- method to call on operation completionrequestProperties
- 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) WhenshowRecordComponents
is true, this method is called to update components created bycreateRecordComponent()
when they are to be applied to a different record in the grid. See therecord components overview
for more information on recordComponents.The colNum parameter is applicable only when
showRecordComponentsByCell
is true. Note that ifpoolComponentsPerColumn
is set to false, the component may have been generated by acreateRecordComponent()
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 appliescolNum
- cell to which the passed component appliescomponent
- the component to updaterecordChanged
- 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. UnlikeselectAllRecords()
, if a record isunselectable
, this method will not attempt to select it. -
validateCell
Validate the current edit value for the cell in question. Called when the user moves to a new edit cell ifvalidateByCell
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
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
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 interfaceHasViewStateChangedHandlers
- Parameters:
handler
- the viewStateChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
willFetchData
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 useautoFetchTextMatchStyle
, 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 theSmart GWT Developer Console
and check the relevantDSRequest
.- Parameters:
newCriteria
- new criteria to test.- Returns:
- true if server fetch would be required to satisfy new criteria.
- See Also:
-
willFetchData
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 useautoFetchTextMatchStyle
, 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 theSmart GWT Developer Console
and check the relevantDSRequest
.- 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
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() -
onInit_ListGrid
protected void onInit_ListGrid() -
setAutoChildProperties
Sets the properties for creating aListGridField
AutoChild namedautoChildName
.NOTE: Overrides at override points are not applied to AutoChildren created from
properties
; that is, if the JavaClass
ofproperties
overrides a Smart GWT override point, the custom method implementation will not be called.- See Also:
-
displayHeaderContextMenu
IfshowHeaderContextMenu
istrue
this method is fired when the user right-clicks on the header for this grid.
Default implementation will display a menu with entries derived fromListGrid.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
Returns the appropriate valueIcon for a cell based on the field and the data value for the cell. Default implementation returns null ifsuppressValueIcon
is true otherwise looks atvalueIcons
.- Parameters:
field
- field associated with the cellvalue
- 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
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:
- APIs that allow modifying the contents of cells (such as
ListGrid.getCellStyle
orCellFormatter.format(java.lang.Object, com.smartgwt.client.widgets.grid.ListGridRecord, int, int)
) will be called only once per row-spanning cell - when using
cell-based selection
, only the spanning cell is considered selected, and not any of the cells spanned through. For example, if the cell at row 2 column 0 spans 2 cells,isSelected
will be true for 2,0 but false for 3,0. - if using incremental rendering (either horizontal or vertical),
getRowSpan()
may be called for a rowNum in the middle of a spanning cell, and should return the remaining span from that rowNum onward.
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 getCellRecordrowNum
- row number for the cellcolNum
- column number of the cell- Returns:
- number of cells to span
- APIs that allow modifying the contents of cells (such as
-
getRemoveFieldDefaults
Returns a JavaScriptObject containing defaultListGridField
attributes of remove fields. -
removeEmbeddedComponent
Removes an embedded component from a grid. The record in which the component is embedded is automatically derived from the Component passed in. IfdestroyOnUnEmbed
istrue
for the component, it will also be destroyed.- Parameters:
component
- the embedded component
-
showRecordComponent
WhenshowRecordComponents
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 processedcolNum
- 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
IfselectionType
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
Provide a custom implementation ofheaderHoverHTML(int,java.lang.String)
.The
HeaderHoverFormatter
should return the HTML to display in the hover canvas that is displayed by default if a registeredHeaderHoverHandler
does not cancel aHeaderHoverEvent
. The formatter can return null or an empty string to cancel the hover.- Parameters:
formatter
- the header hover formatter
-
setRowNumberFieldProperties
Set the properties generated field that displays the current row number whenshowRowNumbers
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
For databound ListGrids, this attribute can be used to customize theResultSet
object created for this grid when data is fetched.Note : This is an advanced setting
Class overrides forResultSet
cannot be applied to the grid using this API. Instead, consider setting theresultSetClass
property in the file defining yourDataSource
. Your class must beregistered for reflection
.- Parameters:
dataProperties
- Default value is null- Returns:
ListGrid
instance, for chaining setter calls- See Also:
-
setData
- See Also:
-
setData
- See Also:
-
getDataAsRecordList
Return the grid data as aRecordList
. If the component is bound to a DataSource, the actual type of the RecordList instance will be aResultSet
.- Returns:
- the data
-
setRecords
Synonym forsetData(ListGridRecord[])
- Parameters:
records
- the records
-
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 callgetGroupTree()
to get the underlying Tree data representation. You can callisGrouped()
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
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 togroupBy(String...)
). If this grid is not currently grouped, this method will return null.- Returns:
- Current group by field names.
-
setGroupStartOpen
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
- Parameters:
groupValues
- Array of values that should be opened
-
setSelectionCanvasProperties
public void setSelectionCanvasProperties(Canvas selectionCanvasProperties) throws IllegalStateException Properties to apply to the auto-generatedselectionCanvas
AutoChild when its use is enabled.- Parameters:
selectionCanvasProperties
- theselectionCanvas
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-generatedselectionUnderCanvas
AutoChild when its use is enabled.- Parameters:
selectionUnderCanvasProperties
- theselectionUnderCanvas
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-generatedrollOverCanvas
AutoChild when its use is enabled.- Parameters:
rollOverCanvasProperties
- therollOverCanvas
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-generatedrollUnderCanvas
AutoChild when its use is enabled.- Parameters:
rollUnderCanvasProperties
- therollUnderCanvas
properties- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
setDataSource
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
IfcanExpandRecords
is true andlistGrid.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
Standard properties to apply to the automatically generated checkbox field, shown whenselectionAppearance
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
Scroll the body of the grid to the specified coordinates.- Parameters:
left
- the left positiontop
- the top position
-
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
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
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 likestartEditing()
.- Parameters:
defaultRecordValue
- the default field values for the new record
-
getSelection
Deprecated.usegetSelectedRecords()
insteadThe selection associated with the listGrid.- Returns:
- the selection
-
getSelection
Deprecated.usegetSelectedRecords(boolean)
insteadThe 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
Method to retrieve a live edit form item for aneditable
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 callsetValue();
directly on the item and doing so will not always update the edit value for the grid.
- 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.
- 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
-
getEditFormItem
Method to retrieve a live edit form item for aneditable
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 callsetValue();
directly on the item and doing so will not always update the edit value for the grid.
- 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.
- 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
-
openRecordDetailGrid
Deprecated.Open the current record detail grid inline,- Parameters:
record
- the recorddetailDataSource
- the detail data source
-
closeRecord
Deprecated.Close the inline detail grid associated with the record.- Parameters:
record
- the record
-
openRecordEditor
Deprecated.Open the record editor associated with the record.- Parameters:
record
- the record
-
groupBy
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 thecom.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 agroupByField
setting.While grouped, the automatically created Tree is available as
groupTree
and the original dataset is available asoriginalData
. -
sort
- Parameters:
sortCol
- the column number to sort bysortDirection
- 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
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 usinghasChanges()
or#rowHasChanges()
. UseaddEditFailedHandler(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
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 usinghasChanges()
or#rowHasChanges()
. UseaddEditFailedHandler(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
- See Also:
-
unfreezeFields
public void unfreezeFields(int[] colNums) - See Also:
-
#unfreezeField(int)
-
unfreezeFields
- 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 refreshcolNum
- column number of cell to refresh
-
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
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 ofdrawAheadRatio
. The drawn rows are the apppropriate range to consider if you need to, eg, usingrefreshCell(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
- Parameters:
record
- the DataSource recorddataSource
- the schema of the DataSource record- See Also:
-
fetchRelatedData
public void fetchRelatedData(Record record, DataSource dataSource, DSCallback callback, DSRequest requestProperties) - Parameters:
record
- the DataSource recorddataSource
- the schema of the DataSource recordcallback
- callback to invoke on completionrequestProperties
- additional properties to set on the DSRequest that will be issued- See Also:
-
getBody
Returns the primary body, which, when there are frozen fields, is thecom.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
Synonym ofgetBody()
. -
getEditedCell
- See Also:
-
getEditedCell
- See Also:
-
getEditedCell
- See Also:
-
getEditedRecord
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
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numbercolNum
- column number of cellvalue
- 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 numbercolNum
- column number of cellvalue
- 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 numbercolNum
- column number of cellvalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numbercolNum
- column number of cellvalue
- 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 numbercolNum
- column number of cellvalue
- 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 numbercolNum
- column number of cellvalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
setEditValue
Modifies a field value being tracked as an unsaved user edit.- Parameters:
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate field
-
getEditValue
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 returnedfieldName
- field name for which value should be returned- Returns:
- edit value for the field in question
-
getEditValueAsString
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 returnedfieldName
- field name for which value should be returned- Returns:
- edit value for the field in question
-
getEditValueAsInt
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 returnedfieldName
- field name for which value should be returned- Returns:
- edit value for the field in question
-
getEditValueAsFloat
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 returnedfieldName
- field name for which value should be returned- Returns:
- edit value for the field in question
-
getEditValueAsDate
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 returnedfieldName
- field name for which value should be returned- Returns:
- edit value for the field in question
-
getEditValueAsBoolean
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 returnedfieldName
- field name for which value should be returned- Returns:
- edit value for the field in question
-
getEditValueAsRecord
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 returnedfieldName
- field name for which value should be returned- Returns:
- edit value for the field in question
-
getEditValueAsRecordArray
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 returnedfieldName
- field name for which value should be returned- Returns:
- edit value for the field in question
-
getEditValues
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
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
Sort the grid on one or more fields.Pass in an array of
SortSpecifier
s to have the grid's data sorted by the fields in eachspecifier.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, andunused 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()
andtoggleSort()
APIs for information on making changes to the current sort configuration.- Specified by:
setSort
in interfaceDataBoundComponent
- Parameters:
sortSpecifiers
- Array ofSortSpecifier
objects
-
setRowErrors
Set the validation errors for some row (replacing any pre-existent validation errors)- Parameters:
rowNum
- row to add validation error forerrors
- 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
- Parameters:
rowNum
- row index of cell to add validation error forfieldName
- field name of cell to add validation error forerrorMessages
- validation error messages- See Also:
-
#setFieldError(int, int, String)
-
selectSingleRecord
Select a singleRecord
passed in explicitly, or by index, and deselect everything else. When programmatic selection of records is a requirement andselectionType
is "single", use this method rather thanselectRecord(com.smartgwt.client.data.Record)
to enforce mutually-exclusive record-selection.- Parameters:
record
- record to select
-
selectSingleRecord
public void selectSingleRecord(int rowNum) Select a singleRecord
passed in explicitly, or by index, and deselect everything else. When programmatic selection of records is a requirement andselectionType
is "single", use this method rather thanselectRecord(com.smartgwt.client.data.Record)
to enforce mutually-exclusive record-selection.- Parameters:
rowNum
- rowNum (or row number) to select
-
getFormulaFieldValue
Get the computed value of acanAddFormulaFields
. Returns null for a bad formula or where the result is not a valid number.- Parameters:
field
- field that has a formularecord
- record to use to compute formula value- Returns:
- formula result
-
setCriteria
Sets this component's filter criteria. Default implementation calls this.data.setCriteria()- Parameters:
criteria
- new criteria to show
-
validateCell
Validate the current edit value for the cell in question. Called when the user moves to a
 new edit cell ifvalidateByCell
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.colIndex
- column index of field to be validated- Returns:
- returns true if validation was successful (no errors encountered), false otherwise.
-
cellHasErrors
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 errorscolIndex
- index of column to check for validation errors- Returns:
- true if we have validation errors for the row/col in question
-
clearFieldError
- Parameters:
rowNum
- row index of cell to add validation error forfieldName
- field name of cell to add validation error for- See Also:
-
setValueMap
Set the value map for a field.
 See also thesetEditorValueMap(java.lang.String, java.util.LinkedHashMap)

 andcom.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap
methods which allow further 
 customization of the valueMap displayed while the field is in edit mode.

- Parameters:
fieldName
- Name of field to updatevalueMap
- ValueMap for the field
-
setValueMap
Set the value map for a field.
 See also thesetEditorValueMap(java.lang.String, java.util.LinkedHashMap)

 andcom.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap
methods which allow further 
 customization of the valueMap displayed while the field is in edit mode.

- Parameters:
fieldName
- Name of field to updatevalueMap
- ValueMap for the field
-
setEditorValueMap
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 updatevalueMap
- ValueMap for the field
-
setEditorValueMap
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 updatevalueMap
- ValueMap for the field
-
getDisplayValue
Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.- Parameters:
fieldName
- Name of the field for which the displayValue is requiredvalue
- data value for the field
-
getDisplayValue
Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.- Parameters:
fieldName
- Name of the field for which the displayValue is requiredvalue
- data value for the field
-
getDisplayValue
Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.- Parameters:
fieldName
- Name of the field for which the displayValue is requiredvalue
- data value for the field
-
getDisplayValue
Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.- Parameters:
fieldName
- Name of the field for which the displayValue is requiredvalue
- data value for the field
-
getDisplayValue
Given a field with a specifiedvalueMap
ordisplayField
, this method will return the display value for any underlying data value.- Parameters:
fieldName
- Name of the field for which the displayValue is requiredvalue
- data value for the field
-
getGroupSummaryData
If this grid isgrouped
, andshowGroupSummary
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 calculatedgroupNode
- 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 isgrouped
, andshowGroupSummary
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 calculatedgroupNode
- object with specified groupValue and groupName for this grouprecalculate
- if set to false and the node has existing summary data, returns the stored summary data, rather than recalculating- Returns:
- summary record(s)
-
clearEditValue

 Clear a field value being tracked as an unsaved user edit.
 The saved record value will be displayed in the the appropriate cell instead.
 Will also discard any validation errors for the specified field / row.


- Parameters:
rowNum
- the row numberfieldName
- name of field for which the value is to be cleared
-
willAcceptDrop
This method overridesCanvas.willAcceptDrop()
and works as follows:
- If
Canvas.willAcceptDrop()
(the superclass definition) returns false, this method always returns false. This allowsdragType
anddropTypes
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, ifcanAcceptDroppedRecords
is false this method returns false. - If a call to
getDragData()
on thedragTarget
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.
- Overrides:
willAcceptDrop
in classCanvas
- Returns:
- true if this component will accept a drop of the dragData
- If
-
preloadImages
public static void preloadImages()Preload primary ListGrid skin images. -
getFieldWidth
Returns a numeric value for the width of some field within thisListGrid
.- 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
Return the underlying, ungrouped data of this ListGrid as aResultSet
. 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
Return the underlying, ungrouped data of this DataBoundComponent as aRecordList
.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 orResultSet
, as if the grid was ungrouped:isGrouped() ? getOriginalRecordList() : getRecordList()
- Returns:
- the RecordList
-
setCellFormatter
Sets a formatter that returns the HTML to display in each cell of the grid, given the raw cell value. Can be overridden by definingListGridField.setCellFormatter(com.smartgwt.client.widgets.grid.CellFormatter)
.- Parameters:
formatter
- formatter to apply to the cell values- See Also:
-
setCellCSSTextCustomizer
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
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
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:
- dragTracker HTML for a row
when
-
setCellValueHoverFormatter
Provide a custom implementation ofcellValueHoverHTML(ListGridRecord, int, int, String)
.The
CellValueHoverFormatter
should return the HTML to display in the hover canvas that is displayed by default if a registeredCellValueHoverHandler
does not cancel aCellValueHoverEvent
. The formatter can return null or an empty string to cancel the hover.- Parameters:
formatter
- the cell value hover formatter
-
setCellContextMenuItemsCustomizer
IfshowCellContextMenus
istrue
, this method is fired when the user right-clicks a cell in this grid.
Default implementation will display a menu with entries derived fromListGrid.getCellContextMenuItems
for the appropriate cell.- Parameters:
customizer
- the CellContextMenuItemsCustomizer
-
setDragTrackerIconCustomizer
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
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
This customizer is called to determine whether a given record can be selected in this grid.- Parameters:
customizer
- the CanSelectRecordCustomizer customizer
-
setDragTrackerTitleCustomizer
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
HTML to be shown in hovers over cells in the column described by this field.- Parameters:
hoverCustomizer
- the hover customizer- See Also:
-
setEditorCustomizer
This method allows developers to dynamically customize the form item displayed in an editable grid, based on the cell being edited. Note thatListGridField#setEditorType()
allows a simpler static customization of FormItem properties for a specific field.- Parameters:
customizer
-
-
hideFields
- Parameters:
fields
- fields to hidesuppressRelayout
- if passed, don't relayout non-explicit sized fields to fit the available space- See Also:
-
showFields
- Parameters:
field
- Fields to show.suppressRelayout
- If passed, don't resize non-explicitly sized columns to fill the available space.- See Also:
-
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
Deprecated.in favor ofsetFilterEditorProperties(RecordEditor)
Properties to apply to the automatically generatedfilterEditor
ifshowFilterEditor
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 rowcolNum
- Index of starting columnsearchForward
- true if searching forward for the next edit cell, false if searching backwardsstepThroughFields
- true if we should check every field in each row; false if we should check the same field in each rowcheckStartingCell
- 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, ornull
if no editable cell is found.
-
setMultiSortDialogDefaults
public void setMultiSortDialogDefaults(MultiSortDialog multiSortDialogDefaults) throws IllegalStateException Class level defaults to apply to theMultiSortDialog
which gets automatically generated when askForSort() is called.See also
showHeaderSpanTitlesInSortEditor
andsortEditorSpanTitleSeparator
- 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 theMultiSortDialog
which gets automatically generated when askForSort() is called.See also
showHeaderSpanTitlesInSortEditor
andsortEditorSpanTitleSeparator
- Parameters:
multiSortDialogProperties
- Default value is null- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
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
For agrouped
grid, returns all the direct children of the supplied node in thegroupTree
ifrecordsOnly
false. Otherwise, ifrecordsOnly
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 fromgroupTree
recordsOnly
-true
to return all descendants that are actual records from the grid's original data, orfalse
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
WhensortByGroupFirst
is active, sets theGroupNode
value normalizer used for implicit sorting by the field(s) used for grouping.No default implementation.
- Parameters:
GroupSortNormalizer
- customizer- See Also:
-
getFilterEditorCriteriaAsAdvancedCriteria
Same asgetFilterEditorCriteria()
but returns anAdvancedCriteria
. -
setDataPageSize
Description copied from interface:DataBoundComponent
When usingdata paging
, how many records to fetch at a time. If set to a positive integer,dataPageSize
will override the defaultresultSize
for ResultSets automatically created when you callfetchData()
(and similarly for theresultSize
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 asshowAllRecords:true
,drawAllMaxCells
anddrawAheadRatio
can cause more rows than the configureddataPageSize
to be fetched.- Specified by:
setDataPageSize
in interfaceDataBoundComponent
- 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 usingdata paging
, how many records to fetch at a time. If set to a positive integer,dataPageSize
will override the defaultresultSize
for ResultSets automatically created when you callfetchData()
(and similarly for theresultSize
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 asshowAllRecords:true
,drawAllMaxCells
anddrawAheadRatio
can cause more rows than the configureddataPageSize
to be fetched.- Specified by:
getDataPageSize
in interfaceDataBoundComponent
- Returns:
- int
- See Also:
-
setUseAllDataSourceFields
Description copied from interface:DataBoundComponent
If true, the set of fields given by the "default binding" (see 
fields
) is used, with any fields specified in
component.fields
acting as overrides that can suppress or modify the
 display of individual fields, without having to list the entire set of fields that
 should be shown.

 If
component.fields
contains fields that are not found in the DataSource,
 they will be shown after the most recently referred to DataSource field. If the new
 fields appear first, they will be shown first.- Specified by:
setUseAllDataSourceFields
in interfaceDataBoundComponent
- Parameters:
useAllDataSourceFields
- useAllDataSourceFields Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getUseAllDataSourceFields
Description copied from interface:DataBoundComponent
If true, the set of fields given by the "default binding" (see 
fields
) is used, with any fields specified in
component.fields
acting as overrides that can suppress or modify the
 display of individual fields, without having to list the entire set of fields that
 should be shown.

 If
component.fields
contains fields that are not found in the DataSource,
 they will be shown after the most recently referred to DataSource field. If the new
 fields appear first, they will be shown first.- Specified by:
getUseAllDataSourceFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setSparseFieldState
Description copied from interface:DataBoundComponent
If true,getFieldState()
andsetFieldState(java.lang.String)
will omit state information for hidden fields by default.- Specified by:
setSparseFieldState
in interfaceDataBoundComponent
- Parameters:
sparseFieldState
- sparseFieldState Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getSparseFieldState
Description copied from interface:DataBoundComponent
If true,getFieldState()
andsetFieldState(java.lang.String)
will omit state information for hidden fields by default.- Specified by:
getSparseFieldState
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setShowHiddenFields
Description copied from interface:DataBoundComponent
Whether to show fields markedhidden:true
when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.

 The
hidden
property is used on DataSource fields to mark fields that are
 never of meaning to an end user.- Specified by:
setShowHiddenFields
in interfaceDataBoundComponent
- Parameters:
showHiddenFields
- showHiddenFields Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getShowHiddenFields
Description copied from interface:DataBoundComponent
Whether to show fields markedhidden:true
when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.

 The
hidden
property is used on DataSource fields to mark fields that are
 never of meaning to an end user.- Specified by:
getShowHiddenFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setShowComplexFields
Description copied from interface:DataBoundComponent
Whether to show fields of non-atomic types when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.

 If true, the component will show fields that declare a complex type, for example, a
 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a
 DataSource that declares the fields of a shipping address (city, street name, etc).


 Such fields may need custom formatters or editors in order to create a usable interface,
 for example, an Address field in a ListGrid might use a custom formatter to combine the
 relevant fields of an address into one column, and might use a pop-up dialog for
 editing.
Note : This is an advanced setting
- Specified by:
setShowComplexFields
in interfaceDataBoundComponent
- Parameters:
showComplexFields
- showComplexFields Default value is true- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getShowComplexFields
Description copied from interface:DataBoundComponent
Whether to show fields of non-atomic types when a DataBoundComponent is given a
 DataSource but nocomponent.fields
.

 If true, the component will show fields that declare a complex type, for example, a
 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a
 DataSource that declares the fields of a shipping address (city, street name, etc).


 Such fields may need custom formatters or editors in order to create a usable interface,
 for example, an Address field in a ListGrid might use a custom formatter to combine the
 relevant fields of an address into one column, and might use a pop-up dialog for
 editing.
- Specified by:
getShowComplexFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setFetchOperation
Description copied from interface:DataBoundComponent
Operation ID this component should use when performing fetch operations.- Specified by:
setFetchOperation
in interfaceDataBoundComponent
- Parameters:
fetchOperation
- fetchOperation Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getFetchOperation
Description copied from interface:DataBoundComponent
Operation ID this component should use when performing fetch operations.- Specified by:
getFetchOperation
in interfaceDataBoundComponent
- Returns:
- String
-
setUpdateOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing update operations.- Specified by:
setUpdateOperation
in interfaceDataBoundComponent
- Parameters:
updateOperation
- Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getUpdateOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing update operations.- Specified by:
getUpdateOperation
in interfaceDataBoundComponent
- Returns:
- String
- See Also:
-
setAddOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing add operations.- Specified by:
setAddOperation
in interfaceDataBoundComponent
- Parameters:
addOperation
- Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getAddOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing add operations.- Specified by:
getAddOperation
in interfaceDataBoundComponent
- Returns:
- String
- See Also:
-
setRemoveOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing remove operations.- Specified by:
setRemoveOperation
in interfaceDataBoundComponent
- Parameters:
removeOperation
- Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getRemoveOperation
Description copied from interface:DataBoundComponent
operationId
this component should use when performing remove operations.- Specified by:
getRemoveOperation
in interfaceDataBoundComponent
- Returns:
- String
- See Also:
-
setExportFields
Description copied from interface:DataBoundComponent
The list of field-names to export. If provided, the field-list in the exported output is 
 limited and sorted as per the list.

 If exportFields is not provided, the exported output includes all visible fields 
 from this component, sorted as they appear.
- Specified by:
setExportFields
in interfaceDataBoundComponent
- Parameters:
exportFields
- exportFields Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getExportFields
Description copied from interface:DataBoundComponent
The list of field-names to export. If provided, the field-list in the exported output is 
 limited and sorted as per the list.

 If exportFields is not provided, the exported output includes all visible fields 
 from this component, sorted as they appear.
- Specified by:
getExportFields
in interfaceDataBoundComponent
- Returns:
- the list of field-names to export.
-
setExportAll
Description copied from interface:DataBoundComponent
Setting exportAll to true prevents the component from passing its list of fields to the 
 export call. The result is the export of all visible fields fromfields
.

 If exportAll is false, an export operation will first consider 

exportFields
, if it's set, and fall back on all visible fields from
fields
otherwise.- Specified by:
setExportAll
in interfaceDataBoundComponent
- Parameters:
exportAll
- exportAll Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getExportAll
Description copied from interface:DataBoundComponent
Setting exportAll to true prevents the component from passing its list of fields to the 
 export call. The result is the export of all visible fields fromfields
.

 If exportAll is false, an export operation will first consider 

exportFields
, if it's set, and fall back on all visible fields from
fields
otherwise.- Specified by:
getExportAll
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setExportIncludeSummaries
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 interfaceDataBoundComponent
- Parameters:
exportIncludeSummaries
- exportIncludeSummaries Default value is true- Returns:
DataBoundComponent
instance, for chaining setter calls
-
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 interfaceDataBoundComponent
- Returns:
- Boolean
-
setPreventDuplicates
Description copied from interface:DataBoundComponent
If set, detect and prevent duplicate records from being transferred to this component, either via
 drag and drop or viaDataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
. When a duplicate transfer is detected,
 a dialog will appear showing theduplicateDragMessage
.

 If the component either does not have a
DataSource
or has a DataSource with no
primaryKey
declared, duplicate checking is off by
 default. If duplicate checking is enabled, it looks for an existing record in the dataset
 that has all of the properties of the dragged record, and considers that a duplicate.

 For
DragDataAction
:"copy" where the target DataSource is related to the source
 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current
 criteria, already has a record whose value for the foreignKey field matches the
 primaryKey of the record being transferred.

 For example, consider dragging "employees" to "teams", where "teams" has a field
 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target
 grid has search criteria causing it to show all the members of one team. A duplicate -
 adding an employee to the same team twice - is when the target grid's dataset contains an
 record with "employeeId" matching the "id" field of the dropped employee.
- Specified by:
setPreventDuplicates
in interfaceDataBoundComponent
- 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
Description copied from interface:DataBoundComponent
If set, detect and prevent duplicate records from being transferred to this component, either via
 drag and drop or viaDataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
. When a duplicate transfer is detected,
 a dialog will appear showing theduplicateDragMessage
.

 If the component either does not have a
DataSource
or has a DataSource with no
primaryKey
declared, duplicate checking is off by
 default. If duplicate checking is enabled, it looks for an existing record in the dataset
 that has all of the properties of the dragged record, and considers that a duplicate.

 For
DragDataAction
:"copy" where the target DataSource is related to the source
 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current
 criteria, already has a record whose value for the foreignKey field matches the
 primaryKey of the record being transferred.

 For example, consider dragging "employees" to "teams", where "teams" has a field
 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target
 grid has search criteria causing it to show all the members of one team. A duplicate -
 adding an employee to the same team twice - is when the target grid's dataset contains an
 record with "employeeId" matching the "id" field of the dropped employee.
- Specified by:
getPreventDuplicates
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setDuplicateDragMessage
Description copied from interface:DataBoundComponent
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.- Specified by:
setDuplicateDragMessage
in interfaceDataBoundComponent
- 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
Description copied from interface:DataBoundComponent
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.- Specified by:
getDuplicateDragMessage
in interfaceDataBoundComponent
- Returns:
- String
-
setAddDropValues
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 interfaceDataBoundComponent
- Parameters:
addDropValues
- addDropValues Default value is true- Returns:
DataBoundComponent
instance, for chaining setter calls
-
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 interfaceDataBoundComponent
- Returns:
- Boolean
-
setDropValues
Description copied from interface:DataBoundComponent
When an item is dropped on this component, andaddDropValues
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 interfaceDataBoundComponent
- Parameters:
dropValues
- dropValues Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getDropValues
Description copied from interface:DataBoundComponent
When an item is dropped on this component, andaddDropValues
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 interfaceDataBoundComponent
- Returns:
- Returns the "drop values" to apply to a record dropped on this component prior to update. Only
 applicable to databound components - see
dropValues
for more details. If multiple records 
 are being dropped, this method is called for each of them in turn.

 This method returns the following:

- 

- Nothing, if
addDropValues
is false 
 - dropValues, if that property is set. If the component's criteria object is applicable (as explained
 in the next item), it is merged into dropValues, with properties in dropValues taking precedence. 

- The component's criteria object, if the most recent textMatchStyle for the component was "exact" 
 and it is simple criteria (ie, not an AdvancedCriteria object) 

- Otherwise nothing 


 You can override this method if you need more complex setting of drop values than can be 
 provided by simply supplying a dropValues object.
 

- Nothing, if
-
setProgressiveLoading
Indicates whether or not this component will load its dataprogressively
- Parameters:
progressiveLoading
-- Returns:
DataBoundComponent
instance, for chaining setter calls- See Also:
-
getProgressiveLoading
Indicates whether or not this component will load its dataprogressively
- Returns:
- See Also:
-
setUseFlatFields
Description copied from interface:DataBoundComponent
TheuseFlatFields
flag causes all simple type fields anywhere in a nested
 set of DataSources to be exposed as a flat list for form binding. 


useFlatFields
is typically used with imported metadata, such as 
XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback)
from a 
XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback)
, as a means of eliminating levels of XML
 nesting that aren't meaningful in a user interface, without the cumbersome and fragile
 process of mapping form fields to XML structures.

 For example, having called
WebService.getInputDS(java.lang.String)
to retrieve the input message
 schema for a web service operation whose input message looks like this:

 <FindServices>
 <searchFor>search text</searchFor>
 <Options>
 <caseSensitive>false</caseSensitive>
 </Options>
 <IncludeInSearch>
 <serviceName>true</serviceName>
 <documentation>true</documentation>
 <keywords>true</keywords>
 </IncludeInSearch>
 </FindServices>


 SettinguseFlatFields
on aDynamicForm
that is bound to this input
 message schema would result in 5FormItem
reflecting the 5 simple type
 fields in the message.

 For this form, the result of
DynamicForm.getValues()
might look
 like:


{
 searchFor: "search text",
 caseSensitive: false,
 serviceName: true,
 documentation : true,
 keywords : true
 }

 When contacting aWebService
, these values can be automatically
 mapped to the structure of the input message for a web service operation by setting
 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use withWebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)
) or by setting
useFlatFields
(for use with aDataSource
that is
'bound to a WSDL web service'
via
wsOperation
). 

 Using these two facilities in conjunction (component.useFlatFields and
 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user
 presentation and when providing the data for XML messages.


 You can also set
useFlatFields
to automatically enable 
 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a
 particular operationType.

 Note that
useFlatFields
is not generally recommended for use with structures
 where multiple simple type fields exist with the same name, however if used with such a
 structure, the first field to use a given name wins. "first" means the first field
 encountered in a depth first search. "wins" means only the first field will be present as a
 field when data binding.- Specified by:
setUseFlatFields
in interfaceDataBoundComponent
- 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
Description copied from interface:DataBoundComponent
TheuseFlatFields
flag causes all simple type fields anywhere in a nested
 set of DataSources to be exposed as a flat list for form binding. 


useFlatFields
is typically used with imported metadata, such as 
XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback)
from a 
XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback)
, as a means of eliminating levels of XML
 nesting that aren't meaningful in a user interface, without the cumbersome and fragile
 process of mapping form fields to XML structures.

 For example, having called
WebService.getInputDS(java.lang.String)
to retrieve the input message
 schema for a web service operation whose input message looks like this:

 <FindServices>
 <searchFor>search text</searchFor>
 <Options>
 <caseSensitive>false</caseSensitive>
 </Options>
 <IncludeInSearch>
 <serviceName>true</serviceName>
 <documentation>true</documentation>
 <keywords>true</keywords>
 </IncludeInSearch>
 </FindServices>


 SettinguseFlatFields
on aDynamicForm
that is bound to this input
 message schema would result in 5FormItem
reflecting the 5 simple type
 fields in the message.

 For this form, the result of
DynamicForm.getValues()
might look
 like:


{
 searchFor: "search text",
 caseSensitive: false,
 serviceName: true,
 documentation : true,
 keywords : true
 }

 When contacting aWebService
, these values can be automatically
 mapped to the structure of the input message for a web service operation by setting
 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use withWebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)
) or by setting
useFlatFields
(for use with aDataSource
that is
'bound to a WSDL web service'
via
wsOperation
). 

 Using these two facilities in conjunction (component.useFlatFields and
 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user
 presentation and when providing the data for XML messages.


 You can also set
useFlatFields
to automatically enable 
 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a
 particular operationType.

 Note that
useFlatFields
is not generally recommended for use with structures
 where multiple simple type fields exist with the same name, however if used with such a
 structure, the first field to use a given name wins. "first" means the first field
 encountered in a depth first search. "wins" means only the first field will be present as a
 field when data binding.- Specified by:
getUseFlatFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setHiliteProperty
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
 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.- Specified by:
setHiliteProperty
in interfaceDataBoundComponent
- Parameters:
hiliteProperty
- hiliteProperty Default value is "_hilite"- Returns:
DataBoundComponent
instance, for chaining setter calls
-
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
 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.- Specified by:
getHiliteProperty
in interfaceDataBoundComponent
- 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 interfaceDataBoundComponent
-
getHiliteState
Description copied from interface:DataBoundComponent
Get the current hilites encoded as a String, for saving.- Specified by:
getHiliteState
in interfaceDataBoundComponent
- Returns:
- the hilite state
-
setHiliteState
Description copied from interface:DataBoundComponent
Set the current hilites based on a hiliteState String previously returned from getHilitesState.- Specified by:
setHiliteState
in interfaceDataBoundComponent
- Parameters:
hiliteState
- hilites state encoded as a String- Returns:
DataBoundComponent
instance, for chaining setter calls
-
setHilites
Description copied from interface:DataBoundComponent
Accepts an array of hilite objects and applies them to this DataBoundComponent. See alsogetHilites
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 interfaceDataBoundComponent
- Parameters:
hilites
- array of hilite objects- Returns:
DataBoundComponent
instance, for chaining setter calls
-
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 interfaceDataBoundComponent
- Returns:
- array of hilite objects
-
setDragDataAction
Description copied from interface:DataBoundComponent
Indicates what to do with data dragged into another DataBoundComponent. See
 DragDataAction type for details.- Specified by:
setDragDataAction
in interfaceDataBoundComponent
- Parameters:
dragDataAction
- dragDataAction Default value is Canvas.MOVE- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getDragDataAction
Description copied from interface:DataBoundComponent
Indicates what to do with data dragged into another DataBoundComponent. See
 DragDataAction type for details.- Specified by:
getDragDataAction
in interfaceDataBoundComponent
- Returns:
- DragDataAction
-
setDragTrackerStyle
Description copied from interface:DataBoundComponent
CSS Style to apply to the drag tracker when dragging occurs on this component.- Specified by:
setDragTrackerStyle
in interfaceDataBoundComponent
- Parameters:
dragTrackerStyle
- dragTrackerStyle Default value is "gridDragTracker"- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getDragTrackerStyle
Description copied from interface:DataBoundComponent
CSS Style to apply to the drag tracker when dragging occurs on this component.- Specified by:
getDragTrackerStyle
in interfaceDataBoundComponent
- Returns:
- String
-
setCanAddFormulaFields
Description copied from interface:DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new
 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.

 User-added formula fields can be persisted via
getFieldState()
and 
setFieldState(java.lang.String)
.- Specified by:
setCanAddFormulaFields
in interfaceDataBoundComponent
- 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 
 is equivalent to callingDataBoundComponentGen#editSummaryField
with 
 no parameter.

- Specified by:
addSummaryField
in interfaceDataBoundComponent
-
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 
 is equivalent to callingDataBoundComponentGen#editFormulaField
with 
 no parameter.

- Specified by:
addFormulaField
in interfaceDataBoundComponent
-
getCanAddFormulaFields
Description copied from interface:DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new
 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.

 User-added formula fields can be persisted via
getFieldState()
and 
setFieldState(java.lang.String)
.- Specified by:
getCanAddFormulaFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setAddFormulaFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to add a formula field- Specified by:
setAddFormulaFieldText
in interfaceDataBoundComponent
- Parameters:
addFormulaFieldText
- addFormulaFieldText Default value is "Add formula column..."- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getAddFormulaFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to add a formula field- Specified by:
getAddFormulaFieldText
in interfaceDataBoundComponent
- Returns:
- String
-
setEditFormulaFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to edit a formula field- Specified by:
setEditFormulaFieldText
in interfaceDataBoundComponent
- Parameters:
editFormulaFieldText
- editFormulaFieldText Default value is "Edit formula..."- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getEditFormulaFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to edit a formula field- Specified by:
getEditFormulaFieldText
in interfaceDataBoundComponent
- Returns:
- String
-
setCanAddSummaryFields
Description copied from interface:DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new
 text field that can contain both user-defined text and the formatted values present in other 
 fields, using the {@link com.smartgwt.client..SummaryBuilder}.

 User-added summary fields can be persisted via
getFieldState()
and 
setFieldState(java.lang.String)
.- Specified by:
setCanAddSummaryFields
in interfaceDataBoundComponent
- Parameters:
canAddSummaryFields
- canAddSummaryFields Default value is false- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getCanAddSummaryFields
Description copied from interface:DataBoundComponent
Adds an item to the header context menu allowing users to launch a dialog to define a new
 text field that can contain both user-defined text and the formatted values present in other 
 fields, using the {@link com.smartgwt.client..SummaryBuilder}.

 User-added summary fields can be persisted via
getFieldState()
and 
setFieldState(java.lang.String)
.- Specified by:
getCanAddSummaryFields
in interfaceDataBoundComponent
- Returns:
- Boolean
-
setAddSummaryFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to add a formula field- Specified by:
setAddSummaryFieldText
in interfaceDataBoundComponent
- Parameters:
addSummaryFieldText
- addSummaryFieldText Default value is "Add summary column..."- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getAddSummaryFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to add a formula field- Specified by:
getAddSummaryFieldText
in interfaceDataBoundComponent
- Returns:
- String
-
setEditSummaryFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to edit the formatter for a field- Specified by:
setEditSummaryFieldText
in interfaceDataBoundComponent
- Parameters:
editSummaryFieldText
- editSummaryFieldText Default value is "Edit summary format..."- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getEditSummaryFieldText
Description copied from interface:DataBoundComponent
Text for a menu item allowing users to edit the formatter for a field- Specified by:
getEditSummaryFieldText
in interfaceDataBoundComponent
- Returns:
- String
-
setSavedSearchId
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 itslocal ID
andDataSource 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 explicitCanvas.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 interfaceDataBoundComponent
- Parameters:
savedSearchId
- New savedSearchId value. Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
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 itslocal ID
andDataSource 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 explicitCanvas.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 interfaceDataBoundComponent
- 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 currentDataSource
of a component when asavedSearchId
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 interfaceDataBoundComponent
- 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 currentDataSource
of a component when asavedSearchId
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 interfaceDataBoundComponent
- Returns:
- Current showSavedSearchesByDS value. Default value is true
-
findAll
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
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
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
LikeRecordList.findIndex(java.util.Map)
, but considering the startIndex and endIndex parameters.- Parameters:
startIndex
- first index to consideradCriteria
- AdvancedCriteria to use to filter resultsendIndex
- last index to consider- Returns:
- index of the first matching Record or -1 if not found
-
findNextIndex
LikeRecordList.findIndex(java.util.Map)
, but considering the startIndex parameter.- Parameters:
startIndex
- first index to consideradCriteria
- AdvancedCriteria to use to filter results- Returns:
- index of the first matching Record or -1 if not found
-
selectRecord
Description copied from interface:DataBoundComponent
Select/deselect aRecord
passed in explicitly, or by index.- Specified by:
selectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to select
-
selectRecord
public void selectRecord(int record) Description copied from interface:DataBoundComponent
Select/deselect aRecord
passed in explicitly, or by index.- Specified by:
selectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to select
-
selectRecord
public void selectRecord(int record, boolean newState) Description copied from interface:DataBoundComponent
Select/deselect aRecord
passed in explicitly, or by index.- Specified by:
selectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)
-
selectRecord
Description copied from interface:DataBoundComponent
Select/deselect aRecord
passed in explicitly, or by index.- Specified by:
selectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)
-
selectRecords
public void selectRecords(int[] records) Description copied from interface:DataBoundComponent
Select/deselect a list ofRecord
s passed in explicitly, or by index.- Specified by:
selectRecords
in interfaceDataBoundComponent
- 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 ofRecord
s passed in explicitly, or by index.- Specified by:
selectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to selectnewState
- new selection state
-
selectRecords
Description copied from interface:DataBoundComponent
Select/deselect a list ofRecord
s passed in explicitly, or by index.- Specified by:
selectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to select
-
selectRecords
Description copied from interface:DataBoundComponent
Select/deselect a list ofRecord
s passed in explicitly, or by index.- Specified by:
selectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to selectnewState
- new selection state (if null, defaults to true)
-
deselectRecord
Description copied from interface:DataBoundComponent
Deselect aRecord
passed in explicitly, or by index.Synonym for
selectRecord(record, false)
- Specified by:
deselectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to deselect
-
deselectRecord
public void deselectRecord(int record) Description copied from interface:DataBoundComponent
Deselect aRecord
passed in explicitly, or by index.Synonym for
selectRecord(record, false)
- Specified by:
deselectRecord
in interfaceDataBoundComponent
- Parameters:
record
- record (or row number) to deselect
-
deselectRecords
public void deselectRecords(int[] records) Description copied from interface:DataBoundComponent
Deselect a list ofRecord
s passed in explicitly, or by index.Synonym for
selectRecords(records, false)
- Specified by:
deselectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to deselect
-
deselectRecords
Description copied from interface:DataBoundComponent
Deselect a list ofRecord
s passed in explicitly, or by index.Synonym for
selectRecords(records, false)
- Specified by:
deselectRecords
in interfaceDataBoundComponent
- Parameters:
records
- records (or row numbers) to deselect
-
selectAllRecords
public void selectAllRecords()Description copied from interface:DataBoundComponent
Select all records

- Specified by:
selectAllRecords
in interfaceDataBoundComponent
-
deselectAllRecords
public void deselectAllRecords()Description copied from interface:DataBoundComponent

 Deselect all records

- Specified by:
deselectAllRecords
in interfaceDataBoundComponent
-
anySelected
Description copied from interface:DataBoundComponent
Whether at least one item is selected
- Specified by:
anySelected
in interfaceDataBoundComponent
- Returns:
- true == at least one item is selected false == nothing at all is selected
-
enableHilite
Description copied from interface:DataBoundComponent
Enable / disable ahilites


- Specified by:
enableHilite
in interfaceDataBoundComponent
- Parameters:
hiliteID
- ID of hilite to enable
-
enableHilite
Description copied from interface:DataBoundComponent
Enable / disable ahilites


- Specified by:
enableHilite
in interfaceDataBoundComponent
- Parameters:
hiliteID
- ID of hilite to enableenable
- new enabled state to apply - if null, defaults to true
-
disableHilite
Description copied from interface:DataBoundComponent
Disable a hilite

- Specified by:
disableHilite
in interfaceDataBoundComponent
- Parameters:
hiliteID
- ID of hilite to disable
-
enableHiliting
public void enableHiliting()Description copied from interface:DataBoundComponent
Enable all hilites.

- Specified by:
enableHiliting
in interfaceDataBoundComponent
-
enableHiliting
public void enableHiliting(boolean enable) Description copied from interface:DataBoundComponent
Enable all hilites.

- Specified by:
enableHiliting
in interfaceDataBoundComponent
- Parameters:
enable
- new enabled state to apply - if null, defaults to true
-
disableHiliting
public void disableHiliting()Description copied from interface:DataBoundComponent
Disable all hilites.

- Specified by:
disableHiliting
in interfaceDataBoundComponent
-
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

willAcceptDrop()
.- Specified by:
getDragData
in interfaceDataBoundComponent
- Returns:
- Array of
Record
s that are currently selected.
-
transferSelectedData
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 callingDataBoundComponent.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 thedrop()
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, useHasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler)
. See theDragging
documentation for an overview of list grid drag/drop data transfer.- Specified by:
transferSelectedData
in interfaceDataBoundComponent
- Parameters:
source
- source component from which the records will be tranferred
-
transferSelectedData
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 callingDataBoundComponent.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 thedrop()
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, useHasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler)
. See theDragging
documentation for an overview of list grid drag/drop data transfer.- Specified by:
transferSelectedData
in interfaceDataBoundComponent
- Parameters:
source
- source component from which the records will be transferredindex
- target index (drop position) of the rows within this grid.
-
getRecordIndex
Description copied from interface:DataBoundComponent
Get the index of the provided record.

 Override in subclasses to provide more specific behaviour, for instance, when data holds a
 large number of records


- Specified by:
getRecordIndex
in interfaceDataBoundComponent
- Parameters:
record
- the record whose index is to be retrieved- Returns:
- indexindex of the record, or -1 if not found
-
getTitleFieldValue
Description copied from interface:DataBoundComponent
Get the value of the titleField for the passed record

 Override in subclasses 


- Specified by:
getTitleFieldValue
in interfaceDataBoundComponent
- Parameters:
record
- the record whose index is to be retrieved- Returns:
- valuethe value of the titleField for the passed record
-
setTitleField
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 interfaceDataBoundComponent
- Returns:
DataBoundComponent
instance, for chaining setter calls
-
getTitleField
Description copied from interface:DataBoundComponent
Method to return the fieldName which represents the "title" for records in this
 Component.

 If this.titleField is explicitly specified it will always be used.
 Otherwise, default implementation will checktitleField
for databound
 components.

 For non databound components returns the first defined field name of"title"
, 
"name"
, or"id"
. If we dont find any field-names that match these
 titles, the first field in the component will be used instead.
- Specified by:
getTitleField
in interfaceDataBoundComponent
- Returns:
- fieldName the title field for this component.
-
getDataSource
Description copied from interface:DataBoundComponent
The DataSource that this component should bind to for default fields and for performingDataSource requests
.- Specified by:
getDataSource
in interfaceDataBoundComponent
- Returns:
- DataSource
-
setAutoFetchData
Description copied from interface:DataBoundComponent
If true, when this component is first drawn, automatically callDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
depending onDataBoundComponent.getAutoFetchAsFilter()
. Criteria for this fetch may be picked up frominitialCriteria
and textMatchStyle may be specified viaDataBoundComponent.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 interfaceDataBoundComponent
- Parameters:
autoFetchData
- autoFetchData- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
-
getAutoFetchData
Description copied from interface:DataBoundComponent
If true, when this component is first drawn, automatically callDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
depending onDataBoundComponent.getAutoFetchAsFilter()
. Criteria for this fetch may be picked up frominitialCriteria
and textMatchStyle may be specified viaDataBoundComponent.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 interfaceDataBoundComponent
- Returns:
- autoFetchData autoFetchData
-
setAutoFetchTextMatchStyle
public ListGrid setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle) throws IllegalStateException Description copied from interface:DataBoundComponent
IfautoFetchData
istrue
, this attribute allows the developer to specify a textMatchStyle for the initialDataBoundComponent.fetchData()
call.- Specified by:
setAutoFetchTextMatchStyle
in interfaceDataBoundComponent
- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
-
getAutoFetchTextMatchStyle
Description copied from interface:DataBoundComponent
IfautoFetchData
istrue
, this attribute allows the developer to specify a textMatchStyle for the initialDataBoundComponent.fetchData()
call.- Specified by:
getAutoFetchTextMatchStyle
in interfaceDataBoundComponent
- Returns:
- autoFetchTextMatchStyle autoFetchTextMatchStyle
-
setAutoFetchAsFilter
Description copied from interface:DataBoundComponent
IfDataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be performed viaDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
- Specified by:
setAutoFetchAsFilter
in interfaceDataBoundComponent
- Parameters:
autoFetchAsFilter
- autoFetchAsFilter- Returns:
DataBoundComponent
instance, for chaining setter calls- Throws:
IllegalStateException
-
getAutoFetchAsFilter
Description copied from interface:DataBoundComponent
IfDataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be performed viaDataBoundComponent.fetchData()
orDataBoundComponent.filterData()
- Specified by:
getAutoFetchAsFilter
in interfaceDataBoundComponent
- Returns:
- auto fetch as filter
-
setInitialCriteria
Description copied from interface:DataBoundComponent
Criteria to use whenDataBoundComponent.setAutoFetchData(Boolean)
is used.- Specified by:
setInitialCriteria
in interfaceDataBoundComponent
- 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
Description copied from interface:DataBoundComponent
Criteria to use whenDataBoundComponent.setAutoFetchData(Boolean)
is used.- Specified by:
getInitialCriteria
in interfaceDataBoundComponent
- Returns:
- the criteria
-
setImplicitCriteria
Description copied from interface:DataBoundComponent
Criteria that are never shown to or edited by the user and are cumulative with any criteria provided viaDataBoundComponent.initialCriteria
,DataBoundComponent.setCriteria()
etc.- Specified by:
setImplicitCriteria
in interfaceDataBoundComponent
- Parameters:
implicitCriteria
- New implicitCriteria value. Default value is null- Returns:
DataBoundComponent
instance, for chaining setter calls
-
setImplicitCriteria
-
setImplicitCriteria
-
getImplicitCriteria
Description copied from interface:DataBoundComponent
Criteria that are never shown to or edited by the user and are cumulative with any criteria provided viaDataBoundComponent.initialCriteria
,DataBoundComponent.setCriteria()
etc.- Specified by:
getImplicitCriteria
in interfaceDataBoundComponent
- 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 viasetData()
, this method will create aResultSet
, which will be configured based on component settings such asfetchOperation
anddataPageSize
, as well as the general purposedataProperties
. 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 tofetchData()
- this may result in two DSRequests to fetch data. Use eitherautoFetchData
andsetAutoFetchCriteria()
or a manual call to fetchData() passing criteria.Whether a ResultSet was automatically created or provided via
setData()
, subsequent calls to fetchData() will simply callresultSet.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 usinginvalidateCache()
there is no need to also callfetchData()
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 useresultSet.willFetchData()
to determine whether or not a server fetch will occur whenfetchData()
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 interfaceDataBoundComponent
-
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 viasetData()
, this method will create aResultSet
, which will be configured based on component settings such asfetchOperation
anddataPageSize
, as well as the general purposedataProperties
. 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 tofetchData()
- this may result in two DSRequests to fetch data. Use eitherautoFetchData
andsetAutoFetchCriteria()
or a manual call to fetchData() passing criteria.Whether a ResultSet was automatically created or provided via
setData()
, subsequent calls to fetchData() will simply callresultSet.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 usinginvalidateCache()
there is no need to also callfetchData()
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 useresultSet.willFetchData()
to determine whether or not a server fetch will occur whenfetchData()
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 interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
-
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 viasetData()
, this method will create aResultSet
, which will be configured based on component settings such asfetchOperation
anddataPageSize
, as well as the general purposedataProperties
. 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 tofetchData()
- this may result in two DSRequests to fetch data. Use eitherautoFetchData
andsetAutoFetchCriteria()
or a manual call to fetchData() passing criteria.Whether a ResultSet was automatically created or provided via
setData()
, subsequent calls to fetchData() will simply callresultSet.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 usinginvalidateCache()
there is no need to also callfetchData()
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 useresultSet.willFetchData()
to determine whether or not a server fetch will occur whenfetchData()
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 interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only if server contact was required
-
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 viasetData()
, this method will create aResultSet
, which will be configured based on component settings such asfetchOperation
anddataPageSize
, as well as the general purposedataProperties
. 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 tofetchData()
- this may result in two DSRequests to fetch data. Use eitherautoFetchData
andsetAutoFetchCriteria()
or a manual call to fetchData() passing criteria.Whether a ResultSet was automatically created or provided via
setData()
, subsequent calls to fetchData() will simply callresultSet.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 usinginvalidateCache()
there is no need to also callfetchData()
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 useresultSet.willFetchData()
to determine whether or not a server fetch will occur whenfetchData()
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 interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only if server contact was requiredrequestProperties
- 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 thattextMatchStyle
is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.- Specified by:
filterData
in interfaceDataBoundComponent
-
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 thattextMatchStyle
is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.- Specified by:
filterData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
-
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 thattextMatchStyle
is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.- Specified by:
filterData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only if server contact was required; seeDataBoundComponent.fetchData()
for details
-
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 thattextMatchStyle
is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.- Specified by:
filterData
in interfaceDataBoundComponent
- Parameters:
criteria
- Search criteria. If aDynamicForm
is passed in as this argument instead of a raw criteria object, will be derived by callingDynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only if server contact was required; seeDataBoundComponent.fetchData()
for detailsrequestProperties
- 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'sinvalidateCache()
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 - seeResultSet
for details. If automatic cache synchronization isn't working, troubleshoot the problem using the steps suggested in the FAQ rather than just calling invalidateCache(). CallinginvalidateCache()
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, callResultSet.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 interfaceDataBoundComponent
- See Also:
-
getResultSet
Description copied from interface:DataBoundComponent
Return the underlying data of this DataBoundComponent as aResultSet
.Note that this method should only be called after initial data has been fetched by this DataBoundComponent.
- Specified by:
getResultSet
in interfaceDataBoundComponent
- Returns:
- ResultSet, or null if the underlying data is not a ResultSet
- See Also:
-
getRecordList
Description copied from interface:DataBoundComponent
Return the underlying data of this DataBoundComponent as aRecordList
.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 ofRecord
. - 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, useisGrouped() ? getOriginalRecordList() : getRecordList()
- If the component is a
TreeGrid
, the instance is a ResultTree.
- Specified by:
getRecordList
in interfaceDataBoundComponent
- Returns:
- the RecordList
- If the component is not bound to a
-
getDataAsJSList
- Specified by:
getDataAsJSList
in interfaceDataBoundComponent
-
exportData
public void exportData()Description copied from interface:DataBoundComponent
- Specified by:
exportData
in interfaceDataBoundComponent
-
exportData
Description copied from interface:DataBoundComponent
- Specified by:
exportData
in interfaceDataBoundComponent
-
exportData
Description copied from interface:DataBoundComponent
Uses a "fetch" operation on the currentDataSource
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
andexportFilename
, affect the exporting process: seeexportResults
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 interfaceDataBoundComponent
- Parameters:
requestProperties
- additional properties to set on DSRequest that will be issuedcallback
- Optional callback. Note that this parameter only applies if you specifyexportToClient
: false in the request properties, because file downloads don't provide ordinary framework callbacks- See Also:
-
addFetchDataHandler
Add a fetchData handler.Notification function fired on fetchData() or filterData()
- Specified by:
addFetchDataHandler
in interfaceHasFetchDataHandlers
- Parameters:
handler
- the filterData handler- Returns:
HandlerRegistration
used to remove this handler
-
addDropCompleteHandler
Add acom.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 interfaceHasDropCompleteHandlers
- Parameters:
handler
- the DropCompleteHandler- Returns:
HandlerRegistration
used to remove this handler
-
addDragCompleteHandler
Add acom.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 interfaceHasDragCompleteHandlers
- Parameters:
handler
- the DropCompleteHandler- Returns:
HandlerRegistration
used to remove this handler
-
getFieldAlignments
Description copied from interface:DataBoundComponent
Returna an array of field alignments for this grid- Specified by:
getFieldAlignments
in interfaceDataBoundComponent
- Returns:
- array of Alignments
-
getDeepCloneOnEdit
Description copied from interface:DataBoundComponent
Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. SeeDataSource.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 withDataSourceField.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, usingCanvas.setDataPath(java.lang.String)
- Specified by:
getDeepCloneOnEdit
in interfaceDataBoundComponent
-
setDeepCloneOnEdit
Description copied from interface:DataBoundComponent
Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. SeeDataSource.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 withDataSourceField.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, usingCanvas.setDataPath(java.lang.String)
- Specified by:
setDeepCloneOnEdit
in interfaceDataBoundComponent
- Returns:
DataBoundComponent
instance, for chaining setter calls
-
setFields
Description copied from interface:DataBoundComponent
Field setter variant (alternative tosetFields(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 interfaceDataBoundComponent
- Parameters:
fields
- the component fields- Returns:
DataBoundComponent
instance, for chaining setter calls
-
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 theDynamicForm
has been created.- Specified by:
getFieldsAsJavaScriptObjects
in interfaceDataBoundComponent
- Returns:
- the component fields
-
getFieldCount
public int getFieldCount()Description copied from interface:DataBoundComponent
Return the number of fields.- Specified by:
getFieldCount
in interfaceDataBoundComponent
- 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 ofRecord
s from another component (does not have to be a databound component) into this component. This method is only applicable to list-type components, such asListGrid
orcom.smartgwt.client.widgets.tile.TileGridTileGrid
. Notably, it does not apply toTreeGrid
; the equivalent for treeGrids istransferNodes
.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 thedropRecords
(the default record drop behavior is simply to calltransferRecords()
, 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 interfaceDataBoundComponent
- Parameters:
records
- Recordss to transfer to this componenttargetRecord
- The target record (eg, of a drop interaction), for contextindex
- Insert point relative to the target record for the transferred recordssourceWidget
- 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
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
Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility. -
getLogicalStructure
Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.- Specified by:
getLogicalStructure
in interfaceLogicalStructure
- Overrides:
getLogicalStructure
in classVLayout
-
setCanExpandRecords(Boolean)
withsetExpansionMode(com.smartgwt.client.types.ExpansionMode)
, or overridegetExpansionComponent(ListGridRecord)