|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.grid.ListGrid
public class ListGrid
A ListGrid is a DataBoundComponent
that displays a list of objects in a grid, where
each row represents one object and each cell in the row represents one property.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
ListGrid()
|
|
ListGrid(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
HandlerRegistration |
addCellClickHandler(CellClickHandler handler)
Add a cellClick handler. |
HandlerRegistration |
addCellContextClickHandler(CellContextClickHandler handler)
Add a cellContextClick handler. |
HandlerRegistration |
addCellDoubleClickHandler(CellDoubleClickHandler handler)
Add a cellDoubleClick handler. |
HandlerRegistration |
addCellHoverHandler(CellHoverHandler handler)
Add a cellHover handler. |
HandlerRegistration |
addCellMouseDownHandler(CellMouseDownHandler handler)
Add a cellMouseDown handler. |
HandlerRegistration |
addCellMouseUpHandler(CellMouseUpHandler handler)
Add a cellMouseUp handler. |
HandlerRegistration |
addCellOutHandler(CellOutHandler handler)
Add a cellOut handler. |
HandlerRegistration |
addCellOverHandler(CellOverHandler handler)
Add a cellOver handler. |
HandlerRegistration |
addCellSavedHandler(CellSavedHandler handler)
Add a cellSaved handler. |
void |
addData(Record record)
Perform a DataSource "add" operation to add new records to this component's DataSource. |
void |
addData(Record record,
DSCallback callback)
Perform a DataSource "add" operation to add new records to this component's DataSource. |
void |
addData(Record record,
DSCallback callback,
DSRequest requestProperties)
Perform a DataSource "add" operation to add new records to this component's DataSource. |
HandlerRegistration |
addDataArrivedHandler(DataArrivedHandler handler)
Add a dataArrived handler. |
HandlerRegistration |
addEditCompleteHandler(EditCompleteHandler handler)
Add a editComplete handler. |
HandlerRegistration |
addEditFailedHandler(EditFailedHandler handler)
Add a editFailed handler. |
HandlerRegistration |
addEditorEnterHandler(EditorEnterHandler handler)
Add a editorEnter handler. |
HandlerRegistration |
addEditorExitHandler(EditorExitHandler handler)
Add a editorExit handler. |
HandlerRegistration |
addFieldStateChangedHandler(FieldStateChangedHandler handler)
Add a fieldStateChanged handler. |
void |
addFormulaField()
Convenience method to display a com.smartgwt.client..FormulaBuilder to create a new Formula Field. |
HandlerRegistration |
addHeaderClickHandler(HeaderClickHandler handler)
Add a onHeaderClick handler. |
HandlerRegistration |
addRecordClickHandler(RecordClickHandler handler)
Add a recordClick handler. |
HandlerRegistration |
addRecordDoubleClickHandler(RecordDoubleClickHandler handler)
Add a recordDoubleClick handler. |
HandlerRegistration |
addRecordDropHandler(RecordDropHandler handler)
Add a onRecordDrop handler. |
HandlerRegistration |
addRowContextClickHandler(RowContextClickHandler handler)
Add a rowContextClick handler. |
HandlerRegistration |
addRowEditorEnterHandler(RowEditorEnterHandler handler)
Add a rowEditorEnter handler. |
HandlerRegistration |
addRowEditorExitHandler(RowEditorExitHandler handler)
Add a rowEditorExit handler. |
HandlerRegistration |
addRowHoverHandler(RowHoverHandler handler)
Add a rowHover handler. |
HandlerRegistration |
addRowMouseDownHandler(RowMouseDownHandler handler)
Add a rowMouseDown handler. |
HandlerRegistration |
addRowMouseUpHandler(RowMouseUpHandler handler)
Add a rowMouseUp handler. |
HandlerRegistration |
addRowOutHandler(RowOutHandler handler)
Add a rowOut handler. |
HandlerRegistration |
addRowOverHandler(RowOverHandler handler)
Add a rowOver handler. |
HandlerRegistration |
addSelectionChangedHandler(SelectionChangedHandler handler)
Add a selectionChanged handler. |
void |
addSummaryField()
Convenience method to display a com.smartgwt.client..SummaryBuilder to create a new Summary Field. |
java.lang.Boolean |
anySelected()
Whether at least one item is selected |
void |
cancelEditing()
Cancel the current edit without saving. |
protected boolean |
canEditCell(int rowNum,
int colNum)
Can this cell be edited? |
java.lang.Boolean |
cellHasChanges(int rowNum,
int colNum)
If this listGrid can be edited, this method will return true if the cell passed in has been edited, but the edits have not yet been saved to the ListGrid's data object. |
java.lang.Boolean |
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. |
java.lang.Boolean |
cellHasErrors(int rowNum,
java.lang.String fieldName)
Given a rowNum and a colNum or fieldName, determine whether we currently have stored validation errors for the record/field in question. |
void |
clearCriteria()
Clear the current criteria used to filter data. |
void |
clearCriteria(DSCallback callback,
DSRequest requestProperties)
Clear the current criteria used to filter data. |
void |
clearEditValue(int rowNum,
java.lang.String fieldName)
Clear a field value being tracked as an unsaved user edit. |
void |
clearFieldError(int rowNum,
int colIndex)
Clears any validation errors for some cell. |
void |
clearFieldError(int rowNum,
java.lang.String fieldName)
Clears any validation errors for some cell. |
void |
clearRowErrors(int rowNum)
Clear any stored validation errors for some row |
void |
closeRecord(ListGridRecord record)
Close the inline detail grid assoicated with the record. |
protected com.google.gwt.core.client.JavaScriptObject |
create()
|
void |
deselectAllRecords()
Deselect all records |
void |
deselectRecord(int record)
Deselect a Record passed in explicitly, or by index. |
void |
deselectRecord(Record record)
Deselect a Record passed in explicitly, or by index. |
void |
deselectRecords(int[] records)
Deselect a list of Record s passed in explicitly, or by index. |
void |
deselectRecords(Record[] records)
Deselect a list of Record s passed in explicitly, or by index. |
void |
disableHilite(java.lang.String hiliteID)
Disable a hilite |
void |
disableHiliting()
Disable all hilites. |
void |
discardAllEdits()
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. 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.
|
void |
discardEdits(int rowNum,
int colNum,
boolean dontHideEditor)
Cancel outstanding edits for the specified rows, discarding edit values, and hiding editors if appropriate. Note that if this method is called on a new edit row (created via startEditingNew() for example), which has not yet been saved, this method
will remove the row entirely.
|
void |
enableHilite(java.lang.String hiliteID)
Enable / disable a hilites
|
void |
enableHilite(java.lang.String hiliteID,
boolean enable)
Enable / disable a hilites
|
void |
enableHiliting()
Enable all hilites. |
void |
enableHiliting(boolean enable)
Enable all hilites. |
void |
endEditing()
Complete the current edit by storing the value and hiding the inline editor. |
void |
exportData()
Uses a "fetch" operation on the current dataSource to
retrieve data that matches the current filter and sort criteria for this component, then
exports the resulting data to a file or window in the requested format.
|
void |
exportData(DSRequest requestProperties)
Uses a "fetch" operation on the current dataSource to
retrieve data that matches the current filter and sort criteria for this component, then
exports the resulting data to a file or window in the requested format.
|
void |
fetchData()
Uses a "fetch" operation on the current DataSource to retrieve data that matches
the provided criteria, and displays the matching data in this component. |
void |
fetchData(Criteria criteria)
Uses a "fetch" operation on the current DataSource to retrieve data that matches
the provided criteria, and displays the matching data in this component. |
void |
fetchData(Criteria criteria,
DSCallback callback)
Uses a "fetch" operation on the current DataSource to retrieve data that matches
the provided criteria, and displays the matching data in this component. |
void |
fetchData(Criteria criteria,
DSCallback callback,
DSRequest requestProperties)
Uses a "fetch" operation on the current DataSource to retrieve data that matches
the provided criteria, and displays the matching data in this component. |
void |
fetchRelatedData(Record record,
DataSource dataSource)
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(Record record,
DataSource dataSource,
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 |
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.
|
void |
filterData()
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. |
void |
focusInFilterEditor()
If the filter editor ( showFilterEditor ) is visible for this grid,
this method will explictly put focus into the specified field in the filter editor.
|
void |
focusInFilterEditor(java.lang.String fieldName)
If the filter editor ( showFilterEditor ) is visible for this grid,
this method will explictly put focus into the specified field in the filter editor.
|
void |
freezeField(int colNum)
Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs. |
void |
freezeField(java.lang.String fieldName)
Freeze the indicated field, so that it remains in place and visible when horizontal scrolling occurs. |
java.lang.Boolean |
getAddDropValues()
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. |
java.lang.String |
getAddFormulaFieldText()
Text for a menu item allowing users to add a formula field |
java.lang.String |
getAddOperation()
Operation ID this component should use when performing add operations. |
java.lang.String |
getAddSummaryFieldText()
Text for a menu item allowing users to add a formula field |
java.lang.String |
getAlternateBodyStyleName()
Optional css style to apply to the body if alternateRecordStyles is true
for this grid. |
int |
getAlternateRecordFrequency()
The number of consecutive rows to draw in the same style before alternating, when alternateRowStyles is true. |
java.lang.Boolean |
getAlternateRecordStyles()
Whether alternating rows should be drawn in alternating styles, in order to create a "ledger" effect for easier reading. |
java.lang.Boolean |
getAnimateRemoveRecord()
When canRemoveRecords is enabled, should records be animated out of view
when they are removed by the user? |
int |
getAnimateRemoveSpeed()
When animateRemoveRecord , this property
designates the speed of the animation in pixels per second. |
int |
getAnimateRemoveTime()
When animating record removal animateRemoveRecord , if
animateRemoveSpeed is not
set, this property designates the duration of the animation in ms. |
java.lang.String |
getArrowKeyAction()
Action to perform when the listGrid has keyboard focus (but not editing focus) and a user presses the up or down arrow key. |
java.lang.Boolean |
getAutoFetchAsFilter()
If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData() |
java.lang.Boolean |
getAutoFetchData()
If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on
DataBoundComponent.getAutoFetchAsFilter() . |
java.lang.Boolean |
getAutoFetchDisplayMap()
If true, automatically fetches a valueMap if an optionDataSource is
set for a ListGrid field.
|
Autofit |
getAutoFitData()
Should this ListGrid automatically expand to accomodate its content? |
int |
getAutoFitMaxColumns()
if autoFitData is set to "horizontal" or "both"
this property provides the maximum number of columns for which the ListGrid will expand.
If more columns are present, scrolling will be introduced to reach them as normal.
If unset the ListGrid will expand to accomodate as many columns as are defined for the
grid. |
java.lang.Integer |
getAutoFitMaxHeight()
If autoFitData is set to "vertical" or "both" this
property provides an upper limit on how far the ListGrid will expand vertically to accomodate
its content. |
int |
getAutoFitMaxRecords()
if autoFitData is set to "vertical" or "both" this
property provides the maximum number of records for which the ListGrid will expand. |
java.lang.Integer |
getAutoFitMaxWidth()
If autoFitData is set to "horizontal" or "both"
this property provides an upper limit on how far the ListGrid will expand horizontally to
accomodate its content. |
java.lang.Boolean |
getAutoSaveEdits()
If this ListGrid is editable, should edits be saved out when the user finishes editing a row (or a cell if saveByCell is true).
|
java.lang.String |
getBaseStyle()
The base name for the CSS class applied to cells. |
protected java.lang.String |
getBaseStyle(ListGridRecord record,
int rowNum,
int colNum)
Return the base stylename for this cell. |
java.lang.String |
getBodyBackgroundColor()
Background color applied to the ListGrid body (that is, the area of the grid where data values are rendered). Note that this will typically not be visible to the user unless there are few enough rows that there is visible space in the body below the last row. |
Overflow |
getBodyOverflow()
Overflow setting for the "body", that is, the area of the grid where data values are rendered. |
java.lang.String |
getBodyStyleName()
CSS style used for the body of this grid. |
java.lang.String |
getBooleanFalseImage()
Image to display for a false value in a boolean field. |
int |
getBooleanImageHeight()
Height for the booleanTrueImage and the booleanFalseImage
Note: If booleanTrueImage is unset, the checkedImage
will be used to indicate a true value in a boolean field. |
int |
getBooleanImageWidth()
Width for the booleanTrueImage and booleanFalseImage .
Note: If booleanTrueImage is unset, the checkedImage
will be used to indicate a true value in a boolean field. |
java.lang.String |
getBooleanTrueImage()
Image to display for a true value in a boolean field. |
java.lang.Boolean |
getCanAcceptDroppedRecords()
Indicates whether records can be dropped into this listGrid. |
java.lang.Boolean |
getCanAddFormulaFields()
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 com.smartgwt.client..FormulaBuilder .
|
java.lang.Boolean |
getCanAddSummaryFields()
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 com.smartgwt.client..SummaryBuilder .
|
java.lang.String |
getCancelEditingConfirmationMessage()
If this is an editable listGrid, and this.confirmCancelEditing is true
this property is used as the message to display in the confirmation dismissal prompt. |
java.lang.Boolean |
getCanDragRecordsOut()
Indicates whether records can be dragged from this listGrid and dropped elsewhere. |
java.lang.Boolean |
getCanDragSelect()
If this property is true, users can drag the mouse to select several rows or cells. This is mutually exclusive with rearranging rows or cells by dragging. |
java.lang.Boolean |
getCanEdit()
Can the user edit cells in this listGrid? Can be set for the listGrid, and overridden for individual fields. If 'canEdit' is false at the listGrid level, fields can never be edited - in this case the canEdit property on individual fields will be ignored. If 'canEdit' is set to true at the listGrid level, setting the 'canEdit' property to false at the field level will prevent the field from being edited inline. If 'canEdit' is not set at the listGrid level, setting 'canEdit' to true at the field level enables the field to be edited inline. |
java.lang.Boolean |
getCanFreezeFields()
Whether an interface should be shown to allow user is allowed to dynamically "freeze" or "unfreeze" columns with respect to horizontally scrolling. |
java.lang.Boolean |
getCanGroupBy()
If false, grouping via context menu will be disabled. |
java.lang.Boolean |
getCanHover()
If true, cellHover and rowHover events will fire when the user leaves the mouse over a row / cell. |
java.lang.Boolean |
getCanRemoveRecords()
If set, provide UI for the user to remove records from the grid. |
java.lang.Boolean |
getCanReorderFields()
Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields. |
java.lang.Boolean |
getCanReorderRecords()
Indicates whether records can be reordered by dragging within this listGrid. |
java.lang.Boolean |
getCanResizeFields()
Indicates whether fields in this listGrid can be resized by dragging header fields. |
java.lang.Boolean |
getCanSort()
Enables or disables interactive sorting behavior for this listGrid. |
protected java.lang.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. |
java.lang.String[] |
getCellErrors(int rowNum,
java.lang.String fieldName)
Returns the current set of errors for this cell. |
int |
getCellHeight()
The default height of each row in pixels. |
int |
getCellPadding()
The amount of empty space, in pixels, surrounding each value in its cell. |
java.lang.String |
getCheckboxFieldFalseImage()
If selectionAppearance is set to "checkbox" this property
determines the image to display in the checkbox field for an unselected row.
If unset, the booleanFalseImage will be used. |
java.lang.Integer |
getCheckboxFieldImageHeight()
If selectionAppearance is set to "checkbox" this property
may be set to govern the height of the checkbox image displayed to indicate whether a row is
selected. |
java.lang.Integer |
getCheckboxFieldImageWidth()
If selectionAppearance is set to "checkbox" this property
may be set to govern the width of the checkbox image displayed to indicate whether a row is
selected. |
java.lang.String |
getCheckboxFieldTrueImage()
If selectionAppearance is set to "checkbox" this property
determines the image to display in the checkbox field for a selected row.
If unset, the booleanTrueImage will be used. |
java.lang.Boolean |
getConfirmCancelEditing()
If this is an editable listGrid, when the user attempts to cancel an edit, should we display a confirmation prompt before discarding the edited values for the record? |
java.lang.Boolean |
getConfirmDiscardEdits()
For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded. |
java.lang.String |
getConfirmDiscardEditsMessage()
If this.confirmDiscardEdits is true, this property can be used to customize the
error message string displayed to the user in a dialog with options to
cancel the action, or save or discard pending edits in response to sort/filter actions
that would otherwise drop unsaved edit values. |
Criteria |
getCriteria()
Retrieves the current criteria for this component (may be null) |
int |
getDataPageSize()
When using data paging, how many records to fetch at a time. |
DataSource |
getDataSource()
The DataSource that this component should bind to for default fields and for performing DSRequest .
|
DateDisplayFormat |
getDateFormatter()
Display format to use for fields specified as type 'date'. |
java.lang.String |
getDiscardEditsSaveButtonTitle()
If confirmDiscardEdits is true this is the title for the save button
appearing in the lost edits confirmation dialog. |
Record[] |
getDragData()
During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. |
DragDataAction |
getDragDataAction()
Indicates what to do with data dragged into another DataBoundComponent. |
DragTrackerMode |
getDragTrackerMode()
When records are being dragged from within a ListGrid, what sort of drag-tracker should be displayed? Note that if multiple records are being dragged the displayed tracker will be based on the first selected record. |
java.lang.String |
getDragTrackerStyle()
CSS Style to apply to the drag tracker when dragging occurs on this component. |
java.lang.String |
getDragTrackerTitle(ListGridRecord record,
int rowNum)
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 getTitleField() ) for the record(s) being dragged (including any
icons / custom formatting / styling, etc).
|
float |
getDrawAheadRatio()
How far should we render rows 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 showAllRows is false. |
int |
getDrawAllMaxCells()
If drawing all rows would cause less than drawAllMaxCells cells to be rendered,
the full dataset will instead be drawn even if showAllRecords
is false and the viewport size and drawAheadRatio setting would normally have caused
incremental rendering to be used.
|
java.lang.Integer[] |
getDrawnRows()
Get the rows that are currently drawn (exist in the DOM), as an array of [firstRowNum, lastRowNum]. |
java.util.Map |
getDropValues()
When an item is dropped on this component, and addDropValues is true and both
the source and target widgets are databound, either to the same DataSource or
to different DataSources that are related via a foreign key, this object
provides the "drop values" that SmartGWT will apply to the dropped object
before updating it.
|
java.lang.String |
getDuplicateDragMessage()
Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled. |
java.lang.Boolean |
getEditByCell()
Determines whether when the user edits a cell in this listGrid the entire row becomes editable, or just the cell that recieved the edit event. |
int |
getEditCol()
Returns the index of the column being edited or -1 if there is no edit col. |
java.lang.Object |
getEditedCell(int rowNum,
int colNum)
Returns the current value of a cell. |
java.lang.Object |
getEditedCell(int rowNum,
java.lang.String fieldName)
Returns the current value of a cell. |
java.lang.Object |
getEditedCell(Record record,
int colNum)
Returns the current value of a cell. |
java.lang.Object |
getEditedCell(Record record,
java.lang.String fieldName)
Returns the current value of a cell. |
Record |
getEditedRecord(int rowNum)
Returns the combination of unsaved edits (if any) and original values (if any) for a given row being edited. |
ListGridEditEvent |
getEditEvent()
Event that will trigger inline editing, see ListGridEditEvent for options.
|
java.lang.String |
getEditFailedBaseStyle()
A base name for the CSS class applied to cells when editing has failed. If this listGrid is editable, this style will be applied to any edited cells for which validation failed. As with the default 'baseStyle' property, this style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell. If null, cells for which editing has failed will be rendered using the normal base style classNames, but with custom CSSText applied as derived from this.editFailedCSSText |
java.lang.String |
getEditFailedCSSText()
Custom CSS text to be applied to cells when editing has failed. If this listGrid is editable, this css text will be applied to any edited cells for which validation failed, on top of the base style for the cell. For further customization of styling for cells that failed editing validation, use this.editFailedBaseStyle instead. |
java.lang.String |
getEditFormulaFieldText()
Text for a menu item allowing users to edit a formula field |
java.lang.Boolean |
getEditOnFocus()
Should we start editing when this widget recieves focus (if this ListGrid supports editing)? |
java.lang.String |
getEditPendingBaseStyle()
A base name for the CSS class applied to cells containing pending (unsaved) edits As with the default 'baseStyle' property, this style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell. If this property is null, 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 method should be called only after the widget has been rendered. |
java.lang.String |
getEditPendingCSSText()
Custom CSS text to be applied to cells with pending edits that have not yet been submitted. For further customization of styling for cells with pending edits use this.editPendingBaseStyle instead. |
int |
getEditRow()
Returns the index of the row being edited or -1 if there is no current edit row. |
java.lang.String |
getEditSummaryFieldText()
Text for a menu item allowing users to edit the formatter for a field |
java.lang.Object |
getEditValue(int rowNum,
int colNum)
Returns the current temporary locally stored edit value for some field within a record being edited. |
java.lang.Object |
getEditValue(int rowNum,
java.lang.String fieldName)
Returns the current temporary locally stored edit value for some field within a record being edited. |
java.util.Map |
getEditValues(int rowNum)
Returns the current set of unsaved edits for a given row being edited. |
java.util.Map |
getEditValues(Record record)
Returns the current set of unsaved edits for a given row being edited. |
java.lang.String |
getEmptyCellValue()
The value to display for cells whose value is null or the empty string after applying formatCellValue and valueMap (if any). |
java.lang.String |
getEmptyMessage()
The string to display in the body of a listGrid with an empty data array, if showEmptyMessage is true. |
java.lang.String |
getEmptyMessageStyle()
The CSS style name applied to the emptyMessage if displayed. |
EnterKeyEditAction |
getEnterKeyEditAction()
What to do when a user hits enter while editing a cell: "nextCell": start editing the next editable cell in this record (or the first editable cell in the next record if focus is in the last editable cell in the row) "nextRow": start editing the same field in the next row (skipping any rows where that would be a non-editable cell. "nextRowStart": start editing the first editable cell in the next row. "done": hide the editor (editing is complete) Note that if this.autoSaveEdits is true, this may cause a save of the current edit values |
EscapeKeyEditAction |
getEscapeKeyEditAction()
What to do when a user hits escape while editing a cell: "cancel": close the editor and discard the current set of edit values "done": just close the editor (the edit is complete, but the edited values are retained). Note that if autoSaveEdits is true, this may cause a save of the current edit values |
int |
getEventColumn()
Returns the column number of the most recent mouse event. |
int |
getEventColumn(int x)
Returns the column number of the most recent mouse event. |
int |
getEventRow()
Returns the row number of the most recent mouse event. |
int |
getEventRow(int y)
Returns the row number of the most recent mouse event. |
java.lang.Boolean |
getExportAll()
Setting exportAll to true prevents the component from passing it's list of fields to the export call. |
java.lang.String[] |
getExportFields()
The list of field-names to export. |
int |
getFetchDelay()
If we're showing the filterEditor ( showFilterEditor is true), and we're
re-filtering on every keypress (filterOnKeypress is true), this
property is the delay in milliseconds between the user changing the filter and the
filter request being kicked off. |
java.lang.String |
getFetchOperation()
Operation ID this component should use when performing fetch operations. |
ListGridField |
getField(int colNum)
Given a column number or field name, return the field definition. |
ListGridField |
getField(java.lang.String fieldName)
Given a column number or field name, return the field definition. |
java.lang.String |
getFieldName(int colNum)
Given a column number or field id, return the field name of a field. |
java.lang.String |
getFieldName(java.lang.String fieldName)
Given a column number or field id, return the field name of a field. |
int |
getFieldNum(java.lang.String fieldName)
Given a field or field id, return it's index in the fields array |
ListGridField[] |
getFields()
The ListGrid fields |
java.lang.String |
getFieldState()
Returns a snapshot of the current presentation of this listGrid's fields as a String object.
|
java.lang.String |
getFieldVisibilitySubmenuTitle()
If we're showing a showHeaderContextMenu for this grid, and
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. |
java.lang.Boolean |
getFilterByCell()
If we're showing the filterEditor (this.showFilterEditor is true), this property determines whether this list should be filtered every time the user puts focus in a different field in the filter editor. |
Criteria |
getFilterEditorCriteria()
If showFilterEditor is true, this method will return the criteria currently displayed in the filterEditor . |
int |
getFilterEditorHeight()
Height for the filterEditor, if shown. |
java.lang.Boolean |
getFilterOnKeypress()
If we're showing the filterEditor (this.showFilterEditor is true), this property determines whether this list should be filtered every time the user modifies the value in a field of the filter-editor. |
java.lang.Boolean |
getFixedRecordHeights()
Should we vertically clip cell contents, or allow rows to expand vertically to show all contents? |
int |
getFocusRow()
Get the row that currently has keyboard focus. |
int |
getFormulaFieldValue(ListGridField field,
Record record)
Get the computed value of a canAddFormulaFields . |
java.lang.String |
getFreezeFieldText()
If we're showing a showHeaderContextMenu for this grid and
canFreezeFields is true, this string will be shown as the
title for the menu item to freeze a currently unfrozen field.
|
java.lang.String |
getFreezeOnLeftText()
If we're showing a showHeaderContextMenu for this grid and
canFreezeFields is true, this string will be shown as the
title for the menu item to freeze fields on the left of the scrollable body. |
java.lang.String |
getFreezeOnRightText()
If we're showing a showHeaderContextMenu for this grid and
canFreezeFields is true, this string will be shown as the
title for the menu item to freeze fields on the right of the scrollable body. |
java.lang.String |
getFrozenBaseStyle()
If this listGrid contains any frozen fields, this property can be used to apply a custom baseStyle to all cells in those frozen fields. |
java.lang.String |
getFrozenHeaderBaseStyle()
If this listGrid contains any frozen fields, this property can be used to apply a custom headerBaseStyle to the frozen fields set of fields. |
java.lang.String |
getFrozenHeaderTitleStyle()
If this listGrid contains any frozen fields, this property can be used to apply a custom headerTitleStyle to the frozen fields set of fields. |
java.lang.Boolean |
getGenerateClickOnEnter()
If true, when the user navigates to a cell using arrow keys and hits Enter, the cell will respond to a click event. |
java.lang.Boolean |
getGenerateClickOnSpace()
If true, when the user navigates to a cell using arrow keys and hits space, the cell will respond to a click event. |
java.lang.Boolean |
getGenerateDoubleClickOnEnter()
If true, when the user navigates to a cell using arrow keys and hits Enter, the cell will respond to a double click event. |
java.lang.Boolean |
getGenerateDoubleClickOnSpace()
If true, when the user navigates to a cell using arrow keys and hits Space, the cell will respond to a double click event. |
int |
getGroupByMaxRecords()
Maximum number of records to which a groupBy can be applied. |
java.lang.String |
getGroupByText()
If we're showing a showHeaderContextMenu for this grid and
canGroupBy is true, this string will be shown as the
title for the menu item to toggle the group by setting for a field.
|
java.lang.String |
getGroupIcon()
The URL of the base icon for the group icons in this treegrid. |
int |
getGroupIconSize()
Default width and height of group icons for this ListGrid. |
int |
getGroupIndentSize()
Default number of pixels by which to indent subgroups relative to parent group. |
int |
getGroupLeadingIndent()
Default number of pixels by which to indent all groups. |
java.lang.String |
getGroupNodeStyle()
The CSS style that group rows will have |
java.lang.String |
getHeaderBackgroundColor()
BackgroundColor for the header toolbar. |
java.lang.String |
getHeaderBarStyle()
Set the CSS style used for the header as a whole. |
java.lang.String |
getHeaderBaseStyle()
baseStyle to apply to the buttons in the header, and the sorter, for
this ListGrid.
Note that depending on the headerButtonConstructor of the header
buttons you may also need to set headerTitleStyle . |
protected MenuItem[] |
getHeaderContextMenuItems(java.lang.Integer fieldNum)
If ListGrid.showHeaderContextMenu is true this method returns the menu items to be displayed in the default header context menu. |
int |
getHeaderHeight()
The height of this listGrid's header, in pixels. |
int |
getHeaderMenuButtonHeight()
If showHeaderMenuButton is true, this property governs the height of the
auto-generated headerMenuButton |
java.lang.String |
getHeaderMenuButtonIcon()
If showHeaderMenuButton is true, this property governs the icon shown on the
auto-generated headerMenuButton |
int |
getHeaderMenuButtonIconHeight()
If showHeaderMenuButton is true, this property governs the height of the icon
shown on the auto-generated headerMenuButton |
int |
getHeaderMenuButtonIconWidth()
If showHeaderMenuButton is true, this property governs the width of the icon
shown on the auto-generated headerMenuButton |
int |
getHeaderMenuButtonWidth()
If showHeaderMenuButton is true, this property governs the width of the
auto-generated headerMenuButton |
java.lang.Integer |
getHeaderSpanHeight()
Default height for a headerSpans with no height specified.
|
java.lang.String |
getHeaderTitleStyle()
titleStyle to apply to the buttons in the header, and the sorter,
for this ListGrid.
Note that this will typically only have an effect if
headerButtonConstructor is set to StretchImgButton or a subclass
thereof. |
java.lang.String |
getHiliteProperty()
Marker that can be set on a record to flag that record as hilited. |
java.lang.String |
getHoverStyle()
Style to apply to hovers shown over this grid. |
int |
getImageSize()
Default size of thumbnails shown for fieldTypes image and imageFile. |
Criteria |
getInitialCriteria()
Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used. |
java.lang.Boolean |
getIsGrouped()
True if this listgrid is grouped, false otherwise Note : This method should be called only after the widget has been rendered. |
java.lang.String |
getIsSeparatorProperty()
If record[this.isSeparatorProperty] is set for some record, the
record will be displayed as a simple separator row. |
java.lang.Boolean |
getLeaveScrollbarGap()
Whether to leave a gap for the vertical scrollbar, even when it's not present. |
java.lang.String |
getLinkTextProperty()
Property name on a record that will hold the link text for that record. This property is configurable to avoid possible collision with data values in the record. |
RowEndEditAction |
getListEndEditAction()
If the user is editing the last record in this listGrid, and attempts to navigate beyond the last row either by tabbing off the last editable field, or using the down arrow key, this property determines what action to take: "next": start editing a new record at the end of the list. "done": hide the editor "stop": leave focus in the cell being edited |
java.lang.String |
getLoadingDataMessage()
The string to display in the body of a listGrid while data is being loaded. |
java.lang.String |
getLoadingDataMessageStyle()
The CSS style name applied to the loadingDataMessage string if displayed. |
java.lang.String |
getLoadingMessage()
If you have a databound listGrid and you scroll out of the currently loaded dataset, by default you will see blank rows until the server returns the data for those rows. |
int |
getLongTextEditorThreshold()
When the length of the field specified by length exceeds this
value, the ListGrid shows an edit field of type longTextEditorType
rather than the standard text field when the field enters inline edit mode. |
java.lang.String |
getLongTextEditorType()
When the length of the field specified by length exceeds
this.longTextEditorThreshold show an edit field of this type
rather than the standard text field when the field enters inline edit mode. |
java.lang.Boolean |
getModalEditing()
If this property is true, any mouse click outside of the open cell editors will end editing mode, hiding the cell editors and saving any changes to those cell values. |
java.lang.Boolean |
getNeverValidate()
If true, validation will not occur as a result of cell editing for this grid. |
java.lang.String |
getNullGroupTitle()
Default alias to use for groups with no value |
static ListGrid |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
java.lang.Boolean |
getPreventDuplicates()
If set, detect and prevent duplicate records from being transferred to this component, either via drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent) . |
float |
getQuickDrawAheadRatio()
Alternative to drawAheadRatio , to be used when the user
is rapidly changing the grids viewport (for example drag scrolling through the grid).
If unspecified drawAheadRatio will be used in all cases |
ListGridRecord |
getRecord(int recordNum)
Return the pointer to a particular record by record number. Synonym for com.smartgwt.client.widgets.grid.ListGrid#getCellRecord .
|
java.lang.String |
getRecordBaseStyleProperty()
This attribute allows custom base styles to be displayed on a per-record basis. To specify a custom base-style for some record set record[listGrid.recordBaseStyleProperty] to the desired base style name -
for example if recordBaseStyleProperty is "_baseStyle" , set
record._baseStyle to the custom base style name. |
java.lang.String |
getRecordEditProperty()
Property name on a record that should be checked to determine whether the record may be edited. This property is configurable to avoid possible collision with data values in record. With the default setting of "_canEdit", a record can be set non-editable by ensuring record._canEdit == false. For controlling editability for the entire grid or for a field, set grid.canEdit or field.canEdit. |
java.lang.String |
getRecordEnabledProperty()
Property name on a record that will be checked to determine whether a record is enabled. |
int |
getRecordIndex(ListGridRecord record)
Get the index of the provided record. |
int |
getRecordIndex(Record record)
Get the index of the provided record. |
ListGridRecord[] |
getRecords()
|
java.lang.String |
getRemoveIcon()
When canRemoveRecords is enabled, default icon to show in
the auto-generated field that allows removing records. |
java.lang.String |
getRemoveOperation()
Operation ID this component should use when performing remove operations. |
java.lang.Boolean |
getResizeFieldsInRealTime()
True == we redraw the list viewer in real time as fields are being resized. This can be slow with a large list and/or on some platforms. |
RowEndEditAction |
getRowEndEditAction()
If the user is editing a record in this listGrid, and attempts to navigate to a field beyond the end of the row, via tab (or shift-tab off the first editable field), this property determines what action to take: "next": start editing the next (or previous) record in the list "same": put focus back into the first editable field of the same record. "done": hide the editor "stop": leave focus in the cell being edited |
java.util.Map |
getRowErrors(int rowNum)
Returns any currently stored validation errors for this row |
java.lang.Boolean |
getSaveByCell()
Whether edits should be saved whenever the user moves between cells in the current edit row. |
java.lang.Boolean |
getSaveLocally()
For grids with a specified dataSource , this property can be set to
true to avoid the grid from attempting to save / retrieve data from the
server. |
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. |
ListGridRecord |
getSelectedRecord()
Return the first selected record in this component. This method is appropriate if is
"single" , or if you only care about the first selected record in
a multiple-record selection. |
java.lang.String |
getSelectedState()
Returns a snapshot of the current selection within this listGrid as a String object.This object can be passed to setSelectedState(java.lang.String) to reset this grid's selection
the current state (assuming the same data is present in the grid). |
ListGridRecord[] |
getSelection()
The selection associated with the listGrid. |
SelectionAppearance |
getSelectionAppearance()
How selection of rows should be presented to the user. |
SelectionStyle |
getSelectionType()
Defines a listGrid's clickable-selection behavior. |
java.lang.Boolean |
getSelectOnEdit()
When the user starts editing a row, should the data in that row also be selected? |
java.lang.Boolean |
getShowAllRecords()
Whether all rows should be drawn all at once, or only rows visible in the viewport. Drawing all rows causes longer initial rendering time, but allows smoother vertical scrolling. With a very large number of rows, showAllRows will become too slow. |
java.lang.Boolean |
getShowComplexFields()
Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields .
|
java.lang.Boolean |
getShowDetailFields()
Whether to show fields marked detail:true when a DataBoundComponent is
given a DataSource but no component.fields .
|
java.lang.Boolean |
getShowEmptyMessage()
Indicates whether the text of the emptyMessage property should be displayed if no data is available. |
java.lang.Boolean |
getShowFilterEditor()
Should this listGrid display a filter row. |
java.lang.Boolean |
getShowHeader()
Should we show the header for this ListGrid? |
java.lang.Boolean |
getShowHeaderContextMenu()
Whether to show a context menu on the header with standard items for showing and hiding fields. |
java.lang.Boolean |
getShowHeaderMenuButton()
If set to true and showHeaderContextMenu is true, the
headerMenuButton will be displayed when the user rolls
over the header buttons in this grid. |
java.lang.Boolean |
getShowHiddenFields()
Whether to show fields marked hidden:true when a DataBoundComponent is given a
DataSource but no component.fields .
|
java.lang.Boolean |
getShowHover()
If true, and canHover is also true, when the user hovers over a cell, hover text will pop up next to the mouse. |
java.lang.Boolean |
getShowRollOver()
Should we show different styling for the cell the mouse is over? If true, the cell style will have the suffix "Over" appended. |
SortArrow |
getShowSortArrow()
Indicates whether a sorting arrow should appear for the listGrid, and its location. |
java.lang.Boolean |
getShowTreeColumnPicker()
When headerSpans are in use, whether to show a hierarchical column picker
that includes both headerSpans and normal headers, with normal headers indented under
headerSpans similarly to how a TreeGrid displays a Tree.
|
java.lang.Boolean |
getShrinkForFreeze()
If this list grid is showing any frozen fields, and a horizontal
scrollbar is visible at the bottom of the liquid columns, should an equivalent scrollbar gap
be left visible below the frozen columns?Note that if set to true any backgroundColor or border applied to the ListGrid
will show up below the bottom row of the frozen column(s). |
java.lang.String |
getSingleCellValueProperty()
If record[this.singleCellValueProperty] is set for some record, the
record will be displayed as a single cell spanning every column in the grid, with
contents set to the value of record[this.singleCellValueProperty] . |
java.lang.String |
getSkinImgDir()
Where do 'skin' images (those provided with the class) live? |
ImgProperties |
getSortAscendingImage()
Image to show when sorting ascending. |
ImgProperties |
getSortDescendingImage()
Image to show when sorting descending. |
SortDirection |
getSortDirection()
Sorting direction of this ListGrid. |
java.lang.String |
getSortField()
The field by which this grid should be initially sorted. |
java.lang.String |
getSortFieldAscendingText()
If we're showing a showHeaderContextMenu for this grid, this
attribute will be shown as the menu item title to sort a field in ascending order. |
java.lang.String |
getSortFieldDescendingText()
If we're showing a showHeaderContextMenu for this grid, this
attribute will be shown as the menu item title to sort a field in descending order. |
java.lang.String |
getSortState()
Returns a snapshot of the current sort state (sort field and order) within this listGrid as a String object.This object can be passed to setSortState(java.lang.String) to reset this grid's sort to
the current state (assuming the same fields are present in the grid). |
java.lang.Boolean |
getStopOnErrors()
If this is an editable listGrid, this property determines how failure to save due to validation errors should be displayed to the user. |
java.lang.String |
getStyleName()
Default CSS class |
int |
getSummaryFieldValue(ListGridField field,
Record record)
Get the computed value of a canAddSummaryFields . |
java.lang.String |
getTitleField()
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 check titleField for databound
compounds.For non databound components returns the first defined field name of "title" ,
"name" , or "id" . |
java.lang.String |
getTitleFieldValue(Record record)
Get the value of the titleField for the passed record |
java.lang.String |
getToggleFreezeText(ListGridField field)
If we're showing a showHeaderContextMenu for this grid and
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 |
getTotalRows()
Return the total number of rows in the grid. |
ImgProperties |
getTrackerImage()
Default image to use for the dragTracker when things are dragged within or out of this list. |
java.lang.String |
getUnfreezeFieldText()
If we're showing a showHeaderContextMenu for this grid and
canFreezeFields is true, this string will be shown as the
title for the menu item to unfreeze a currently frozen field.
|
java.lang.String |
getUngroupText()
If we're showing a showHeaderContextMenu for this grid, and
isGrouped is true, this
attribute will be shown as the title for the menu item to ungroup the grid. |
java.lang.String |
getUpdateOperation()
Operation ID this component should use when performing update operations. |
java.lang.Boolean |
getUseAllDataSourceFields()
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.
|
java.lang.Boolean |
getUseFlatFields()
The useFlatFields flag causes all simple type fields anywhere in a nested
set of DataSources to be exposed as a flat list for form binding. |
java.lang.Boolean |
getValidateByCell()
Whether client-side validation checks should be performed when the user moves between cells in the current edit row. |
java.lang.Boolean |
getValidateOnChange()
If true, validation will be perfomed on each edited cell when each editor's "change" handler is fired. |
java.lang.Integer |
getValueIconHeight()
Height for value icons for this listGrid. Overrides valueIconSize .
Can be overridden at the field level |
int |
getValueIconLeftPadding()
How much padding should there be on the left of valueIcons by default Can be overridden at the field level |
int |
getValueIconRightPadding()
How much padding should there be on the right of valueIcons by default |
int |
getValueIconSize()
Default width and height of value icons for this ListGrid. Can be overridden at the listGrid level via explicit valueIconWidth and
valueIconHeight , or at the field level via valueIconSize ,
valueIconWidth and {ListGridField.valueIconHeight} |
java.lang.Integer |
getValueIconWidth()
Width for value icons for this listGrid. Overrides valueIconSize .
Can be overridden at the field level |
java.lang.String |
getViewState()
Returns a snapshot of the current view state of this ListGrid. This includes the field state, sort state and selected state of the grid, returned as a String object.This object can be passed to setViewState(java.lang.String) to reset this grid's vew state
to the current state (assuming the same data / fields are present in the grid). |
java.lang.Integer[] |
getVisibleRows()
Get the rows that are currently visible in the viewport, as an array of [firstRowNum, lastRowNum]. |
java.lang.Boolean |
getWaitForSave()
If this is an editable listGrid, this property determines whether the user will be able to dismiss the edit form, or navigate to another cell while the save is in process (before the asynchronous server response returns). |
java.lang.Boolean |
getWrapCells()
Should content within cells be allowed to wrap? |
void |
groupBy(java.lang.String... fields)
Display the current set of records grouped by their values for the given field or fields. |
java.lang.Boolean |
hasChanges()
Whether the grid as a whole has any unsaved edits, in any row. |
java.lang.Boolean |
hasErrors()
Does this grid currently have errors associated with editValues for any row in the grid. |
void |
hideField(java.lang.String fieldName)
Force a field to be hidden. |
void |
hideField(java.lang.String fieldName,
boolean suppressRelayout)
Force a field to be hidden. |
void |
invalidateCache()
Invalidate the current data cache for this databound component via a call to this.data.invalidateCache() . |
java.lang.Boolean |
isCheckboxField(ListGridField field)
Identifies whether the passed-in field is the specially generated checkboxField used when SelectionAppearance is
"checkbox". |
protected void |
onInit()
|
void |
openRecordDetailGrid(ListGridRecord record,
DataSource detailDataSource)
Open the current record detail grid inline, |
void |
openRecordEditor(ListGridRecord record)
Open the record editor associated with the record. |
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 |
refreshFields()
Re-evaluates com.smartgwt.client.widgets.grid.ListGridField#showIf for each field, dynamically showing and
hiding the appropriate set of fields
|
void |
refreshRow(int rowNum)
Refresh an entire row of cells without redrawing the grid. |
void |
removeData(Record record)
Perform a DataSource "remove" operation to remove records from this component's DataSource. |
void |
removeData(Record record,
DSCallback callback)
Perform a DataSource "remove" operation to remove records from this component's DataSource. |
void |
removeData(Record record,
DSCallback callback,
DSRequest requestProperties)
Perform a DataSource "remove" operation to remove records from this component's DataSource. |
void |
removeSelectedData()
Remove the currently selected records from this component. |
void |
removeSelectedData(DSCallback callback,
DSRequest requestProperties)
Remove the currently selected records from this component. |
void |
reorderField(int fieldNum,
int moveToPosition)
Reorder a particular field |
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. |
void |
resizeField(int fieldNum,
int newWidth)
Resize a particular field to a new width. |
java.lang.Boolean |
rowHasChanges(int rowNum)
If this listGrid can be edited, this method will return true if the row passed in has been edited, but the edits have not yet been saved to the ListGrid's data object. |
java.lang.Boolean |
rowHasErrors(int rowNum)
Does the specified row have unresolved errors? |
void |
saveAllEdits()
Save a number of outstanding edits for this ListGrid. |
void |
scrollBodyTo(java.lang.Integer left,
java.lang.Integer top)
Scroll the body of the grid to the scified coordinates. |
void |
scrollToRow(int rowNum)
Scroll to the specified row number. |
void |
selectAllRecords()
Select all records |
void |
selectRecord(int record)
Select/deselect a Record passed in explicitly, or by index. |
void |
selectRecord(int record,
boolean newState)
Select/deselect a Record passed in explicitly, or by index. |
void |
selectRecord(Record record)
Select/deselect a Record passed in explicitly, or by index. |
void |
selectRecord(Record record,
boolean newState)
Select/deselect a Record passed in explicitly, or by index. |
void |
selectRecords(int[] records)
Select/deselect a list of Record s passed in explicitly, or by index. |
void |
selectRecords(int[] records,
boolean newState)
Select/deselect a list of Record s passed in explicitly, or by index. |
void |
selectRecords(Record[] records)
Select/deselect a list of Record s passed in explicitly, or by index. |
void |
selectRecords(Record[] records,
boolean newState)
Select/deselect a list of Record s passed in explicitly, or by index. |
void |
selectSingleRecord(int rowNum)
Select a single Record passed in explicitly, or by index, and deselect everything else. |
void |
selectSingleRecord(Record record)
Select a single Record passed in explicitly, or by index, and deselect everything else. |
void |
setAddDropValues(java.lang.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. |
void |
setAddFormulaFieldText(java.lang.String addFormulaFieldText)
Text for a menu item allowing users to add a formula field |
void |
setAddOperation(java.lang.String addOperation)
Operation ID this component should use when performing add operations. |
void |
setAddSummaryFieldText(java.lang.String addSummaryFieldText)
Text for a menu item allowing users to add a formula field |
void |
setAlternateBodyStyleName(java.lang.String alternateBodyStyleName)
Optional css style to apply to the body if alternateRecordStyles is true
for this grid. |
void |
setAlternateRecordFrequency(int alternateRecordFrequency)
The number of consecutive rows to draw in the same style before alternating, when alternateRowStyles is true. |
void |
setAlternateRecordStyles(java.lang.Boolean alternateRecordStyles)
Whether alternating rows should be drawn in alternating styles, in order to create a "ledger" effect for easier reading. |
void |
setAnimateRemoveRecord(java.lang.Boolean animateRemoveRecord)
When canRemoveRecords is enabled, should records be animated out of view
when they are removed by the user? |
void |
setAnimateRemoveSpeed(int animateRemoveSpeed)
When animateRemoveRecord , this property
designates the speed of the animation in pixels per second. |
void |
setAnimateRemoveTime(int animateRemoveTime)
When animating record removal animateRemoveRecord , if
animateRemoveSpeed is not
set, this property designates the duration of the animation in ms. |
void |
setArrowKeyAction(java.lang.String arrowKeyAction)
Action to perform when the listGrid has keyboard focus (but not editing focus) and a user presses the up or down arrow key. |
void |
setAutoFetchAsFilter(java.lang.Boolean autoFetchAsFilter)
If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData() |
void |
setAutoFetchData(java.lang.Boolean autoFetchData)
If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on
DataBoundComponent.getAutoFetchAsFilter() . |
void |
setAutoFetchDisplayMap(java.lang.Boolean autoFetchDisplayMap)
If true, automatically fetches a valueMap if an optionDataSource is
set for a ListGrid field.
|
void |
setAutoFitData(Autofit autoFitData)
Should this ListGrid automatically expand to accomodate its content? |
void |
setAutoFitMaxColumns(int autoFitMaxColumns)
if autoFitData is set to "horizontal" or "both"
this property provides the maximum number of columns for which the ListGrid will expand.
If more columns are present, scrolling will be introduced to reach them as normal.
If unset the ListGrid will expand to accomodate as many columns as are defined for the
grid. |
void |
setAutoFitMaxHeight(java.lang.Integer autoFitMaxHeight)
If autoFitData is set to "vertical" or "both" this
property provides an upper limit on how far the ListGrid will expand vertically to accomodate
its content. |
void |
setAutoFitMaxRecords(int autoFitMaxRecords)
if autoFitData is set to "vertical" or "both" this
property provides the maximum number of records for which the ListGrid will expand. |
void |
setAutoFitMaxWidth(java.lang.Integer autoFitMaxWidth)
If autoFitData is set to "horizontal" or "both"
this property provides an upper limit on how far the ListGrid will expand horizontally to
accomodate its content. |
void |
setAutoSaveEdits(java.lang.Boolean autoSaveEdits)
If this ListGrid is editable, should edits be saved out when the user finishes editing a row (or a cell if saveByCell is true).
|
void |
setBaseStyle(java.lang.String baseStyle)
The base name for the CSS class applied to cells. |
void |
setBodyBackgroundColor(java.lang.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. |
void |
setBodyOverflow(Overflow bodyOverflow)
Overflow setting for the "body", that is, the area of the grid where data values are rendered. |
void |
setBodyStyleName(java.lang.String bodyStyleName)
CSS style used for the body of this grid. |
void |
setBooleanFalseImage(java.lang.String booleanFalseImage)
Image to display for a false value in a boolean field. |
void |
setBooleanImageHeight(int booleanImageHeight)
Height for the booleanTrueImage and the booleanFalseImage
Note: If booleanTrueImage is unset, the checkedImage
will be used to indicate a true value in a boolean field. |
void |
setBooleanImageWidth(int booleanImageWidth)
Width for the booleanTrueImage and booleanFalseImage .
Note: If booleanTrueImage is unset, the checkedImage
will be used to indicate a true value in a boolean field. |
void |
setBooleanTrueImage(java.lang.String booleanTrueImage)
Image to display for a true value in a boolean field. |
void |
setCanAcceptDroppedRecords(java.lang.Boolean canAcceptDroppedRecords)
Indicates whether records can be dropped into this listGrid. |
void |
setCanAddFormulaFields(java.lang.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 com.smartgwt.client..FormulaBuilder .
|
void |
setCanAddSummaryFields(java.lang.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 com.smartgwt.client..SummaryBuilder .
|
void |
setCancelEditingConfirmationMessage(java.lang.String cancelEditingConfirmationMessage)
If this is an editable listGrid, and this.confirmCancelEditing is true
this property is used as the message to display in the confirmation dismissal prompt. |
void |
setCanDragRecordsOut(java.lang.Boolean canDragRecordsOut)
Indicates whether records can be dragged from this listGrid and dropped elsewhere. |
void |
setCanDragSelect(java.lang.Boolean canDragSelect)
If this property is true, users can drag the mouse to select several rows or cells. This is mutually exclusive with rearranging rows or cells by dragging. |
void |
setCanEdit(java.lang.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. If 'canEdit' is not set at the listGrid level, setting 'canEdit' to true at the field level enables the field to be edited inline. |
void |
setCanFreezeFields(java.lang.Boolean canFreezeFields)
Whether an interface should be shown to allow user is allowed to dynamically "freeze" or "unfreeze" columns with respect to horizontally scrolling. |
void |
setCanGroupBy(java.lang.Boolean canGroupBy)
If false, grouping via context menu will be disabled. |
void |
setCanHover(java.lang.Boolean canHover)
If true, cellHover and rowHover events will fire when the user leaves the mouse over a row / cell. |
void |
setCanRemoveRecords(java.lang.Boolean canRemoveRecords)
If set, provide UI for the user to remove records from the grid. |
void |
setCanReorderFields(java.lang.Boolean canReorderFields)
Indicates whether fields in this listGrid can be reordered by dragging and dropping header fields. |
void |
setCanReorderRecords(java.lang.Boolean canReorderRecords)
Indicates whether records can be reordered by dragging within this listGrid. |
void |
setCanResizeFields(java.lang.Boolean canResizeFields)
Indicates whether fields in this listGrid can be resized by dragging header fields. |
void |
setCanSort(java.lang.Boolean canSort)
Enables or disables interactive sorting behavior for this listGrid. |
void |
setCellHeight(int cellHeight)
The default height of each row in pixels. |
void |
setCellPadding(int cellPadding)
The amount of empty space, in pixels, surrounding each value in its cell. |
void |
setCheckboxFieldFalseImage(java.lang.String checkboxFieldFalseImage)
If selectionAppearance is set to "checkbox" this property
determines the image to display in the checkbox field for an unselected row.
If unset, the booleanFalseImage will be used. |
void |
setCheckboxFieldImageHeight(java.lang.Integer checkboxFieldImageHeight)
If selectionAppearance is set to "checkbox" this property
may be set to govern the height of the checkbox image displayed to indicate whether a row is
selected. |
void |
setCheckboxFieldImageWidth(java.lang.Integer checkboxFieldImageWidth)
If selectionAppearance is set to "checkbox" this property
may be set to govern the width of the checkbox image displayed to indicate whether a row is
selected. |
void |
setCheckboxFieldTrueImage(java.lang.String checkboxFieldTrueImage)
If selectionAppearance is set to "checkbox" this property
determines the image to display in the checkbox field for a selected row.
If unset, the booleanTrueImage will be used. |
void |
setConfirmCancelEditing(java.lang.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? |
void |
setConfirmDiscardEdits(java.lang.Boolean confirmDiscardEdits)
For editable listGrids, outstanding unsaved edits when the user performs a new filter or sort will be discarded. |
void |
setConfirmDiscardEditsMessage(java.lang.String confirmDiscardEditsMessage)
If this.confirmDiscardEdits is true, this property can be used to customize the
error message string displayed to the user in a dialog with options to
cancel the action, or save or discard pending edits in response to sort/filter actions
that would otherwise drop unsaved edit values. |
void |
setCriteria(Criteria criteria)
Sets this component's filter criteria. |
void |
setData(ListGridRecord[] records)
A List of ListGridRecord objects, specifying the data to be used to populate the ListGrid. |
void |
setData(Record[] data)
An array of Record objects, specifying the data to be used to populate the DataBoundComponent. |
void |
setDataPageSize(int dataPageSize)
When using data paging, how many records to fetch at a time. |
void |
setDataSource(DataSource dataSource)
The DataSource that this component should bind to for default fields and for performing DSRequest .
|
void |
setDateFormatter(DateDisplayFormat dateFormatter)
Display format to use for fields specified as type 'date'. |
void |
setDateInputFormat(java.lang.String dateInputFormat)
If this is an editable listGrid, this property will specify the inputFormat
applied to editors for fields of type "date"
3 character string containing the "M", "D" and "Y" characters to indicate the format of strings being parsed into Date instances via Date.parseInput(). |
void |
setDiscardEditsSaveButtonTitle(java.lang.String discardEditsSaveButtonTitle)
If confirmDiscardEdits is true this is the title for the save button
appearing in the lost edits confirmation dialog. |
void |
setDragDataAction(DragDataAction dragDataAction)
Indicates what to do with data dragged into another DataBoundComponent. |
void |
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. |
void |
setDragTrackerStyle(java.lang.String dragTrackerStyle)
CSS Style to apply to the drag tracker when dragging occurs on this component. |
void |
setDrawAheadRatio(float drawAheadRatio)
How far should we render rows 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 showAllRows is false. |
void |
setDrawAllMaxCells(int drawAllMaxCells)
If drawing all rows would cause less than drawAllMaxCells cells to be rendered,
the full dataset will instead be drawn even if showAllRecords
is false and the viewport size and drawAheadRatio setting would normally have caused
incremental rendering to be used.
|
void |
setDropValues(java.util.Map dropValues)
When an item is dropped on this component, and addDropValues is true and both
the source and target widgets are databound, either to the same DataSource or
to different DataSources that are related via a foreign key, this object
provides the "drop values" that SmartGWT will apply to the dropped object
before updating it.
|
void |
setDuplicateDragMessage(java.lang.String duplicateDragMessage)
Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled. |
void |
setEditByCell(java.lang.Boolean editByCell)
Determines whether when the user edits a cell in this listGrid the entire row becomes editable, or just the cell that recieved the edit event. |
void |
setEditEvent(ListGridEditEvent editEvent)
Event that will trigger inline editing, see ListGridEditEvent for options.
|
void |
setEditFailedBaseStyle(java.lang.String editFailedBaseStyle)
A base name for the CSS class applied to cells when editing has failed. If this listGrid is editable, this style will be applied to any edited cells for which validation failed. As with the default 'baseStyle' property, this style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell. If null, cells for which editing has failed will be rendered using the normal base style classNames, but with custom CSSText applied as derived from this.editFailedCSSText |
void |
setEditFailedCSSText(java.lang.String editFailedCSSText)
Custom CSS text to be applied to cells when editing has failed. If this listGrid is editable, this css text will be applied to any edited cells for which validation failed, on top of the base style for the cell. For further customization of styling for cells that failed editing validation, use this.editFailedBaseStyle instead. |
void |
setEditFormulaFieldText(java.lang.String editFormulaFieldText)
Text for a menu item allowing users to edit a formula field |
void |
setEditOnFocus(java.lang.Boolean editOnFocus)
Should we start editing when this widget recieves focus (if this ListGrid supports editing)? |
void |
setEditPendingCSSText(java.lang.String editPendingCSSText)
Custom CSS text to be applied to cells with pending edits that have not yet been submitted. For further customization of styling for cells with pending edits use this.editPendingBaseStyle instead. |
void |
setEditSummaryFieldText(java.lang.String editSummaryFieldText)
Text for a menu item allowing users to edit the formatter for a field |
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,
java.util.Date 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,
java.lang.String value)
Modifies a field value being tracked as an unsaved user edit. |
void |
setEditValue(int rowNum,
java.lang.String fieldName,
boolean value)
Modifies a field value being tracked as an unsaved user edit. |
void |
setEditValue(int rowNum,
java.lang.String fieldName,
java.util.Date value)
Modifies a field value being tracked as an unsaved user edit. |
void |
setEditValue(int rowNum,
java.lang.String fieldName,
double value)
Modifies a field value being tracked as an unsaved user edit. |
void |
setEditValue(int rowNum,
java.lang.String fieldName,
float value)
Modifies a field value being tracked as an unsaved user edit. |
void |
setEditValue(int rowNum,
java.lang.String fieldName,
int value)
Modifies a field value being tracked as an unsaved user edit. |
void |
setEditValue(int rowNum,
java.lang.String fieldName,
java.lang.String value)
Modifies a field value being tracked as an unsaved user edit. |
void |
setEditValues(int rowNum,
java.util.Map values)
This method sets up a set of editValues for some row / cell. |
void |
setEmptyCellValue(java.lang.String emptyCellValue)
The value to display for cells whose value is null or the empty string after applying formatCellValue and valueMap (if any). |
void |
setEmptyMessage(java.lang.String emptyMessage)
The string to display in the body of a listGrid with an empty data array, if showEmptyMessage is true. |
void |
setEmptyMessageStyle(java.lang.String emptyMessageStyle)
The CSS style name applied to the emptyMessage if displayed. |
void |
setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
What to do when a user hits enter while editing a cell: "nextCell": start editing the next editable cell in this record (or the first editable cell in the next record if focus is in the last editable cell in the row) "nextRow": start editing the same field in the next row (skipping any rows where that would be a non-editable cell. "nextRowStart": start editing the first editable cell in the next row. "done": hide the editor (editing is complete) Note that if this.autoSaveEdits is true, this may cause a save of the current edit values |
void |
setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
What to do when a user hits escape while editing a cell: "cancel": close the editor and discard the current set of edit values "done": just close the editor (the edit is complete, but the edited values are retained). Note that if autoSaveEdits is true, this may cause a save of the current edit values |
void |
setExportAll(java.lang.Boolean exportAll)
Setting exportAll to true prevents the component from passing it's list of fields to the export call. |
void |
setExportFields(java.lang.String[] exportFields)
The list of field-names to export. |
void |
setFastCellUpdates(java.lang.Boolean fastCellUpdates)
Whether to speed up dynamic styling at the expense of slightly slower drawing. |
void |
setFetchDelay(int fetchDelay)
If we're showing the filterEditor ( showFilterEditor is true), and we're
re-filtering on every keypress (filterOnKeypress is true), this
property is the delay in milliseconds between the user changing the filter and the
filter request being kicked off. |
void |
setFetchOperation(java.lang.String fetchOperation)
Operation ID this component should use when performing fetch operations. |
void |
setFieldError(int rowNum,
java.lang.String fieldName,
java.lang.String errorMessage)
Set a validation error for some cell. |
void |
setFieldError(int rowNum,
java.lang.String fieldName,
java.lang.String[] errorMessages)
Set a validation error for some cell. |
void |
setFields(ListGridField... fields)
An array of field objects, specifying the order, layout, formatting, and sorting behavior of each field in the listGrid object. |
void |
setFieldState(java.lang.String fieldState)
Sets some presentation properties (visibility, width, userFormula and userSummary) of the listGrid fields based on the String object passed in.Used to restore previous state retrieved from the grid by a call to getFieldState() .
|
void |
setFieldTitle(int fieldNum,
java.lang.String title)
Change the title of a field after the grid is created. |
void |
setFieldTitle(java.lang.String fieldName,
java.lang.String title)
Change the title of a field after the grid is created. |
void |
setFieldVisibilitySubmenuTitle(java.lang.String fieldVisibilitySubmenuTitle)
If we're showing a showHeaderContextMenu for this grid, and
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. |
void |
setFilterByCell(java.lang.Boolean filterByCell)
If we're showing the filterEditor (this.showFilterEditor is true), this property determines whether this list should be filtered every time the user puts focus in a different field in the filter editor. |
void |
setFilterEditorCriteria(Criteria criteria)
If showFilterEditor is true, this method will update the criteria shown in the filterEditor without performing a filter. |
void |
setFilterEditorHeight(int filterEditorHeight)
Height for the filterEditor, if shown. |
void |
setFilterOnKeypress(java.lang.Boolean filterOnKeypress)
If we're showing the filterEditor (this.showFilterEditor is true), this property determines whether this list should be filtered every time the user modifies the value in a field of the filter-editor. |
void |
setFixedRecordHeights(java.lang.Boolean fixedRecordHeights)
Should we vertically clip cell contents, or allow rows to expand vertically to show all contents? |
void |
setFreezeFieldText(java.lang.String freezeFieldText)
If we're showing a showHeaderContextMenu for this grid and
canFreezeFields is true, this string will be shown as the
title for the menu item to freeze a currently unfrozen field.
|
void |
setFreezeOnLeftText(java.lang.String freezeOnLeftText)
If we're showing a showHeaderContextMenu for this grid and
canFreezeFields is true, this string will be shown as the
title for the menu item to freeze fields on the left of the scrollable body. |
void |
setFreezeOnRightText(java.lang.String freezeOnRightText)
If we're showing a showHeaderContextMenu for this grid and
canFreezeFields is true, this string will be shown as the
title for the menu item to freeze fields on the right of the scrollable body. |
void |
setFrozenBaseStyle(java.lang.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. |
void |
setFrozenHeaderBaseStyle(java.lang.String frozenHeaderBaseStyle)
If this listGrid contains any frozen fields, this property can be used to apply a custom headerBaseStyle to the frozen fields set of fields. |
void |
setFrozenHeaderTitleStyle(java.lang.String frozenHeaderTitleStyle)
If this listGrid contains any frozen fields, this property can be used to apply a custom headerTitleStyle to the frozen fields set of fields. |
void |
setGenerateClickOnEnter(java.lang.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. |
void |
setGenerateClickOnSpace(java.lang.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. |
void |
setGenerateDoubleClickOnEnter(java.lang.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. |
void |
setGenerateDoubleClickOnSpace(java.lang.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. |
void |
setGroupByField(java.lang.String field)
List of fields to group grid records. |
void |
setGroupByMaxRecords(int groupByMaxRecords)
Maximum number of records to which a groupBy can be applied. |
void |
setGroupByText(java.lang.String groupByText)
If we're showing a showHeaderContextMenu for this grid and
canGroupBy is true, this string will be shown as the
title for the menu item to toggle the group by setting for a field.
|
void |
setGroupIcon(java.lang.String groupIcon)
The URL of the base icon for the group icons in this treegrid. |
void |
setGroupIconSize(int groupIconSize)
Default width and height of group icons for this ListGrid. |
void |
setGroupIndentSize(int groupIndentSize)
Default number of pixels by which to indent subgroups relative to parent group. |
void |
setGroupLeadingIndent(int groupLeadingIndent)
Default number of pixels by which to indent all groups. |
void |
setGroupNodeStyle(java.lang.String groupNodeStyle)
The CSS style that group rows will have |
void |
setGroupStartOpen(java.lang.String... groupValues)
|
void |
setGroupStartOpen(java.lang.String group)
Describes the default state of ListGrid groups when groupBy is called. |
void |
setHeaderBackgroundColor(java.lang.String headerBackgroundColor)
BackgroundColor for the header toolbar. |
void |
setHeaderBarStyle(java.lang.String headerBarStyle)
Set the CSS style used for the header as a whole. |
void |
setHeaderBaseStyle(java.lang.String headerBaseStyle)
baseStyle to apply to the buttons in the header, and the sorter, for
this ListGrid.
Note that depending on the headerButtonConstructor of the header
buttons you may also need to set headerTitleStyle . |
void |
setHeaderHeight(int headerHeight)
The height of this listGrid's header, in pixels. |
void |
setHeaderMenuButtonHeight(int headerMenuButtonHeight)
If showHeaderMenuButton is true, this property governs the height of the
auto-generated headerMenuButton |
void |
setHeaderMenuButtonIcon(java.lang.String headerMenuButtonIcon)
If showHeaderMenuButton is true, this property governs the icon shown on the
auto-generated headerMenuButton |
void |
setHeaderMenuButtonIconHeight(int headerMenuButtonIconHeight)
If showHeaderMenuButton is true, this property governs the height of the icon
shown on the auto-generated headerMenuButton |
void |
setHeaderMenuButtonIconWidth(int headerMenuButtonIconWidth)
If showHeaderMenuButton is true, this property governs the width of the icon
shown on the auto-generated headerMenuButton |
void |
setHeaderMenuButtonWidth(int headerMenuButtonWidth)
If showHeaderMenuButton is true, this property governs the width of the
auto-generated headerMenuButton |
void |
setHeaderSpanHeight(java.lang.Integer headerSpanHeight)
Default height for a headerSpans with no height specified.
|
void |
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(java.lang.String name,
java.lang.String newTitle)
Update the title of a headerSpans dynamically.
|
void |
setHeaderTitleStyle(java.lang.String headerTitleStyle)
titleStyle to apply to the buttons in the header, and the sorter,
for this ListGrid.
Note that this will typically only have an effect if
headerButtonConstructor is set to StretchImgButton or a subclass
thereof. |
void |
setHiliteProperty(java.lang.String hiliteProperty)
Marker that can be set on a record to flag that record as hilited. |
void |
setHoverStyle(java.lang.String hoverStyle)
Style to apply to hovers shown over this grid. |
void |
setImageSize(int imageSize)
Default size of thumbnails shown for fieldTypes image and imageFile. |
void |
setInitialCriteria(Criteria initialCriteria)
Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used. |
void |
setIsSeparatorProperty(java.lang.String isSeparatorProperty)
If record[this.isSeparatorProperty] is set for some record, the
record will be displayed as a simple separator row. |
void |
setLeaveScrollbarGap(java.lang.Boolean leaveScrollbarGap)
Whether to leave a gap for the vertical scrollbar, even when it's not present. |
void |
setLinkTextProperty(java.lang.String linkTextProperty)
Property name on a record that will hold the link text for that record. This property is configurable to avoid possible collision with data values in the record. |
void |
setListEndEditAction(RowEndEditAction listEndEditAction)
If the user is editing the last record in this listGrid, and attempts to navigate beyond the last row either by tabbing off the last editable field, or using the down arrow key, this property determines what action to take: "next": start editing a new record at the end of the list. "done": hide the editor "stop": leave focus in the cell being edited |
void |
setLoadingDataMessage(java.lang.String loadingDataMessage)
The string to display in the body of a listGrid while data is being loaded. |
void |
setLoadingDataMessageStyle(java.lang.String loadingDataMessageStyle)
The CSS style name applied to the loadingDataMessage string if displayed. |
void |
setLoadingMessage(java.lang.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. |
void |
setLongTextEditorThreshold(int longTextEditorThreshold)
When the length of the field specified by length exceeds this
value, the ListGrid shows an edit field of type longTextEditorType
rather than the standard text field when the field enters inline edit mode. |
void |
setLongTextEditorType(java.lang.String longTextEditorType)
When the length of the field specified by length exceeds
this.longTextEditorThreshold show an edit field of this type
rather than the standard text field when the field enters inline edit mode. |
void |
setModalEditing(java.lang.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. |
void |
setNeverValidate(java.lang.Boolean neverValidate)
If true, validation will not occur as a result of cell editing for this grid. |
void |
setNullGroupTitle(java.lang.String nullGroupTitle)
Default alias to use for groups with no value |
void |
setPreventDuplicates(java.lang.Boolean preventDuplicates)
If set, detect and prevent duplicate records from being transferred to this component, either via drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent) . |
void |
setQuickDrawAheadRatio(float quickDrawAheadRatio)
Alternative to drawAheadRatio , to be used when the user
is rapidly changing the grids viewport (for example drag scrolling through the grid).
If unspecified drawAheadRatio will be used in all cases |
void |
setRecordBaseStyleProperty(java.lang.String recordBaseStyleProperty)
This attribute allows custom base styles to be displayed on a per-record basis. To specify a custom base-style for some record set record[listGrid.recordBaseStyleProperty] to the desired base style name -
for example if recordBaseStyleProperty is "_baseStyle" , set
record._baseStyle to the custom base style name. |
void |
setRecordEditProperty(java.lang.String recordEditProperty)
Property name on a record that should be checked to determine whether the record may be edited. This property is configurable to avoid possible collision with data values in record. With the default setting of "_canEdit", a record can be set non-editable by ensuring record._canEdit == false. For controlling editability for the entire grid or for a field, set grid.canEdit or field.canEdit. |
void |
setRecordEnabledProperty(java.lang.String recordEnabledProperty)
Property name on a record that will be checked to determine whether a record is enabled. |
void |
setRecords(ListGridRecord[] records)
Synonym for setData(ListGridRecord[]) |
void |
setRemoveIcon(java.lang.String removeIcon)
When canRemoveRecords is enabled, default icon to show in
the auto-generated field that allows removing records. |
void |
setRemoveOperation(java.lang.String removeOperation)
Operation ID this component should use when performing remove operations. |
void |
setResizeFieldsInRealTime(java.lang.Boolean resizeFieldsInRealTime)
True == we redraw the list viewer in real time as fields are being resized. This can be slow with a large list and/or on some platforms. |
void |
setRowEndEditAction(RowEndEditAction rowEndEditAction)
If the user is editing a record in this listGrid, and attempts to navigate to a field beyond the end of the row, via tab (or shift-tab off the first editable field), this property determines what action to take: "next": start editing the next (or previous) record in the list "same": put focus back into the first editable field of the same record. "done": hide the editor "stop": leave focus in the cell being edited |
void |
setRowErrors(int rowNum,
java.util.Map errors)
Set the validation errors for some row (replacing any pre-existant validation errors) |
void |
setSaveByCell(java.lang.Boolean saveByCell)
Whether edits should be saved whenever the user moves between cells in the current edit row. |
void |
setSaveLocally(java.lang.Boolean saveLocally)
For grids with a specified dataSource , this property can be set to
true to avoid the grid from attempting to save / retrieve data from the
server. |
void |
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. |
void |
setSelectedState(java.lang.String selectedState)
Reset this grid's selection to match the String object passed in.Used to restore previous state retrieved from the grid by a call to getSelectedState() .
|
void |
setSelectionAppearance(SelectionAppearance selectionAppearance)
How selection of rows should be presented to the user. |
void |
setSelectionType(SelectionStyle selectionType)
Defines a listGrid's clickable-selection behavior. |
void |
setSelectOnEdit(java.lang.Boolean selectOnEdit)
When the user starts editing a row, should the data in that row also be selected? |
void |
setShowAllRecords(java.lang.Boolean showAllRecords)
Whether all rows should be drawn all at once, or only rows visible in the viewport. Drawing all rows causes longer initial rendering time, but allows smoother vertical scrolling. With a very large number of rows, showAllRows will become too slow. |
void |
setShowComplexFields(java.lang.Boolean showComplexFields)
Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields .
|
void |
setShowDetailFields(java.lang.Boolean showDetailFields)
Whether to show fields marked detail:true when a DataBoundComponent is
given a DataSource but no component.fields .
|
void |
setShowEmptyMessage(java.lang.Boolean showEmptyMessage)
Indicates whether the text of the emptyMessage property should be displayed if no data is available. |
void |
setShowFilterEditor(java.lang.Boolean showFilterEditor)
Should this listGrid display a filter row. |
void |
setShowHeader(java.lang.Boolean showHeader)
Should we show the header for this ListGrid? Show or hide the ListGrid header. |
void |
setShowHeaderContextMenu(java.lang.Boolean showHeaderContextMenu)
Whether to show a context menu on the header with standard items for showing and hiding fields. |
void |
setShowHeaderMenuButton(java.lang.Boolean showHeaderMenuButton)
If set to true and showHeaderContextMenu is true, the
headerMenuButton will be displayed when the user rolls
over the header buttons in this grid. |
void |
setShowHiddenFields(java.lang.Boolean showHiddenFields)
Whether to show fields marked hidden:true when a DataBoundComponent is given a
DataSource but no component.fields .
|
void |
setShowHover(java.lang.Boolean showHover)
If true, and canHover is also true, when the user hovers over a cell, hover text will pop up next to the mouse. |
void |
setShowRollOver(java.lang.Boolean showRollOver)
Should we show different styling for the cell the mouse is over? If true, the cell style will have the suffix "Over" appended. |
void |
setShowSortArrow(SortArrow showSortArrow)
Indicates whether a sorting arrow should appear for the listGrid, and its location. |
void |
setShowTreeColumnPicker(java.lang.Boolean showTreeColumnPicker)
When headerSpans are in use, whether to show a hierarchical column picker
that includes both headerSpans and normal headers, with normal headers indented under
headerSpans similarly to how a TreeGrid displays a Tree.
|
void |
setShrinkForFreeze(java.lang.Boolean shrinkForFreeze)
If this list grid is showing any frozen fields, and a horizontal
scrollbar is visible at the bottom of the liquid columns, should an equivalent scrollbar gap
be left visible below the frozen columns?Note that if set to true any backgroundColor or border applied to the ListGrid
will show up below the bottom row of the frozen column(s). |
void |
setSingleCellValueProperty(java.lang.String singleCellValueProperty)
If record[this.singleCellValueProperty] is set for some record, the
record will be displayed as a single cell spanning every column in the grid, with
contents set to the value of record[this.singleCellValueProperty] . |
void |
setSkinImgDir(java.lang.String skinImgDir)
Where do 'skin' images (those provided with the class) live? |
void |
setSortAscendingImage(ImgProperties sortAscendingImage)
Image to show when sorting ascending. |
void |
setSortDescendingImage(ImgProperties sortDescendingImage)
Image to show when sorting descending. |
void |
setSortDirection(SortDirection sortDirection)
Sorting direction of this ListGrid. |
void |
setSortField(int fieldIndex)
Specifies the field by which this grid should be initially sorted. |
void |
setSortField(java.lang.String fieldName)
Specifies the field by which this grid should be initially sorted. |
void |
setSortFieldAscendingText(java.lang.String sortFieldAscendingText)
If we're showing a showHeaderContextMenu for this grid, this
attribute will be shown as the menu item title to sort a field in ascending order. |
void |
setSortFieldDescendingText(java.lang.String sortFieldDescendingText)
If we're showing a showHeaderContextMenu for this grid, this
attribute will be shown as the menu item title to sort a field in descending order. |
void |
setSortState(java.lang.String sortState)
Reset this grid's sort state (sort field and direction) to match the String object passed in.Used to restore previous state retrieved from the grid by a call to getSortState() .
|
void |
setStopOnErrors(java.lang.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. |
void |
setStyleName(java.lang.String styleName)
Default CSS class |
void |
setTitleField(java.lang.String titleField)
|
void |
setTrackerImage(ImgProperties trackerImage)
Default image to use for the dragTracker when things are dragged within or out of this list. |
void |
setUnfreezeFieldText(java.lang.String unfreezeFieldText)
If we're showing a showHeaderContextMenu for this grid and
canFreezeFields is true, this string will be shown as the
title for the menu item to unfreeze a currently frozen field.
|
void |
setUngroupText(java.lang.String ungroupText)
If we're showing a showHeaderContextMenu for this grid, and
isGrouped is true, this
attribute will be shown as the title for the menu item to ungroup the grid. |
void |
setUpdateOperation(java.lang.String updateOperation)
Operation ID this component should use when performing update operations. |
void |
setUseAllDataSourceFields(java.lang.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.
|
void |
setUseFlatFields(java.lang.Boolean useFlatFields)
The useFlatFields flag causes all simple type fields anywhere in a nested
set of DataSources to be exposed as a flat list for form binding. |
void |
setValidateByCell(java.lang.Boolean validateByCell)
Whether client-side validation checks should be performed when the user moves between cells in the current edit row. |
void |
setValidateOnChange(java.lang.Boolean validateOnChange)
If true, validation will be perfomed on each edited cell when each editor's "change" handler is fired. |
void |
setValueIconHeight(java.lang.Integer valueIconHeight)
Height for value icons for this listGrid. Overrides valueIconSize .
Can be overridden at the field level |
void |
setValueIconLeftPadding(int valueIconLeftPadding)
How much padding should there be on the left of valueIcons by default Can be overridden at the field level |
void |
setValueIconRightPadding(int valueIconRightPadding)
How much padding should there be on the right of valueIcons by default |
void |
setValueIconSize(int valueIconSize)
Default width and height of value icons for this ListGrid. Can be overridden at the listGrid level via explicit valueIconWidth and
valueIconHeight , or at the field level via valueIconSize ,
valueIconWidth and {ListGridField.valueIconHeight} |
void |
setValueIconWidth(java.lang.Integer valueIconWidth)
Width for value icons for this listGrid. Overrides valueIconSize .
Can be overridden at the field level |
void |
setValueMap(java.lang.String fieldName,
java.util.LinkedHashMap valueMap)
Set the value map for a field. See also the com.smartgwt.client.widgets.grid.ListGrid#setEditorValueMap
and com.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap methods which allow further
customization of the valueMap displayed while the field is in edit mode.
|
void |
setViewState(java.lang.String viewState)
Reset this grid's view state to match the String object passed in.Used to restore previous state retrieved from the grid by a call to getViewState() .
|
void |
setWaitForSave(java.lang.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). |
void |
setWrapCells(java.lang.Boolean wrapCells)
Should content within cells be allowed to wrap? |
void |
showField(java.lang.String fieldName)
Force a field to be shown. |
void |
showField(java.lang.String fieldName,
boolean suppressRelayout)
Force a field to be shown. |
java.lang.Boolean |
sort()
Sort the the data by the first sortable column. |
java.lang.Boolean |
sort(int sortCol,
SortDirection sortDirection)
Sorts a listGrid explicitly by the column given by sortFieldNum, if provided, in ascending or descending order if specified by sortDirection. |
java.lang.Boolean |
sort(java.lang.String sortField,
SortDirection sortDirection)
Sorts a listGrid explicitly by the column given by sortFieldNum, if provided, in ascending or descending order if specified by sortDirection. |
java.lang.Boolean |
startEditing()
Start inline editing at the provided coordinates. |
java.lang.Boolean |
startEditing(int rowNum,
int colNum,
boolean suppressFocus)
Start inline editing at the provided coordinates. |
void |
startEditingNew()
Start editing a new row, after the last pre-existing record in the current set of data. |
void |
startEditingNew(java.util.Map defaultValues)
Start editing a new row, after the last pre-existing record in the current set of data. |
void |
stopHover()
Notification that the user is no longer hovering over some cell. |
void |
transferSelectedData(DataBoundComponent source)
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(int colNum)
Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs. |
void |
unfreezeField(java.lang.String fieldName)
Unfreeze a frozen field, so that it will now scroll along with other fields when horizontal scrolling occurs. |
void |
ungroup()
Removes the grouping from the listgrid, restoring its original data |
void |
unsort()
Turn sorting off, typically because data has changed and is no longer sorted. |
void |
updateData(Record record)
Perform a DataSource "update" operation to update existing records in this component's DataSource. |
void |
updateData(Record record,
DSCallback callback)
Perform a DataSource "update" operation to update existing records in this component's DataSource. |
void |
updateData(Record record,
DSCallback callback,
DSRequest requestProperties)
Perform a DataSource "update" operation to update existing records in this component's DataSource. |
java.lang.Boolean |
validateCell(int rowNum,
int colIndex)
Validate the current edit value for the cell in question. |
java.lang.Boolean |
validateCell(int rowNum,
java.lang.String fieldName)
Validate the current edit value for the cell in question. |
java.lang.Boolean |
validateRow(int rowNum)
Validate the current set of edit values for the row in question. |
java.lang.Boolean |
willAcceptDrop()
This method overrides Canvas.willAcceptDrop() and works as follows:If Canvas.willAcceptDrop() (the superclass definition) returns false, this
method always returns false. |
java.lang.Boolean |
willFetchData(Criteria newCriteria)
Compares the specified criteria with the current criteria applied to this component's data object and determines whether the new criteria could be satisfied from the currently cached set of data, or if a new filter/fetch operation will be required. |
java.lang.Boolean |
willFetchData(Criteria newCriteria,
java.lang.String 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.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
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 |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public ListGrid()
public ListGrid(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
public static ListGrid getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
protected com.google.gwt.core.client.JavaScriptObject create()
create
in class Canvas
public void setFastCellUpdates(java.lang.Boolean fastCellUpdates) throws java.lang.IllegalStateException
fastCellUpdates
speeds up the dynamic styling system used by rollovers,
selections, and custom styling that calls com.smartgwt.client.grid.GridRenderer#refreshCellStyle
, at
the cost of slightly slower draw() and redraw() times.
fastCellUpdates
- fastCellUpdates Default value is false
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic void setStyleName(java.lang.String styleName)
setStyleName
in class Canvas
styleName
- styleName Default value is "listGrid"public java.lang.String getStyleName()
getStyleName
in class Canvas
public void setAutoFetchDisplayMap(java.lang.Boolean autoFetchDisplayMap)
optionDataSource
is
set for a ListGrid field.
If set to false, valueMaps will not be automatically fetched. In this case, setting
field.optionDataSource on a is effectively a shortcut for setting optionDataSource on
the editor via editorProperties
.
Can also be disabled on a per-field basis with autoFetchDisplayMap
.
autoFetchDisplayMap
- autoFetchDisplayMap Default value is truepublic java.lang.Boolean getAutoFetchDisplayMap()
optionDataSource
is
set for a ListGrid field.
If set to false, valueMaps will not be automatically fetched. In this case, setting
field.optionDataSource on a is effectively a shortcut for setting optionDataSource on
the editor via editorProperties
.
Can also be disabled on a per-field basis with autoFetchDisplayMap
.
public void setSaveLocally(java.lang.Boolean saveLocally) throws java.lang.IllegalStateException
dataSource
, this property can be set to
true
to avoid the grid from attempting to save / retrieve data from the
server. In this case the grid's data should be specified as an array via
the data
attribute, and the datasource will simply act as a schema to
describe the set of fields visible in the grid.
canEdit
, or removals via the
canRemoveRecords
mechanism will update the local data array rather than
attempting to perform operations against the dataSource.
Note : This is an advanced setting
saveLocally
- saveLocally Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getSaveLocally()
dataSource
, this property can be set to
true
to avoid the grid from attempting to save / retrieve data from the
server. In this case the grid's data should be specified as an array via
the data
attribute, and the datasource will simply act as a schema to
describe the set of fields visible in the grid.
canEdit
, or removals via the
canRemoveRecords
mechanism will update the local data array rather than
attempting to perform operations against the dataSource.
public void setGroupNodeStyle(java.lang.String groupNodeStyle)
groupNodeStyle
- groupNodeStyle Default value is "groupNode"public java.lang.String getGroupNodeStyle()
public void setGroupIcon(java.lang.String groupIcon)
groupIcon
- groupIcon Default value is "[SKINIMG]/TreeGrid/opener.gif"public java.lang.String getGroupIcon()
public void setGroupIconSize(int groupIconSize)
groupIconSize
- groupIconSize Default value is 16public int getGroupIconSize()
public void setGroupIndentSize(int groupIndentSize)
groupIndentSize
- groupIndentSize Default value is 20public int getGroupIndentSize()
public void setGroupLeadingIndent(int groupLeadingIndent)
groupLeadingIndent
- groupLeadingIndent Default value is 20public int getGroupLeadingIndent()
public void setCanGroupBy(java.lang.Boolean canGroupBy)
canGroupBy
- canGroupBy Default value is truepublic java.lang.Boolean getCanGroupBy()
public void setGroupByMaxRecords(int groupByMaxRecords)
groupBy(java.lang.String...)
will be ignored.
groupByMaxRecords
- groupByMaxRecords Default value is 1000public int getGroupByMaxRecords()
groupBy(java.lang.String...)
will be ignored.
public java.lang.Boolean getIsGrouped() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if widget has not yet been rendered.public void setNullGroupTitle(java.lang.String nullGroupTitle)
nullGroupTitle
- nullGroupTitle Default value is '-none-'public java.lang.String getNullGroupTitle()
public void setValueIconSize(int valueIconSize)
valueIconWidth
and
valueIconHeight
, or at the field level via valueIconSize
,
valueIconWidth
and {ListGridField.valueIconHeight}
valueIconSize
- valueIconSize Default value is 16public int getValueIconSize()
valueIconWidth
and
valueIconHeight
, or at the field level via valueIconSize
,
valueIconWidth
and {ListGridField.valueIconHeight}
public void setValueIconWidth(java.lang.Integer valueIconWidth)
valueIconSize
.
Can be overridden at the field level
valueIconWidth
- valueIconWidth Default value is nullpublic java.lang.Integer getValueIconWidth()
valueIconSize
.
Can be overridden at the field level
public void setValueIconHeight(java.lang.Integer valueIconHeight)
valueIconSize
.
Can be overridden at the field level
valueIconHeight
- valueIconHeight Default value is nullpublic java.lang.Integer getValueIconHeight()
valueIconSize
.
Can be overridden at the field level
public void setValueIconLeftPadding(int valueIconLeftPadding)
valueIconLeftPadding
- valueIconLeftPadding Default value is 2public int getValueIconLeftPadding()
public void setValueIconRightPadding(int valueIconRightPadding)
valueIconRightPadding
- valueIconRightPadding Default value is 2public int getValueIconRightPadding()
public void setImageSize(int imageSize)
imageSize
or
imageWidth
/imageHeight
imageSize
- imageSize Default value is 16public int getImageSize()
imageSize
or
imageWidth
/imageHeight
public void setHeaderSpanHeight(java.lang.Integer headerSpanHeight) throws java.lang.IllegalStateException
headerSpans
with no height specified.
If headerSpanHeight
is not specified (the default), headerSpans will be 1/2
of headerHeight
.
headerSpanHeight
- headerSpanHeight Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getHeaderSpanHeight()
headerSpans
with no height specified.
If headerSpanHeight
is not specified (the default), headerSpans will be 1/2
of headerHeight
.
public void setShowTreeColumnPicker(java.lang.Boolean showTreeColumnPicker) throws java.lang.IllegalStateException
headerSpans
are in use, whether to show a hierarchical column picker
that includes both headerSpans and normal headers, with normal headers indented under
headerSpans similarly to how a TreeGrid
displays a Tree.
If showTreeColumnPicker
is false, no column picker will be shown on the
headerSpan itself, and the column picker for a clicked on a normal field header will include
only normal fields.
showTreeColumnPicker
- showTreeColumnPicker Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowTreeColumnPicker()
headerSpans
are in use, whether to show a hierarchical column picker
that includes both headerSpans and normal headers, with normal headers indented under
headerSpans similarly to how a TreeGrid
displays a Tree.
If showTreeColumnPicker
is false, no column picker will be shown on the
headerSpan itself, and the column picker for a clicked on a normal field header will include
only normal fields.
public void setModalEditing(java.lang.Boolean modalEditing)
Note : This is an advanced setting
modalEditing
- modalEditing Default value is nullpublic java.lang.Boolean getModalEditing()
public void setFetchDelay(int fetchDelay)
showFilterEditor
is true), and we're
re-filtering on every keypress (filterOnKeypress
is true), this
property is the delay in milliseconds between the user changing the filter and the
filter request being kicked off. If multiple changes are made to the filter
within this fetch delay, only the most recent will actually cause a re-filter
Note : This is an advanced setting
fetchDelay
- fetchDelay Default value is 300public int getFetchDelay()
showFilterEditor
is true), and we're
re-filtering on every keypress (filterOnKeypress
is true), this
property is the delay in milliseconds between the user changing the filter and the
filter request being kicked off. If multiple changes are made to the filter
within this fetch delay, only the most recent will actually cause a re-filter
public void setShowAllRecords(java.lang.Boolean showAllRecords)
showAllRecords
- showAllRecords Default value is falsepublic java.lang.Boolean getShowAllRecords()
public void setDrawAllMaxCells(int drawAllMaxCells)
drawAllMaxCells
cells to be rendered,
the full dataset will instead be drawn even if showAllRecords
is false and the viewport size and drawAheadRatio
setting would normally have caused
incremental rendering to be used.
The drawAllMaxCells
setting prevents incremental rendering from being used in
situations where it's really unnecessary, such as a 40 row, 5 column dataset (only 200
cells) which happens to be in a grid with a viewport showing only 20 or so rows.
Incremental rendering causes a brief "flash" during scrolling as the visible portion of the
dataset is redrawn, and a better scrolling experience can be obtained in this situation by
drawing the entire dataset up front, which in this example would have neglible effect on
initial draw time.
drawAllMaxCells:0
disables this features. You may want to disable this feature
if performance is an issue and:
Note : This is an advanced setting
drawAllMaxCells
- drawAllMaxCells Default value is 250public int getDrawAllMaxCells()
drawAllMaxCells
cells to be rendered,
the full dataset will instead be drawn even if showAllRecords
is false and the viewport size and drawAheadRatio
setting would normally have caused
incremental rendering to be used.
The drawAllMaxCells
setting prevents incremental rendering from being used in
situations where it's really unnecessary, such as a 40 row, 5 column dataset (only 200
cells) which happens to be in a grid with a viewport showing only 20 or so rows.
Incremental rendering causes a brief "flash" during scrolling as the visible portion of the
dataset is redrawn, and a better scrolling experience can be obtained in this situation by
drawing the entire dataset up front, which in this example would have neglible effect on
initial draw time.
drawAllMaxCells:0
disables this features. You may want to disable this feature
if performance is an issue and:
public void setDrawAheadRatio(float drawAheadRatio)
drawAheadRatio
- drawAheadRatio Default value is 1.3public float getDrawAheadRatio()
public void setQuickDrawAheadRatio(float quickDrawAheadRatio)
drawAheadRatio
, to be used when the user
is rapidly changing the grids viewport (for example drag scrolling through the grid).
If unspecified drawAheadRatio
will be used in all cases
quickDrawAheadRatio
- quickDrawAheadRatio Default value is 1.3public float getQuickDrawAheadRatio()
drawAheadRatio
, to be used when the user
is rapidly changing the grids viewport (for example drag scrolling through the grid).
If unspecified drawAheadRatio
will be used in all cases
public void setScrollRedrawDelay(int scrollRedrawDelay)
scrollRedrawDelay
- scrollRedrawDelay Default value is 75public int getScrollRedrawDelay()
public void setBodyOverflow(Overflow bodyOverflow)
By setting both the grid itself and the body to overflow:visible, it is possible to
"auto-fit" to the rendered height or width of the rows. Note that in this case
grid.width
and grid.height
act as minimums.
Update the bodyOverflow
for this listGrid.
Note : This is an advanced setting
bodyOverflow
- new overflow setting for the body. Default value is Canvas.AUTOpublic Overflow getBodyOverflow()
By setting both the grid itself and the body to overflow:visible, it is possible to
"auto-fit" to the rendered height or width of the rows. Note that in this case
grid.width
and grid.height
act as minimums.
public void setBodyBackgroundColor(java.lang.String bodyBackgroundColor)
baseStyle
instead.
bodyBackgroundColor
- bodyBackgroundColor Default value is "white"public java.lang.String getBodyBackgroundColor()
baseStyle
instead.
public void setBodyStyleName(java.lang.String bodyStyleName) throws java.lang.IllegalStateException
bodyBackgroundColor
to null
.
Update the bodyStyleName
for this listGrid.
bodyStyleName
- new body style name. Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getBodyStyleName()
bodyBackgroundColor
to null
.
public void setEmptyCellValue(java.lang.String emptyCellValue)
This is the grid-wide attribute. You may also set the emptyCellValue on a per-field basis.
emptyCellValue
- emptyCellValue Default value is " "public java.lang.String getEmptyCellValue()
This is the grid-wide attribute. You may also set the emptyCellValue on a per-field basis.
public void setCellHeight(int cellHeight)
cellHeight
- cellHeight Default value is 20public int getCellHeight()
public void setFixedRecordHeights(java.lang.Boolean fixedRecordHeights)
If we allow rows to expand, the row height as derived from
com.smartgwt.client.grid.GridRenderer#getRowHeight
or the
default cellHeight
is treated as a minimum.
Note : This is an advanced setting
fixedRecordHeights
- fixedRecordHeights Default value is truepublic java.lang.Boolean getFixedRecordHeights()
If we allow rows to expand, the row height as derived from
com.smartgwt.client.grid.GridRenderer#getRowHeight
or the
default cellHeight
is treated as a minimum.
public void setAutoFitMaxHeight(java.lang.Integer autoFitMaxHeight)
autoFitData
is set to "vertical"
or "both"
this
property provides an upper limit on how far the ListGrid will expand vertically to accomodate
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.
Setter for autoFitMaxHeight
.
autoFitMaxHeight
- Maximum height in px we'll expand to accomodate if autoFitData
is enabled vertically.. Default value is nullpublic java.lang.Integer getAutoFitMaxHeight()
autoFitData
is set to "vertical"
or "both"
this
property provides an upper limit on how far the ListGrid will expand vertically to accomodate
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.
public void setAutoFitMaxRecords(int autoFitMaxRecords)
autoFitData
is set to "vertical"
or "both"
this
property provides the maximum number of records for which the ListGrid will expand. If more
records are present, scrolling will be introduced to reach them as normal.
If unset, by default the ListGrid will expand to accomodate as many records as are present.
Setter for autoFitMaxRecords
.
autoFitMaxRecords
- Maximum number of rows we'll expand to accomodate if autoFitData
is enabled vertically.. Default value is 50public int getAutoFitMaxRecords()
autoFitData
is set to "vertical"
or "both"
this
property provides the maximum number of records for which the ListGrid will expand. If more
records are present, scrolling will be introduced to reach them as normal.
If unset, by default the ListGrid will expand to accomodate as many records as are present.
public void setAutoFitMaxWidth(java.lang.Integer autoFitMaxWidth)
autoFitData
is set to "horizontal"
or "both"
this property provides an upper limit on how far the ListGrid will expand horizontally to
accomodate its content.
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.
Setter for autoFitMaxWidth
.
autoFitMaxWidth
- Width in px we'll expand to accomodate if autoFitData
is enabled horizontally.. Default value is nullpublic java.lang.Integer getAutoFitMaxWidth()
autoFitData
is set to "horizontal"
or "both"
this property provides an upper limit on how far the ListGrid will expand horizontally to
accomodate its content.
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.
public void setAutoFitMaxColumns(int autoFitMaxColumns)
autoFitData
is set to "horizontal"
or "both"
this property provides the maximum number of columns for which the ListGrid will expand.
If more columns are present, scrolling will be introduced to reach them as normal.
If unset the ListGrid will expand to accomodate as many columns as are defined for the
grid.
Setter for autoFitMaxColumns
.
autoFitMaxColumns
- Maximum number of fields we'll expand to accomodate if autoFitData
is enabled horizontally.. Default value is 50public int getAutoFitMaxColumns()
autoFitData
is set to "horizontal"
or "both"
this property provides the maximum number of columns for which the ListGrid will expand.
If more columns are present, scrolling will be introduced to reach them as normal.
If unset the ListGrid will expand to accomodate as many columns as are defined for the
grid.
public void setLeaveScrollbarGap(java.lang.Boolean leaveScrollbarGap)
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.
leaveScrollbarGap
- leaveScrollbarGap Default value is truepublic java.lang.Boolean getLeaveScrollbarGap()
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.
public void setWrapCells(java.lang.Boolean wrapCells)
Note : This is an advanced setting
wrapCells
- wrapCells Default value is falsepublic java.lang.Boolean getWrapCells()
public void setCellPadding(int cellPadding)
cellPadding
- cellPadding Default value is 2public int getCellPadding()
public void setDateFormatter(DateDisplayFormat dateFormatter)
com.smartgwt.client..Date#setShortDisplayFormat
. Specify any valid DateDisplayFormat
, or
function to change the display format for dates used by this grid.
If specified as a function, this function will be executed in the scope of the Date
and should return the formatted string.displayFormat
.displayFormat
.
In this case you may also need to set dateInputFormat
.
dateFormatter
- dateFormatter Default value is nullpublic DateDisplayFormat getDateFormatter()
com.smartgwt.client..Date#setShortDisplayFormat
. Specify any valid DateDisplayFormat
, or
function to change the display format for dates used by this grid.
If specified as a function, this function will be executed in the scope of the Date
and should return the formatted string.displayFormat
.displayFormat
.
In this case you may also need to set dateInputFormat
.
public void setLinkTextProperty(java.lang.String linkTextProperty)
linkTextProperty
- linkTextProperty Default value is "linkText"public java.lang.String getLinkTextProperty()
public void setEditFailedBaseStyle(java.lang.String editFailedBaseStyle)
this.editFailedCSSText
Note : This is an advanced setting
editFailedBaseStyle
- editFailedBaseStyle Default value is nullpublic java.lang.String getEditFailedBaseStyle()
this.editFailedCSSText
public void setEditFailedCSSText(java.lang.String editFailedCSSText)
this.editFailedBaseStyle
instead.
Note : This is an advanced setting
editFailedCSSText
- editFailedCSSText Default value is "color:red;border:1px solid red;"public java.lang.String getEditFailedCSSText()
this.editFailedBaseStyle
instead.
public java.lang.String getEditPendingBaseStyle() throws java.lang.IllegalStateException
this.editPendingCSSText
Note : This method should be called only after the widget has been rendered.
java.lang.IllegalStateException
- if widget has not yet been rendered.public void setEditPendingCSSText(java.lang.String editPendingCSSText)
this.editPendingBaseStyle
instead.
Note : This is an advanced setting
editPendingCSSText
- editPendingCSSText Default value is "border:color:#0066CC;"public java.lang.String getEditPendingCSSText()
this.editPendingBaseStyle
instead.
public void setRecordBaseStyleProperty(java.lang.String recordBaseStyleProperty)
record[listGrid.recordBaseStyleProperty]
to the desired base style name -
for example if recordBaseStyleProperty
is "_baseStyle"
, set
record._baseStyle
to the custom base style name.
Note : This is an advanced setting
recordBaseStyleProperty
- recordBaseStyleProperty Default value is "_baseStyle"public java.lang.String getRecordBaseStyleProperty()
record[listGrid.recordBaseStyleProperty]
to the desired base style name -
for example if recordBaseStyleProperty
is "_baseStyle"
, set
record._baseStyle
to the custom base style name.
public void setFrozenBaseStyle(java.lang.String frozenBaseStyle)
frozenBaseStyle
- frozenBaseStyle Default value is nullpublic java.lang.String getFrozenBaseStyle()
public void setShrinkForFreeze(java.lang.Boolean shrinkForFreeze)
frozen
fields, and a horizontal
scrollbar is visible at the bottom of the liquid columns, should an equivalent scrollbar gap
be left visible below the frozen columns?true
any backgroundColor or border applied to the ListGrid
will show up below the bottom row of the frozen column(s).
Note : This is an advanced setting
shrinkForFreeze
- shrinkForFreeze Default value is falsepublic java.lang.Boolean getShrinkForFreeze()
frozen
fields, and a horizontal
scrollbar is visible at the bottom of the liquid columns, should an equivalent scrollbar gap
be left visible below the frozen columns?true
any backgroundColor or border applied to the ListGrid
will show up below the bottom row of the frozen column(s).
public void setAlternateRecordStyles(java.lang.Boolean alternateRecordStyles)
alternateRecordStyles
alternateRecordStyles
- New value for this.alternateRecordStyles
. Default value is falsepublic java.lang.Boolean getAlternateRecordStyles()
public void setAlternateBodyStyleName(java.lang.String alternateBodyStyleName)
alternateRecordStyles
is true
for this grid. If unset bodyStyleName
will be used to style the body
regardless of the alternateRecordStyles
setting.
Update the alternateBodyStyleName
for this listGrid.
Note : This is an advanced setting
alternateBodyStyleName
- new body style name when showing alternateRecordStyles. Default value is nullpublic java.lang.String getAlternateBodyStyleName()
alternateRecordStyles
is true
for this grid. If unset bodyStyleName
will be used to style the body
regardless of the alternateRecordStyles
setting.
public void setAlternateRecordFrequency(int alternateRecordFrequency)
alternateRecordFrequency
- alternateRecordFrequency Default value is 1public int getAlternateRecordFrequency()
public void setGenerateClickOnSpace(java.lang.Boolean generateClickOnSpace)
Note : This is an advanced setting
generateClickOnSpace
- generateClickOnSpace Default value is truepublic java.lang.Boolean getGenerateClickOnSpace()
public void setGenerateClickOnEnter(java.lang.Boolean generateClickOnEnter)
Note : This is an advanced setting
generateClickOnEnter
- generateClickOnEnter Default value is falsepublic java.lang.Boolean getGenerateClickOnEnter()
public void setGenerateDoubleClickOnSpace(java.lang.Boolean generateDoubleClickOnSpace)
Note : This is an advanced setting
generateDoubleClickOnSpace
- generateDoubleClickOnSpace Default value is falsepublic java.lang.Boolean getGenerateDoubleClickOnSpace()
public void setGenerateDoubleClickOnEnter(java.lang.Boolean generateDoubleClickOnEnter)
Note : This is an advanced setting
generateDoubleClickOnEnter
- generateDoubleClickOnEnter Default value is truepublic java.lang.Boolean getGenerateDoubleClickOnEnter()
public void setArrowKeyAction(java.lang.String arrowKeyAction)
select
: select the next row in the list (calls recordClick
handler)focus
: move focus to the next row in the list without changing the selectionactivate
: select and activate the next row in the list (calls
recordDoubleClick
handler)none
: no actionNote : This is an advanced setting
arrowKeyAction
- arrowKeyAction Default value is "select"public java.lang.String getArrowKeyAction()
select
: select the next row in the list (calls recordClick
handler)focus
: move focus to the next row in the list without changing the selectionactivate
: select and activate the next row in the list (calls
recordDoubleClick
handler)none
: no action
public void setShowRollOver(java.lang.Boolean showRollOver)
showRollOver
- showRollOver Default value is truepublic java.lang.Boolean getShowRollOver()
public void setCanHover(java.lang.Boolean canHover)
setCanHover
in class Canvas
canHover
- canHover Default value is nullpublic java.lang.Boolean getCanHover()
getCanHover
in class Canvas
public void setShowHover(java.lang.Boolean showHover)
com.smartgwt.client.widgets.grid.ListGrid#cellHoverHTML
.
setShowHover
in class Canvas
showHover
- showHover Default value is truepublic java.lang.Boolean getShowHover()
com.smartgwt.client.widgets.grid.ListGrid#cellHoverHTML
.
getShowHover
in class Canvas
public void setHoverStyle(java.lang.String hoverStyle)
Note : This is an advanced setting
setHoverStyle
in class Canvas
hoverStyle
- hoverStyle Default value is "gridHover"public java.lang.String getHoverStyle()
getHoverStyle
in class Canvas
public void setSelectionAppearance(SelectionAppearance selectionAppearance) throws java.lang.IllegalStateException
For selectionAppearance:"checkbox"
with multiple selection
allowed, you would typically use SelectionType
:"simple" (the default). Because
selectionType
and selectionAppearance
are unrelated,
the combination of selectionAppearance:"checkbox"
and
selectionType:"multiple"
results in a grid where multiple selection can
only be achieved via shift-click or ctrl-click.
If using "checkbox", see also checkboxField
for customization APIs.
Changes selectionAppearance on the fly.
selectionAppearance
- new selection appearance. Default value is "rowStyle"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic SelectionAppearance getSelectionAppearance()
For selectionAppearance:"checkbox"
with multiple selection
allowed, you would typically use SelectionType
:"simple" (the default). Because
selectionType
and selectionAppearance
are unrelated,
the combination of selectionAppearance:"checkbox"
and
selectionType:"multiple"
results in a grid where multiple selection can
only be achieved via shift-click or ctrl-click.
If using "checkbox", see also checkboxField
for customization APIs.
public void setSelectionType(SelectionStyle selectionType)
The default selection appearance is governed by selectionAppearance
: if
selectionAppearance is "checkbox", this will be "simple", otherwise, this will be
"multiple".
Changes selectionType on the fly.
selectionType
- New selection style.. Default value is nullpublic SelectionStyle getSelectionType()
The default selection appearance is governed by selectionAppearance
: if
selectionAppearance is "checkbox", this will be "simple", otherwise, this will be
"multiple".
public void setCanDragSelect(java.lang.Boolean canDragSelect)
canDragSelect
- canDragSelect Default value is falsepublic java.lang.Boolean getCanDragSelect()
public void setCheckboxFieldTrueImage(java.lang.String checkboxFieldTrueImage)
selectionAppearance
is set to "checkbox"
this property
determines the image to display in the checkbox field for a selected row.
If unset, the booleanTrueImage
will be used.
Note : This is an advanced setting
checkboxFieldTrueImage
- checkboxFieldTrueImage Default value is nullpublic java.lang.String getCheckboxFieldTrueImage()
selectionAppearance
is set to "checkbox"
this property
determines the image to display in the checkbox field for a selected row.
If unset, the booleanTrueImage
will be used.
public void setCheckboxFieldFalseImage(java.lang.String checkboxFieldFalseImage)
selectionAppearance
is set to "checkbox"
this property
determines the image to display in the checkbox field for an unselected row.
If unset, the booleanFalseImage
will be used.
Note : This is an advanced setting
checkboxFieldFalseImage
- checkboxFieldFalseImage Default value is nullpublic java.lang.String getCheckboxFieldFalseImage()
selectionAppearance
is set to "checkbox"
this property
determines the image to display in the checkbox field for an unselected row.
If unset, the booleanFalseImage
will be used.
public void setCheckboxFieldImageWidth(java.lang.Integer checkboxFieldImageWidth) throws java.lang.IllegalStateException
selectionAppearance
is set to "checkbox"
this property
may be set to govern the width of the checkbox image displayed to indicate whether a row is
selected. If unset, the checkboxField image will be sized to match the
booleanImageWidth
for this grid.
checkboxFieldImageWidth
- checkboxFieldImageWidth Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getCheckboxFieldImageWidth()
selectionAppearance
is set to "checkbox"
this property
may be set to govern the width of the checkbox image displayed to indicate whether a row is
selected. If unset, the checkboxField image will be sized to match the
booleanImageWidth
for this grid.
public void setCheckboxFieldImageHeight(java.lang.Integer checkboxFieldImageHeight) throws java.lang.IllegalStateException
selectionAppearance
is set to "checkbox"
this property
may be set to govern the height of the checkbox image displayed to indicate whether a row is
selected. If unset, the checkboxField image will be sized to match the
booleanImageHeight
for this grid.
checkboxFieldImageHeight
- checkboxFieldImageHeight Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Integer getCheckboxFieldImageHeight()
selectionAppearance
is set to "checkbox"
this property
may be set to govern the height of the checkbox image displayed to indicate whether a row is
selected. If unset, the checkboxField image will be sized to match the
booleanImageHeight
for this grid.
public void setShowEmptyMessage(java.lang.Boolean showEmptyMessage)
showEmptyMessage
- showEmptyMessage Default value is truepublic java.lang.Boolean getShowEmptyMessage()
public void setEmptyMessage(java.lang.String emptyMessage)
emptyMessage
- emptyMessage Default value is "No items to show."public java.lang.String getEmptyMessage()
public void setEmptyMessageStyle(java.lang.String emptyMessageStyle)
emptyMessage
if displayed.
emptyMessageStyle
- emptyMessageStyle Default value is "emptyMessage"public java.lang.String getEmptyMessageStyle()
emptyMessage
if displayed.
public void setLoadingDataMessage(java.lang.String loadingDataMessage)
loadingDataMessage
- loadingDataMessage Default value is "Loading data..."public java.lang.String getLoadingDataMessage()
public void setLoadingDataMessageStyle(java.lang.String loadingDataMessageStyle)
loadingDataMessageStyle
- loadingDataMessageStyle Default value is "loadingDataMessage"public java.lang.String getLoadingDataMessageStyle()
public void setLoadingMessage(java.lang.String loadingMessage) throws java.lang.IllegalStateException
loadingMessage
- loadingMessage Default value is "\ "
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getLoadingMessage()
public void setSingleCellValueProperty(java.lang.String singleCellValueProperty)
record[this.singleCellValueProperty]
is set for some record, the
record will be displayed as a single cell spanning every column in the grid, with
contents set to the value of record[this.singleCellValueProperty]
.
singleCellValueProperty
- singleCellValueProperty Default value is "singleCellValue"public java.lang.String getSingleCellValueProperty()
record[this.singleCellValueProperty]
is set for some record, the
record will be displayed as a single cell spanning every column in the grid, with
contents set to the value of record[this.singleCellValueProperty]
.
public void setIsSeparatorProperty(java.lang.String isSeparatorProperty)
record[this.isSeparatorProperty]
is set for some record, the
record will be displayed as a simple separator row.
isSeparatorProperty
- isSeparatorProperty Default value is "isSeparator"public java.lang.String getIsSeparatorProperty()
record[this.isSeparatorProperty]
is set for some record, the
record will be displayed as a simple separator row.
public void setShowFilterEditor(java.lang.Boolean showFilterEditor)
autoFetchAsFilter
determines whether
the filter occurs as a fetchData()
or filterData()
call.
Note that if filterData()
or fetchData()
is called directly
while the filter editor is showing, the filter editor values will be updated to reflect the
new set of criteria. If you wish to retain the user entered filter criteria and
programatically modify a subset of field values programatically this can be achieved by
deriving new criteria by copying the existing set of criteria and adding other changes -
something like this:
var newCriteria = isc.clone(myListGrid.getCriteria());
isc.addProperties(newCriteria, {
field1:"new value1",
field2:"new value2"
});
myListGrid.setCriteria(newCriteria);
Also note that 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.
Setter for the showFilterEditor
property. Allows the filter editor to be
shown or hidden at runtime.
showFilterEditor
- true if the filter editor should be shown, false if it should be hidden. Default value is nullpublic java.lang.Boolean getShowFilterEditor()
autoFetchAsFilter
determines whether
the filter occurs as a fetchData()
or filterData()
call.
Note that if filterData()
or fetchData()
is called directly
while the filter editor is showing, the filter editor values will be updated to reflect the
new set of criteria. If you wish to retain the user entered filter criteria and
programatically modify a subset of field values programatically this can be achieved by
deriving new criteria by copying the existing set of criteria and adding other changes -
something like this:
var newCriteria = isc.clone(myListGrid.getCriteria());
isc.addProperties(newCriteria, {
field1:"new value1",
field2:"new value2"
});
myListGrid.setCriteria(newCriteria);
Also note that 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.
public void setFilterEditorHeight(int filterEditorHeight)
filterEditorHeight
- filterEditorHeight Default value is 22public int getFilterEditorHeight()
public void setCanEdit(java.lang.Boolean canEdit)
canEdit
- canEdit Default value is nullpublic java.lang.Boolean getCanEdit()
public void setRecordEditProperty(java.lang.String recordEditProperty)
Note : This is an advanced setting
recordEditProperty
- recordEditProperty Default value is "_canEdit"public java.lang.String getRecordEditProperty()
public void setEditByCell(java.lang.Boolean editByCell)
No effect if this.canEdit is false or null.
editByCell
- editByCell Default value is nullpublic java.lang.Boolean getEditByCell()
No effect if this.canEdit is false or null.
public void setSaveByCell(java.lang.Boolean saveByCell)
If unset, defaults to editByCell
.
To avoid automatic saving entirely, set autoSaveEdits
:false.
saveByCell
- saveByCell Default value is nullpublic java.lang.Boolean getSaveByCell()
If unset, defaults to editByCell
.
To avoid automatic saving entirely, set autoSaveEdits
:false.
public void setValidateByCell(java.lang.Boolean validateByCell)
editByCell
.
Note that validation always occurs when a row is to be saved, so setting
saveByCell
:true forces validation on cell transitions. To completely disable
automatic validation, set neverValidate
:true.
validateByCell
- validateByCell Default value is nullpublic java.lang.Boolean getValidateByCell()
editByCell
.
Note that validation always occurs when a row is to be saved, so setting
saveByCell
:true forces validation on cell transitions. To completely disable
automatic validation, set neverValidate
:true.
public void setValidateOnChange(java.lang.Boolean validateOnChange)
validateOnChange
- validateOnChange Default value is nullpublic java.lang.Boolean getValidateOnChange()
public void setNeverValidate(java.lang.Boolean neverValidate)
Note : This is an advanced setting
neverValidate
- neverValidate Default value is nullpublic java.lang.Boolean getNeverValidate()
public void setCanRemoveRecords(java.lang.Boolean canRemoveRecords) throws java.lang.IllegalStateException
removeData(com.smartgwt.client.data.Record)
.
If animateRemoveRecord
is true, the removed record will appear to shrink
out of view when it is removed.
By default the field will display the removeIcon
next to each record, and
will be rendered as the leftmost column. Two mechanisms exist to further modify this field:
isRemoveField
set. This will then
be used as the remove field instead of adding a field to the beginning of the set of
columns.removeFieldProperties
.
canRemoveRecords
- canRemoveRecords Default value is false
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanRemoveRecords()
removeData(com.smartgwt.client.data.Record)
.
If animateRemoveRecord
is true, the removed record will appear to shrink
out of view when it is removed.
By default the field will display the removeIcon
next to each record, and
will be rendered as the leftmost column. Two mechanisms exist to further modify this field:
isRemoveField
set. This will then
be used as the remove field instead of adding a field to the beginning of the set of
columns.removeFieldProperties
.
public void setRemoveIcon(java.lang.String removeIcon) throws java.lang.IllegalStateException
canRemoveRecords
is enabled, default icon to show in
the auto-generated field that allows removing records.
removeIcon
- removeIcon Default value is "[SKIN]/actions/remove.png"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getRemoveIcon()
canRemoveRecords
is enabled, default icon to show in
the auto-generated field that allows removing records.
public void setAnimateRemoveRecord(java.lang.Boolean animateRemoveRecord)
canRemoveRecords
is enabled, should records be animated out of view
when they are removed by the user?
animateRemoveRecord
- animateRemoveRecord Default value is truepublic java.lang.Boolean getAnimateRemoveRecord()
canRemoveRecords
is enabled, should records be animated out of view
when they are removed by the user?
public void setAnimateRemoveTime(int animateRemoveTime)
animateRemoveRecord
, if
animateRemoveSpeed
is not
set, this property designates the duration of the animation in ms.
animateRemoveTime
- animateRemoveTime Default value is 100public int getAnimateRemoveTime()
animateRemoveRecord
, if
animateRemoveSpeed
is not
set, this property designates the duration of the animation in ms.
public void setAnimateRemoveSpeed(int animateRemoveSpeed)
animateRemoveRecord
, this property
designates the speed of the animation in pixels per second. Takes presidence over the
animateRemoveTime
property, which allows the developer to specify a
duration for the animation rather than a speed.
animateRemoveSpeed
- animateRemoveSpeed Default value is 200public int getAnimateRemoveSpeed()
animateRemoveRecord
, this property
designates the speed of the animation in pixels per second. Takes presidence over the
animateRemoveTime
property, which allows the developer to specify a
duration for the animation rather than a speed.
public void setFilterByCell(java.lang.Boolean filterByCell)
Note : This is an advanced setting
filterByCell
- filterByCell Default value is nullpublic java.lang.Boolean getFilterByCell()
public void setFilterOnKeypress(java.lang.Boolean filterOnKeypress)
Note : This is an advanced setting
filterOnKeypress
- filterOnKeypress Default value is nullpublic java.lang.Boolean getFilterOnKeypress()
public void setWaitForSave(java.lang.Boolean waitForSave)
Note : This is an advanced setting
waitForSave
- waitForSave Default value is falsepublic java.lang.Boolean getWaitForSave()
public void setStopOnErrors(java.lang.Boolean stopOnErrors)
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, this 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
stopOnErrors
- stopOnErrors Default value is falsepublic java.lang.Boolean getStopOnErrors()
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, this 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.
public void setAutoSaveEdits(java.lang.Boolean autoSaveEdits)
saveByCell
is true).
The default of true
indicates that edits will be
saveByCell
as the
user navigates through the grid and/or EnterKeyEditAction
to end
editing. See the 'Grid Editing'
overview for details.
Setting autoSaveEdits
false creates a "mass update" / "mass delete"
interaction where edits will be retained for all edited cells (across rows if
appropriate) until com.smartgwt.client.widgets.grid.ListGrid#saveEdits
is called to save a particular row, or
saveAllEdits()
is called to save all changes in a batch.
Note : This is an advanced setting
autoSaveEdits
- autoSaveEdits Default value is truepublic java.lang.Boolean getAutoSaveEdits()
saveByCell
is true).
The default of true
indicates that edits will be
saveByCell
as the
user navigates through the grid and/or EnterKeyEditAction
to end
editing. See the 'Grid Editing'
overview for details.
Setting autoSaveEdits
false creates a "mass update" / "mass delete"
interaction where edits will be retained for all edited cells (across rows if
appropriate) until com.smartgwt.client.widgets.grid.ListGrid#saveEdits
is called to save a particular row, or
saveAllEdits()
is called to save all changes in a batch.
public void setConfirmCancelEditing(java.lang.Boolean confirmCancelEditing)
confirmCancelEditing
- confirmCancelEditing Default value is falsepublic java.lang.Boolean getConfirmCancelEditing()
public void setCancelEditingConfirmationMessage(java.lang.String cancelEditingConfirmationMessage)
this.confirmCancelEditing
is true
this property is used as the message to display in the confirmation dismissal prompt.
cancelEditingConfirmationMessage
- cancelEditingConfirmationMessage Default value is Cancelling this edit will clear unsaved edit values for this record. Continue?public java.lang.String getCancelEditingConfirmationMessage()
this.confirmCancelEditing
is true
this property is used as the message to display in the confirmation dismissal prompt.
public void setConfirmDiscardEdits(java.lang.Boolean confirmDiscardEdits)
confirmDiscardEdits
- confirmDiscardEdits Default value is truepublic java.lang.Boolean getConfirmDiscardEdits()
public void setConfirmDiscardEditsMessage(java.lang.String confirmDiscardEditsMessage)
this.confirmDiscardEdits
is true, this property can be used to customize the
error message string displayed to the user in a dialog with options to
cancel the action, or save or discard pending edits in response to sort/filter actions
that would otherwise drop unsaved edit values.
confirmDiscardEditsMessage
- confirmDiscardEditsMessage Default value is "This action will discard all unsaved edited values for this list."public java.lang.String getConfirmDiscardEditsMessage()
this.confirmDiscardEdits
is true, this property can be used to customize the
error message string displayed to the user in a dialog with options to
cancel the action, or save or discard pending edits in response to sort/filter actions
that would otherwise drop unsaved edit values.
public void setDiscardEditsSaveButtonTitle(java.lang.String discardEditsSaveButtonTitle)
confirmDiscardEdits
is true this is the title for the save button
appearing in the lost edits confirmation dialog. Override this for localization if necessary.
discardEditsSaveButtonTitle
- discardEditsSaveButtonTitle Default value is "Save"public java.lang.String getDiscardEditsSaveButtonTitle()
confirmDiscardEdits
is true this is the title for the save button
appearing in the lost edits confirmation dialog. Override this for localization if necessary.
public void setRowEndEditAction(RowEndEditAction rowEndEditAction)
rowEndEditAction
- rowEndEditAction Default value is "next"public RowEndEditAction getRowEndEditAction()
public void setListEndEditAction(RowEndEditAction listEndEditAction)
listEndEditAction
- listEndEditAction Default value is "stop"public RowEndEditAction getListEndEditAction()
public void setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
enterKeyEditAction
- enterKeyEditAction Default value is "done"public EnterKeyEditAction getEnterKeyEditAction()
public void setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
autoSaveEdits
is true, this may cause a save of the current edit values
escapeKeyEditAction
- escapeKeyEditAction Default value is "cancel"public EscapeKeyEditAction getEscapeKeyEditAction()
autoSaveEdits
is true, this may cause a save of the current edit values
public void setEditEvent(ListGridEditEvent editEvent)
ListGridEditEvent
for options.
Note this setting has no effect unless canEdit
has been set to enable editing.
See also editOnFocus
and startEditing()
.
editEvent
- editEvent Default value is "doubleClick"public ListGridEditEvent getEditEvent()
ListGridEditEvent
for options.
Note this setting has no effect unless canEdit
has been set to enable editing.
See also editOnFocus
and startEditing()
.
public void setEditOnFocus(java.lang.Boolean editOnFocus)
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.
Note : This is an advanced setting
editOnFocus
- editOnFocus Default value is nullpublic java.lang.Boolean getEditOnFocus()
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.
public void setSelectOnEdit(java.lang.Boolean selectOnEdit)
Note : This is an advanced setting
selectOnEdit
- selectOnEdit Default value is truepublic java.lang.Boolean getSelectOnEdit()
public void setLongTextEditorThreshold(int longTextEditorThreshold)
length
exceeds this
value, the ListGrid shows an edit field of type longTextEditorType
rather than the standard text field when the field enters inline edit mode.
longTextEditorThreshold
- longTextEditorThreshold Default value is 255public int getLongTextEditorThreshold()
length
exceeds this
value, the ListGrid shows an edit field of type longTextEditorType
rather than the standard text field when the field enters inline edit mode.
public void setLongTextEditorType(java.lang.String longTextEditorType)
length
exceeds
this.longTextEditorThreshold
show an edit field of this type
rather than the standard text field when the field enters inline edit mode.
longTextEditorType
- longTextEditorType Default value is "PopUpTextAreaItem"public java.lang.String getLongTextEditorType()
length
exceeds
this.longTextEditorThreshold
show an edit field of this type
rather than the standard text field when the field enters inline edit mode.
public void setHeaderHeight(int headerHeight)
headerHeight
- new height for the header. Default value is 22public int getHeaderHeight()
public void setShowHeader(java.lang.Boolean showHeader)
showHeader
- true to show the header, false to hide it.. Default value is truepublic java.lang.Boolean getShowHeader()
public void setHeaderBarStyle(java.lang.String headerBarStyle) throws java.lang.IllegalStateException
headerBarStyle
- headerBarStyle Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getHeaderBarStyle()
public void setHeaderBackgroundColor(java.lang.String headerBackgroundColor)
headerBackgroundColor
- headerBackgroundColor Default value is "#CCCCCC"public java.lang.String getHeaderBackgroundColor()
public void setHeaderBaseStyle(java.lang.String headerBaseStyle) throws java.lang.IllegalStateException
baseStyle
to apply to the buttons in the header, and the sorter, for
this ListGrid.
Note that depending on the headerButtonConstructor
of the header
buttons you may also need to set headerTitleStyle
.
headerBaseStyle
- headerBaseStyle Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getHeaderBaseStyle()
baseStyle
to apply to the buttons in the header, and the sorter, for
this ListGrid.
Note that depending on the headerButtonConstructor
of the header
buttons you may also need to set headerTitleStyle
.
public void setHeaderTitleStyle(java.lang.String headerTitleStyle) throws java.lang.IllegalStateException
titleStyle
to apply to the buttons in the header, and the sorter,
for this ListGrid.
Note that this will typically only have an effect if
headerButtonConstructor
is set to StretchImgButton
or a subclass
thereof.
headerTitleStyle
- headerTitleStyle Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getHeaderTitleStyle()
titleStyle
to apply to the buttons in the header, and the sorter,
for this ListGrid.
Note that this will typically only have an effect if
headerButtonConstructor
is set to StretchImgButton
or a subclass
thereof.
public void setFrozenHeaderBaseStyle(java.lang.String frozenHeaderBaseStyle) throws java.lang.IllegalStateException
frozenHeaderBaseStyle
- frozenHeaderBaseStyle Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getFrozenHeaderBaseStyle()
public void setFrozenHeaderTitleStyle(java.lang.String frozenHeaderTitleStyle) throws java.lang.IllegalStateException
frozenHeaderTitleStyle
- frozenHeaderTitleStyle Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getFrozenHeaderTitleStyle()
public void setCanSort(java.lang.Boolean canSort)
canSort
- canSort Default value is truepublic java.lang.Boolean getCanSort()
public void setShowSortArrow(SortArrow showSortArrow)
showSortArrow
- showSortArrow Default value is nullpublic SortArrow getShowSortArrow()
public void setCanFreezeFields(java.lang.Boolean canFreezeFields)
true
unless:fixedRecordHeights
is false
bodyOverflow
is "visible"
autoFitData
is set to "horizontal"
or
"both"
"visible"
Note that the canFreezeFields
setting enables or disables the user
interface for freezing and unfreezing fields only. Fields can be programmatically
frozen via setting frozen
to true when the grid is
created, or dynamically frozen and unfrozen via freezeField(java.lang.String)
and
unfreezeField(java.lang.String)
.
Setter method for canFreezeFields
canFreezeFields
- New value for listGrid.canFreezeFields
. Default value is nullpublic java.lang.Boolean getCanFreezeFields()
true
unless:fixedRecordHeights
is false
bodyOverflow
is "visible"
autoFitData
is set to "horizontal"
or
"both"
"visible"
Note that the canFreezeFields
setting enables or disables the user
interface for freezing and unfreezing fields only. Fields can be programmatically
frozen via setting frozen
to true when the grid is
created, or dynamically frozen and unfrozen via freezeField(java.lang.String)
and
unfreezeField(java.lang.String)
.
public void setShowHeaderContextMenu(java.lang.Boolean showHeaderContextMenu) throws java.lang.IllegalStateException
showHeaderContextMenu
- showHeaderContextMenu Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowHeaderContextMenu()
public void setShowHeaderMenuButton(java.lang.Boolean showHeaderMenuButton) throws java.lang.IllegalStateException
showHeaderContextMenu
is true, the
headerMenuButton
will be displayed when the user rolls
over the header buttons in this grid.
showHeaderMenuButton
- showHeaderMenuButton Default value is false
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowHeaderMenuButton()
showHeaderContextMenu
is true, the
headerMenuButton
will be displayed when the user rolls
over the header buttons in this grid.
public void setHeaderMenuButtonIcon(java.lang.String headerMenuButtonIcon) throws java.lang.IllegalStateException
showHeaderMenuButton
is true, this property governs the icon shown on the
auto-generated headerMenuButton
Note : This is an advanced setting
headerMenuButtonIcon
- headerMenuButtonIcon Default value is "[SKIN]/ListGrid/sort_descending.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getHeaderMenuButtonIcon()
showHeaderMenuButton
is true, this property governs the icon shown on the
auto-generated headerMenuButton
public void setHeaderMenuButtonIconWidth(int headerMenuButtonIconWidth) throws java.lang.IllegalStateException
showHeaderMenuButton
is true, this property governs the width of the icon
shown on the auto-generated headerMenuButton
Note : This is an advanced setting
headerMenuButtonIconWidth
- headerMenuButtonIconWidth Default value is 7
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getHeaderMenuButtonIconWidth()
showHeaderMenuButton
is true, this property governs the width of the icon
shown on the auto-generated headerMenuButton
public void setHeaderMenuButtonIconHeight(int headerMenuButtonIconHeight) throws java.lang.IllegalStateException
showHeaderMenuButton
is true, this property governs the height of the icon
shown on the auto-generated headerMenuButton
Note : This is an advanced setting
headerMenuButtonIconHeight
- headerMenuButtonIconHeight Default value is 7
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getHeaderMenuButtonIconHeight()
showHeaderMenuButton
is true, this property governs the height of the icon
shown on the auto-generated headerMenuButton
public void setHeaderMenuButtonWidth(int headerMenuButtonWidth) throws java.lang.IllegalStateException
showHeaderMenuButton
is true, this property governs the width of the
auto-generated headerMenuButton
Note : This is an advanced setting
headerMenuButtonWidth
- headerMenuButtonWidth Default value is 16
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getHeaderMenuButtonWidth()
showHeaderMenuButton
is true, this property governs the width of the
auto-generated headerMenuButton
public void setHeaderMenuButtonHeight(int headerMenuButtonHeight) throws java.lang.IllegalStateException
showHeaderMenuButton
is true, this property governs the height of the
auto-generated headerMenuButton
Note : This is an advanced setting
headerMenuButtonHeight
- headerMenuButtonHeight Default value is "100%"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getHeaderMenuButtonHeight()
showHeaderMenuButton
is true, this property governs the height of the
auto-generated headerMenuButton
public void setCanDragRecordsOut(java.lang.Boolean canDragRecordsOut)
canDragRecordsOut
- canDragRecordsOut Default value is falsepublic java.lang.Boolean getCanDragRecordsOut()
public void setCanAcceptDroppedRecords(java.lang.Boolean canAcceptDroppedRecords)
canAcceptDroppedRecords
- canAcceptDroppedRecords Default value is falsepublic java.lang.Boolean getCanAcceptDroppedRecords()
public void setCanReorderRecords(java.lang.Boolean canReorderRecords)
canReorderRecords
- canReorderRecords Default value is falsepublic java.lang.Boolean getCanReorderRecords()
public void setCanReorderFields(java.lang.Boolean canReorderFields)
canReorderFields
- canReorderFields Default value is truepublic java.lang.Boolean getCanReorderFields()
public void setCanResizeFields(java.lang.Boolean canResizeFields)
canResizeFields
at runtime.
canResizeFields
- new value for this.canResizeFields. Default value is truepublic java.lang.Boolean getCanResizeFields()
public void setDragTrackerMode(DragTrackerMode dragTrackerMode) throws java.lang.IllegalStateException
Note : This is an advanced setting
dragTrackerMode
- dragTrackerMode Default value is "icon"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic DragTrackerMode getDragTrackerMode()
public void setResizeFieldsInRealTime(java.lang.Boolean resizeFieldsInRealTime)
Note : This is an advanced setting
resizeFieldsInRealTime
- resizeFieldsInRealTime Default value is Browser.isIE && isc.Browser.isWinpublic java.lang.Boolean getResizeFieldsInRealTime()
public void setSkinImgDir(java.lang.String skinImgDir)
Note : This is an advanced setting
setSkinImgDir
in class Canvas
skinImgDir
- skinImgDir Default value is "images/ListGrid/"public java.lang.String getSkinImgDir()
getSkinImgDir
in class Canvas
public void setSortAscendingImage(ImgProperties sortAscendingImage)
Note : This is an advanced setting
sortAscendingImage
- sortAscendingImage Default value is {...}public ImgProperties getSortAscendingImage()
public void setSortDescendingImage(ImgProperties sortDescendingImage)
Note : This is an advanced setting
sortDescendingImage
- sortDescendingImage Default value is {...}public ImgProperties getSortDescendingImage()
public void setTrackerImage(ImgProperties trackerImage)
Note : This is an advanced setting
trackerImage
- trackerImage Default value is {...}public ImgProperties getTrackerImage()
public void setBooleanTrueImage(java.lang.String booleanTrueImage)
To turn this off explicitly set suppressValueIcon
to true.
If this and booleanFalseImage
are undefined, this will be set to
checkedImage
.
Note : This is an advanced setting
booleanTrueImage
- booleanTrueImage Default value is nullpublic java.lang.String getBooleanTrueImage()
To turn this off explicitly set suppressValueIcon
to true.
If this and booleanFalseImage
are undefined, this will be set to
checkedImage
.
public void setBooleanFalseImage(java.lang.String booleanFalseImage)
null
value
means no image will be displayed
To turn this off explicitly set suppressValueIcon
to true
If this and booleanTrueImage
are undefined, this will be set to
uncheckedImage
.
Note : This is an advanced setting
booleanFalseImage
- booleanFalseImage Default value is nullpublic java.lang.String getBooleanFalseImage()
null
value
means no image will be displayed
To turn this off explicitly set suppressValueIcon
to true
If this and booleanTrueImage
are undefined, this will be set to
uncheckedImage
.
public void setBooleanImageWidth(int booleanImageWidth)
booleanTrueImage
and booleanFalseImage
.
Note: If booleanTrueImage
is unset, the checkedImage
will be used to indicate a true value in a boolean field. In this case this property is
ignored in favor of valueIconWidth
.
Note : This is an advanced setting
booleanImageWidth
- booleanImageWidth Default value is 16public int getBooleanImageWidth()
booleanTrueImage
and booleanFalseImage
.
Note: If booleanTrueImage
is unset, the checkedImage
will be used to indicate a true value in a boolean field. In this case this property is
ignored in favor of valueIconWidth
.
public void setBooleanImageHeight(int booleanImageHeight)
booleanTrueImage
and the booleanFalseImage
Note: If booleanTrueImage
is unset, the checkedImage
will be used to indicate a true value in a boolean field. In this case this property is
ignored in favor of valueIconHeight
.
Note : This is an advanced setting
booleanImageHeight
- booleanImageHeight Default value is 16public int getBooleanImageHeight()
booleanTrueImage
and the booleanFalseImage
Note: If booleanTrueImage
is unset, the checkedImage
will be used to indicate a true value in a boolean field. In this case this property is
ignored in favor of valueIconHeight
.
public void setFreezeOnRightText(java.lang.String freezeOnRightText)
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to freeze fields on the right of the scrollable body.
freezeOnRightText
- freezeOnRightText Default value is "Freeze on right"public java.lang.String getFreezeOnRightText()
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to freeze fields on the right of the scrollable body.
public void setFreezeOnLeftText(java.lang.String freezeOnLeftText)
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to freeze fields on the left of the scrollable body.
freezeOnLeftText
- freezeOnLeftText Default value is "Freeze on left"public java.lang.String getFreezeOnLeftText()
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to freeze fields on the left of the scrollable body.
public void setSortFieldAscendingText(java.lang.String sortFieldAscendingText)
showHeaderContextMenu
for this grid, this
attribute will be shown as the menu item title to sort a field in ascending order.
sortFieldAscendingText
- sortFieldAscendingText Default value is "Sort Ascending"public java.lang.String getSortFieldAscendingText()
showHeaderContextMenu
for this grid, this
attribute will be shown as the menu item title to sort a field in ascending order.
public void setSortFieldDescendingText(java.lang.String sortFieldDescendingText)
showHeaderContextMenu
for this grid, this
attribute will be shown as the menu item title to sort a field in descending order.
sortFieldDescendingText
- sortFieldDescendingText Default value is "Sort Descending"public java.lang.String getSortFieldDescendingText()
showHeaderContextMenu
for this grid, this
attribute will be shown as the menu item title to sort a field in descending order.
public void setFieldVisibilitySubmenuTitle(java.lang.String fieldVisibilitySubmenuTitle)
showHeaderContextMenu
for this grid, and
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.
fieldVisibilitySubmenuTitle
- fieldVisibilitySubmenuTitle Default value is "Columns"public java.lang.String getFieldVisibilitySubmenuTitle()
showHeaderContextMenu
for this grid, and
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.
public void setFreezeFieldText(java.lang.String freezeFieldText)
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to freeze a currently unfrozen field.
This is a dynamic string - text within \${...}
will be evaluated as JS code
when the message is displayed, with viewer
available as a variable mapped to
the ListGrid instance, and field
as a variable pointing to the ListGrid field.
Default value returns "Freeze " + the field's summary title.
Note : This is an advanced setting
freezeFieldText
- freezeFieldText Default value is "Freeze \${viewer.getSummaryTitle(field)}"public java.lang.String getFreezeFieldText()
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to freeze a currently unfrozen field.
This is a dynamic string - text within \${...}
will be evaluated as JS code
when the message is displayed, with viewer
available as a variable mapped to
the ListGrid instance, and field
as a variable pointing to the ListGrid field.
Default value returns "Freeze " + the field's summary title.
public void setUnfreezeFieldText(java.lang.String unfreezeFieldText)
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to unfreeze a currently frozen field.
This is a dynamic string - text within \${...}
will be evaluated as JS code
when the message is displayed, with viewer
available as a variable mapped to
the ListGrid instance, and field
as a variable pointing to the ListGrid field.
Default value returns "Unfreeze " + the field's summary title.
Note : This is an advanced setting
unfreezeFieldText
- unfreezeFieldText Default value is "Unfreeze \${viewer.getSummaryTitle(field)}"public java.lang.String getUnfreezeFieldText()
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to unfreeze a currently frozen field.
This is a dynamic string - text within \${...}
will be evaluated as JS code
when the message is displayed, with viewer
available as a variable mapped to
the ListGrid instance, and field
as a variable pointing to the ListGrid field.
Default value returns "Unfreeze " + the field's summary title.
public void setGroupByText(java.lang.String groupByText)
showHeaderContextMenu
for this grid and
canGroupBy
is true, this string will be shown as the
title for the menu item to toggle the group by setting for a field.
This is a dynamic string - text within \${...}
will be evaluated as JS code
when the message is displayed, with viewer
available as a variable mapped to
the ListGrid instance, and field
as a variable pointing to the ListGrid field.
Default value returns "Group by " + the field's summary title.
Note : This is an advanced setting
groupByText
- groupByText Default value is "Group by \${title}"public java.lang.String getGroupByText()
showHeaderContextMenu
for this grid and
canGroupBy
is true, this string will be shown as the
title for the menu item to toggle the group by setting for a field.
This is a dynamic string - text within \${...}
will be evaluated as JS code
when the message is displayed, with viewer
available as a variable mapped to
the ListGrid instance, and field
as a variable pointing to the ListGrid field.
Default value returns "Group by " + the field's summary title.
showHeaderContextMenu
for this grid and
canGroupBy
is true, this string will be shown as the
title for the menu item to toggle the group by setting for a field.groupByText
string.
public void setUngroupText(java.lang.String ungroupText)
showHeaderContextMenu
for this grid, and
isGrouped
is true, this
attribute will be shown as the title for the menu item to ungroup the grid.
ungroupText
- ungroupText Default value is "Ungroup"public java.lang.String getUngroupText()
showHeaderContextMenu
for this grid, and
isGrouped
is true, this
attribute will be shown as the title for the menu item to ungroup the grid.
public void exportData()
dataSource
to
retrieve data that matches the current filter and sort criteria for this component, then
exports the resulting data to a file or window in the requested format.
For more information on exporting data, see com.smartgwt.client.data.DataSource#exportData
.
public void exportData(DSRequest requestProperties)
dataSource
to
retrieve data that matches the current filter and sort criteria for this component, then
exports the resulting data to a file or window in the requested format.
For more information on exporting data, see com.smartgwt.client.data.DataSource#exportData
.
requestProperties
- additional properties to set on the DSRequest that will be issuedpublic Criteria getCriteria()
public java.lang.Boolean willFetchData(Criteria newCriteria)
This is equivalent to calling this.data.willFetchData(...)
.
Always returns true if this component is not showing a set of data from the dataSource.
newCriteria
- new criteria to test.
public java.lang.Boolean willFetchData(Criteria newCriteria, java.lang.String textMatchStyle)
This is equivalent to calling this.data.willFetchData(...)
.
Always returns true if this component is not showing a set of data from the dataSource.
newCriteria
- new criteria to test.textMatchStyle
- New text match style. If not passed assumes textMatchStyle will not be modified.
public ListGridRecord getSelectedRecord()
selectionType
is
"single"
, or if you only care about the first selected record in
a multiple-record selection. To access all selected records, use
getSelection()
instead.
public void refreshCellStyle(int rowNum, int colNum)
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.
rowNum
- row number of cell to refreshcolNum
- column number of cell to refreshpublic HandlerRegistration addCellOverHandler(CellOverHandler handler)
Called when the mouse pointer enters a cell
addCellOverHandler
in interface HasCellOverHandlers
handler
- the cellOver handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRowOverHandler(RowOverHandler handler)
Called when the mouse pointer enters a row
addRowOverHandler
in interface HasRowOverHandlers
handler
- the rowOver handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addCellOutHandler(CellOutHandler handler)
Called when the mouse pointer leaves a cell
addCellOutHandler
in interface HasCellOutHandlers
handler
- the cellOut handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRowOutHandler(RowOutHandler handler)
Called when the mouse pointer leaves a row
addRowOutHandler
in interface HasRowOutHandlers
handler
- the rowOut handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addCellHoverHandler(CellHoverHandler handler)
Called when the mouse hovers over a cell if this.canHover is true. Returning false will suppress the hover text from being shown if this.showHover is true.
addCellHoverHandler
in interface HasCellHoverHandlers
handler
- the cellHover handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRowHoverHandler(RowHoverHandler 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.
addRowHoverHandler
in interface HasRowHoverHandlers
handler
- the rowHover handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addCellContextClickHandler(CellContextClickHandler handler)
Called when a cell receives a contextclick event.
addCellContextClickHandler
in interface HasCellContextClickHandlers
handler
- the cellContextClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRowContextClickHandler(RowContextClickHandler handler)
Called when a row receives a contextclick event.
addRowContextClickHandler
in interface HasRowContextClickHandlers
handler
- the rowContextClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addCellMouseDownHandler(CellMouseDownHandler handler)
Called when a cell receives a mousedown event.
addCellMouseDownHandler
in interface HasCellMouseDownHandlers
handler
- the cellMouseDown handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRowMouseDownHandler(RowMouseDownHandler handler)
Called when a row receives a mousedown event.
addRowMouseDownHandler
in interface HasRowMouseDownHandlers
handler
- the rowMouseDown handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addCellMouseUpHandler(CellMouseUpHandler handler)
Called when a cell receives a mouseup event.
addCellMouseUpHandler
in interface HasCellMouseUpHandlers
handler
- the cellMouseUp handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRowMouseUpHandler(RowMouseUpHandler handler)
Called when a row receives a mouseup event.
addRowMouseUpHandler
in interface HasRowMouseUpHandlers
handler
- the rowMouseUp handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addCellClickHandler(CellClickHandler handler)
Called when a cell receives a click event.
addCellClickHandler
in interface HasCellClickHandlers
handler
- the cellClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addCellDoubleClickHandler(CellDoubleClickHandler handler)
Called when a cell receives a double click event.
addCellDoubleClickHandler
in interface HasCellDoubleClickHandlers
handler
- the cellDoubleClick handler
HandlerRegistration
used to remove this handlerpublic void focusInFilterEditor()
showFilterEditor
) is visible for this grid,
this method will explictly put focus into the specified field in the filter editor.
public void focusInFilterEditor(java.lang.String fieldName)
showFilterEditor
) is visible for this grid,
this method will explictly put focus into the specified field in the filter editor.
fieldName
- Name of the field to put focus into. If unspecified focus will go to the first field in the editorpublic void filterByEditor()
showFilterEditor
) is visible for this grid,
this method will perform a filter based on the current values in the editor.
public java.lang.String getFieldState()
String
object.
This object can later be passed to setFieldState(java.lang.String)
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 canAddFormulaFields
or
canAddSummaryFields
added by the user.
public void setFieldState(java.lang.String fieldState)
String
object passed in.getFieldState()
.
fieldState
- state to apply to the listGrid's fields.public java.lang.Boolean isCheckboxField(ListGridField field)
checkboxField
used when SelectionAppearance
is
"checkbox". Use this method in your custom event handlers to avoid inappropriately
performing actions when the checkboxField is clicked on.
field
- field to test
public java.lang.String getSelectedState()
String
object.setSelectedState(java.lang.String)
to reset this grid's selection
the current state (assuming the same data is present in the grid).
public void setSelectedState(java.lang.String selectedState)
String
object passed in.getSelectedState()
.
selectedState
- Object describing the desired selection state of the gridpublic java.lang.String getSortState()
String
object.setSortState(java.lang.String)
to reset this grid's sort to
the current state (assuming the same fields are present in the grid).
public void setSortState(java.lang.String sortState)
String
object passed in.getSortState()
.
sortState
- Object describing the desired sort state for the grid.public java.lang.String getViewState()
String
object.setViewState(java.lang.String)
to reset this grid's vew state
to the current state (assuming the same data / fields are present in the grid).
public void setViewState(java.lang.String viewState)
String
object passed in.getViewState()
.
viewState
- Object describing the desired view state for the gridpublic void refreshFields()
com.smartgwt.client.widgets.grid.ListGridField#showIf
for each field, dynamically showing and
hiding the appropriate set of fields
public int getFocusRow()
public HandlerRegistration addRecordClickHandler(RecordClickHandler 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:
com.smartgwt.client.widgets.grid.ListGrid#rowClick
, so if that method is overridden
this method may not be fired.
addRecordClickHandler
in interface HasRecordClickHandlers
handler
- the recordClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRecordDoubleClickHandler(RecordDoubleClickHandler 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:
com.smartgwt.client.widgets.grid.ListGrid#rowDoubleClick
,
so if that method is overridden this method may not be fired.
addRecordDoubleClickHandler
in interface HasRecordDoubleClickHandlers
handler
- the recordDoubleClick handler
HandlerRegistration
used to remove this handlerpublic java.lang.Boolean startEditing()
Invoked when a cell is editable and the editEvent
occurs on that cell. Can
also be invoked explicitly.
If this method is called while editing is already in progress, the value from the current
editCell will either be stored locally as a temporary edit value, or saved via 'saveEdits()'
depending on this.saveByCell
, and the position of the new edit cell.
Will update the UI to show the editor for the new cell, and put focus in it unless
explicitly suppressed by the optional suppressFocus
parameter.
public java.lang.Boolean startEditing(int rowNum, int colNum, boolean suppressFocus)
Invoked when a cell is editable and the editEvent
occurs on that cell. Can
also be invoked explicitly.
If this method is called while editing is already in progress, the value from the current
editCell will either be stored locally as a temporary edit value, or saved via 'saveEdits()'
depending on this.saveByCell
, and the position of the new edit cell.
Will update the UI to show the editor for the new cell, and put focus in it unless
explicitly suppressed by the optional suppressFocus
parameter.
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 focussing in the edit form item when
the editor is shown.
public void stopHover()
public void refreshCell(int rowNum, int colNum)
The cell's value, CSS class, and CSS text will be refreshed, to the current values returned by getCellValue(), getCellStyle() and getCellCSSText() respectively.
rowNum
- row number of cell to refreshcolNum
- column number of cell to refreshpublic void refreshRow(int rowNum)
The cells' values, CSS classes, and CSS text will be refreshed, to the current values returned by getCellValue(), getCellStyle() and getCellCSSText() respectively.
rowNum
- row number of cell to refreshpublic void cancelEditing()
public void endEditing()
autoSaveEdits
is true, the value will be saved to the server.
public void discardEdits(int rowNum, int colNum)
startEditingNew()
for example), which has not yet been saved, this method
will remove the row entirely.
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)public void discardEdits(int rowNum, int colNum, boolean dontHideEditor)
startEditingNew()
for example), which has not yet been saved, this method
will remove the row entirely.
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).public java.lang.Boolean rowHasChanges(int rowNum)
rowNum
- index of row to check for changes
public java.lang.Boolean hasChanges()
public java.lang.Boolean cellHasChanges(int rowNum, int colNum)
rowNum
- index of row to check for changescolNum
- index of the col to check for changes
public java.lang.Boolean validateRow(int rowNum)
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.
rowNum
- index of row to be validated.
public java.lang.Boolean hasErrors()
public java.lang.Boolean rowHasErrors(int rowNum)
rowNum
- rowNum to check for errors
public void clearRowErrors(int rowNum)
rowNum
- index of row to clear validation error forpublic java.lang.String getDragTrackerTitle(ListGridRecord record, int rowNum)
getTitleField()
) for the record(s) being dragged (including any
icons / custom formatting / styling, etc).
Note: Only called if dragTrackerMode
is set to "title"
.
record
- First selected record being draggedrowNum
- row index of first record being dragged
public java.lang.Boolean willAcceptDrop()
Canvas.willAcceptDrop()
and works as follows:Canvas.willAcceptDrop()
(the superclass definition) returns false, this
method always returns false. This allows dragType
and
dropTypes
to be used to configure eligibility for drop. By default,
a ListGrid has no dropTypes configured and so this check will not prevent a drop.canReorderRecords
is
false, this method returns false.EventHandler.getDragTarget()
is another widget, if
canAcceptDroppedRecords
is false this method returns false.getDragData()
on the dragTarget
fails to return
an record object or an array of records, this method returns false.canAcceptDrop
set to false, return false.
willAcceptDrop
in class Canvas
public ListGridRecord getRecord(int recordNum)
com.smartgwt.client.widgets.grid.ListGrid#getCellRecord
.
recordNum
- row index of record to return.
public int getRecordIndex(ListGridRecord 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).
record
- the record whose index is to be retrieved
public int getEventRow()
public int getEventRow(int y)
y
- optional y-coordinate to obtain row number, in lieue of the y coordinate of the last mouse event
public int getEventColumn()
public int getEventColumn(int x)
x
- optional x-coordinate to obtain column number for, in lieue of the x coordinate of the last mouse event
public HandlerRegistration addSelectionChangedHandler(SelectionChangedHandler 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).
addSelectionChangedHandler
in interface HasSelectionChangedHandlers
handler
- the selectionChanged handler
HandlerRegistration
used to remove this handlerpublic void reorderField(int fieldNum, int moveToPosition)
fieldNum
- Number of the field to reordermoveToPosition
- New position for that fieldpublic void reorderFields(int start, int end, int moveDelta)
start
- Start of the range of fields to move, inclusiveend
- End of the range of fields to move, non-inclusivemoveDelta
- Distance to move bypublic void resizeField(int fieldNum, int newWidth)
fieldNum
- Number of the field to resizenewWidth
- New width of the fieldpublic java.lang.String getToggleFreezeText(ListGridField field)
showHeaderContextMenu
for this grid and
canFreezeFields
is true, this string will be shown as the
title for the menu item to toggle whether a field is frozen or unfrozen.
Default implementation evaluates and returns freezeFieldText
or
unfreezeFieldText
depending on whether the field is currently frozen.
field
- field to get the menu item title for
public void unsort()
Calling unsort()
disables visual indication of which column is the sort column,
and calls unsort()
on the underlying dataset.
Note that a grid viewing a paged dataset may not be able to support unsort()
because the sort order is what establishes the row numbering that allows data to be
fetched in batches.
unsort()
is automatically called when records are dropped or value of the
sorted column is changed.
public void ungroup()
public void setHeaderSpanTitle(java.lang.String name, java.lang.String newTitle)
headerSpans
dynamically.
name
- name of the headerSpan, as specified via name
.newTitle
- new title for the headerSpanpublic HandlerRegistration addCellSavedHandler(CellSavedHandler handler)
Fires after user edits have been successfully saved to the server, when the new value doesn't match the value before editing.
If you want immediate notification of a changes before changes has been saved to the
server, implement ListGridField.addChangeHandler(com.smartgwt.client.widgets.grid.events.ChangeHandler)
or
ListGridField.addChangedHandler(com.smartgwt.client.widgets.grid.events.ChangedHandler)
instead.
You can supply this method on the listGrid instance or on the listGridField(s) that you want to receive cellChanged events for. If both a field and the listGrid define a cellChanged method and that field receives an edit save, only the one defined on the field is called.
addCellSavedHandler
in interface HasCellSavedHandlers
handler
- the cellSaved handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addEditCompleteHandler(EditCompleteHandler handler)
Callback fired when inline edits have been successfully saved.
No default implementation.
addEditCompleteHandler
in interface HasEditCompleteHandlers
handler
- the editComplete handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addEditFailedHandler(EditFailedHandler 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 com.smartgwt.client.rpc.RPCManager#handleError
, which by default
will result in a warning dialog.
addEditFailedHandler
in interface HasEditFailedHandlers
handler
- the editFailed handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addEditorEnterHandler(EditorEnterHandler handler)
Callback fired when the user starts editing a new cell.
This callback is typically used to establish dynamic default values via
setEditValue(int, int, java.lang.String)
or setEditValues(int, java.util.Map)
.
Can also be overriden on a per-field basis via
ListGridField.addEditorEnterHandler(com.smartgwt.client.widgets.grid.events.EditorEnterHandler)
.
addEditorEnterHandler
in interface HasEditorEnterHandlers
handler
- the editorEnter handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRowEditorEnterHandler(RowEditorEnterHandler handler)
Callback fired when the user starts editing a new row.
addRowEditorEnterHandler
in interface HasRowEditorEnterHandlers
handler
- the rowEditorEnter handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
Callback fired when the user attempts to navigate away from the current edit cell, or complete the current edit.
Return false from this method to cancel the default behavior (Saving / cancelling the current edit / moving to the next edit cell).
This callback is typically used to dynamically update values or value maps for related
fields (via setEditValue(int, int, java.lang.String)
and com.smartgwt.client.widgets.grid.ListGrid#setEditorValueMap
respectively, or to
implement custom navigation (via startEditing()
.
Can be overriden at the field level as field.editorExit.
addEditorExitHandler
in interface HasEditorExitHandlers
handler
- the editorExit handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRowEditorExitHandler(RowEditorExitHandler handler)
Callback fired when the user attempts to navigate away from the current edit row, or complete the current edit.
Return false from this method to cancel the default behavior (Saving / cancelling the current edit / moving to the next edit cell).
addRowEditorExitHandler
in interface HasRowEditorExitHandlers
handler
- the rowEditorExit handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addFieldStateChangedHandler(FieldStateChangedHandler handler)
Notification method executed when columns are resized or reordered, or fields are shown or hidden. Has no default implementation.
addFieldStateChangedHandler
in interface HasFieldStateChangedHandlers
handler
- the fieldStateChanged handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addDataArrivedHandler(DataArrivedHandler handler)
Notification method fired when new data arrives from the server to be displayed in this
ListGrid, (for example in response to the user scrolling a new set of rows into view).
Only applies to databound listGrids where the data
attribute is a
com.smartgwt.client.data.ResultSet
. This ResultSet may have been created manually and applied to the grid via
a call to setData(com.smartgwt.client.widgets.grid.ListGridRecord[])
or may have been created and automatically assigned if
fetchData()
was used to populate the grid. This method is fired directly in
response to com.smartgwt.client.data.ResultSet#dataArrived
firing on the data object.
addDataArrivedHandler
in interface HasDataArrivedHandlers
handler
- the dataArrived handler
HandlerRegistration
used to remove this handlerprotected void onInit()
onInit
in class BaseWidget
protected java.lang.String getCellCSSText(ListGridRecord record, int rowNum, int colNum)
"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
record
- cell record as returned by getCellRecordrowNum
- row number for the cellcolNum
- column number of the cell
protected boolean canEditCell(int rowNum, int colNum)
The default implementation of canEditCell()
respects the various property settings affecting
editability: canEdit
disables editing for a field,
a record with the recordEditProperty
set to false is not editable,
and disabled records are not editable.
You can override this method to control editability on a cell-by-cell basis.
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
com.smartgwt.client.widgets.grid.ListGrid#editorExit
on another cell, call refreshCell() to show or hide the editor canEditCell()
may be called when there is no record available.
The values input so far by the user are available via getEditValues(int)
.
Note: This is an override point
rowNum
- row number for the cellcolNum
- column number of the cell
protected MenuItem[] getHeaderContextMenuItems(java.lang.Integer fieldNum)
fieldNum
- index of the field the user clicked in the fields array. Note: if the user right-clicked the sorter button this parameter will be null.
protected java.lang.String getBaseStyle(ListGridRecord record, int rowNum, int colNum)
record
- the recordrowNum
- the row numcolNum
- the colum num
public void setBaseStyle(java.lang.String baseStyle) throws java.lang.IllegalStateException
baseStyle
- baseStyle Default value is "cell"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getBaseStyle()
editFailedBaseStyle
is defined, and the cell is displaying a validation error return this value.editPendingBaseStyle
is defined, and the cell is displaying an edit value that has not yet been saved (see autoSaveEdits
) return this value.recordBaseStyleProperty
, if defined, otherwise baseStyle
, or finally baseStyle
public void setDateInputFormat(java.lang.String dateInputFormat)
inputFormat
applied to editors for fields of type "date"
3 character string containing the "M", "D" and "Y" characters to indicate the format of strings being parsed into Date instances via Date.parseInput().
As an example - an input format of "MDY" would parse "01/02/1999" to Jan 2nd 1999
dateInputFormat
- the dateInputFormatpublic void setFields(ListGridField... fields)
If dataSource
is also set, this value acts as a set of
overrides as explained in fields
. 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.
Consider the following methods for more efficient, more incremental changes: resizeField, reorderField,
showField, hideField, setFieldProperty.
fields
- array of fields to draw. Default value is nullpublic void setData(ListGridRecord[] records)
This property is settable directly only as part of a ListGrid
constructor. If you want to change the ListGrid
's data after initial creation, call setData(com.smartgwt.client.widgets.grid.ListGridRecord[])
.
This property will typically not be explicitly specified
for databound ListGrids, where the data is returned from the server via databound component methods such as
fetchData()
. In this case the data objects will be set to a
com.smartgwt.client.data.ResultSet
rather than a simple array. Initialize the data object with the given
array. Observes methods of the data object so that when the data changes, the listGrid will redraw
automatically.
records
- data to show in the list. Default value is nullpublic void setData(Record[] data)
data
- array of Record objects.setData(ListGridRecord[])
public void setRecords(ListGridRecord[] records)
setData(ListGridRecord[])
records
- the recordspublic ListGridRecord[] getRecords()
public void setAutoFitData(Autofit autoFitData)
Valid settings are
"vertical"
: expand vertically to accomodate records."horizontal"
:
expand horizontally to accomodate fields."both"
: expand horizontally and vertically to
accomodate content.autoFitMaxHeight
, autoFitMaxRecords
, autoFitMaxWidth
, autoFitMaxColumns
. Setter for autoFitData
.
autoFitData
- One of "vertical"
, "horizontal"
or "both"
. To disable
auto fit behavior, pass in null
.. Default value is nullpublic void setRecordEnabledProperty(java.lang.String recordEnabledProperty) throws java.lang.IllegalStateException
Setting this property on a record will effect the visual style and interactivity of
the record. If set to false
the record (row in a ListGrid
or
TreeGrid
) will not highlight when the mouse moves over it, nor will it respond to
mouse clicks.
recordEnabledProperty
- recordEnabledProperty Default value is "_enabled"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getRecordEnabledProperty()
Setting this property on a record will effect the visual style and interactivity of
the record. If set to false
the record (row in a ListGrid
or
TreeGrid
) will not highlight when the mouse moves over it, nor will it respond to
mouse clicks.
public Autofit getAutoFitData()
Valid settings are
"vertical"
: expand vertically to accomodate records."horizontal"
:
expand horizontally to accomodate fields."both"
: expand horizontally and vertically to
accomodate content.autoFitMaxHeight
, autoFitMaxRecords
, autoFitMaxWidth
, autoFitMaxColumns
.
public void setSortField(java.lang.String fieldName)
fieldName
- the field Namepublic java.lang.String getSortField()
public void setSortField(int fieldIndex)
fieldIndex
- the field indexpublic void setHeaderSpans(HeaderSpan... headerSpans) throws java.lang.IllegalStateException
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.
isc.ListGrid.create({ headerHeight:40, fields : [ { name:"field1" }, { name:"field2" }, { name:"field3" } ], headerSpans : [ { fields: ["field1", "field2"], title: "Field 1 and 2" } ] });Header spans will automatically react to resizing of the headers they span, and will be hidden automatically when all of the spanned fields are hidden.
Header spans appear in the header
area of the ListGrid, sharing space with the existing
headers, so it's typical to set headerHeight
to
approximately double its normal height when using headerSpans.
See HeaderSpan
for many properties that allow the control of the appearance of headerSpans. Note that headerSpans are created
via the AutoChild pattern, hence you can change the SmartGWT component
being used, or any of it's properties.
Neither headerSpans themselves nor the fields within them may be drag reordered, but other unspanned headers may be.
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
com.smartgwt.client..CubeGrid
component is the right choice.
Update the headerSpans configuration on the grid dynamically.
headerSpans
- same configuration block as that passed to headerSpans
.. Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic void setGroupByField(java.lang.String field) throws java.lang.IllegalStateException
groupBy(java.lang.String...)
to update the grouping field
list, instead of modifying groupByField directly.
field
- groupByField Default value is see below
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic void setGroupStartOpen(java.lang.String group)
group
- the grouppublic void setGroupStartOpen(java.lang.String... groupValues)
groupValues
- Array of values that should be openedpublic int getTotalRows()
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())
public void scrollToRow(int rowNum)
rowNum
- the row numpublic void scrollBodyTo(java.lang.Integer left, java.lang.Integer top)
left
- the left positiontop
- the top positionpublic void showField(java.lang.String fieldName)
fieldName
- the field namepublic void showField(java.lang.String fieldName, boolean suppressRelayout)
fieldName
- the field namesuppressRelayout
- if true, don't relayout non-explicit sized fields to fit the available spacepublic void setFieldTitle(java.lang.String fieldName, java.lang.String title)
fieldName
- name of the field, or index.title
- new titlepublic void setFieldTitle(int fieldNum, java.lang.String title)
fieldNum
- name of the field, or index.title
- new titlepublic void hideField(java.lang.String fieldName)
fieldName
- the field namepublic void hideField(java.lang.String fieldName, boolean suppressRelayout)
fieldName
- the field namesuppressRelayout
- if true, don't relayout non-explicit sized fields to fit the available spacepublic void startEditingNew()
startEditing()
.
public void startEditingNew(java.util.Map defaultValues)
startEditing()
.
defaultValues
- the default field values for the new recordpublic int getFieldNum(java.lang.String fieldName)
fieldName
- the field name
public java.lang.String getFieldName(java.lang.String fieldName)
fieldName
- field name
public java.lang.String getFieldName(int colNum)
colNum
- number or id of the field.
public ListGridField getField(java.lang.String fieldName)
When using fields
, the field definition may be a mix of information
derived from fields
and dataSource
.
fieldName
- the field name.
public ListGridField getField(int colNum)
When using fields
, the field definition may be a mix of information
derived from fields
and dataSource
.
colNum
- number or id of the field.
public ListGridRecord[] getSelection()
public ListGridField[] getFields()
public int getEditRow()
public int getEditCol()
public void openRecordDetailGrid(ListGridRecord record, DataSource detailDataSource)
record
- the recorddetailDataSource
- the detail deta sourcepublic void closeRecord(ListGridRecord record)
record
- the recordpublic void openRecordEditor(ListGridRecord record)
record
- the recordpublic void addData(Record record)
record
- new recordpublic void addData(Record record, DSCallback callback)
record
- new recordcallback
- method to call on operation completionpublic void addData(Record record, DSCallback callback, DSRequest requestProperties)
record
- new recordcallback
- method to call on operation completionrequestProperties
- additional properties to set on the DSRequest
that will be issuedpublic void updateData(Record record)
record
- updated recordpublic void updateData(Record record, DSCallback callback)
record
- updated recordcallback
- method to call on operation completionpublic void updateData(Record record, DSCallback callback, DSRequest requestProperties)
record
- updated recordcallback
- method to call on operation completionrequestProperties
- additional properties to set on the DSRequest
that will be issuedpublic void removeData(Record record)
record
- primary key values of record to delete, (or complete
record)public void removeData(Record record, DSCallback callback)
record
- primary key values of record to delete, (or complete
record)callback
- method to call on operation completionpublic void removeData(Record record, DSCallback callback, DSRequest requestProperties)
record
- primary key values of record to delete, (or
complete record)callback
- method to call on operation completionrequestProperties
- additional properties to set on the DSRequest
that will be issuedpublic void removeSelectedData()
If no records are selected, no action is taken. The grid will automatically be updated if the record deletion succeeds.
public void removeSelectedData(DSCallback callback, DSRequest requestProperties)
If no records are selected, no action is taken. The grid will automatically be updated if the record deletion succeeds.
callback
- callback to fire when the data has been removedrequestProperties
- additional properties to set on the DSRequest
that will be issuedpublic void groupBy(java.lang.String... fields)
Grouping tranforms the current dataset into a Tree on the fly, then provides a familiar tree interface for exploring the grouped data.
Grouping works automatically with any dataset,
providing simple default grouping based on each field's declared type. However, you can use the com.smartgwt.client.widgets.grid.ListGridField#getGroupValue
API to control how records are grouped, and the
com.smartgwt.client.widgets.grid.ListGridField#getGroupTitle
API to control how groups are titled.
Grouping can be performed programmatically via this API, or you can set canGroupBy
to enable menus that allow the user to
performing grouping. To group a grid automatically, instantiate the grid with a groupByField
setting.
While grouped, the
automatically created Tree is available as groupTree
and the original dataset is availabe as originalData
.
public void clearCriteria()
public void clearCriteria(DSCallback callback, DSRequest requestProperties)
callback
- callback to invoke on completionrequestProperties
- additional properties to set on the DSRequest
that will be issuedpublic java.lang.Boolean sort()
Updates the sortFieldNum and sortDirection to reflect the new sort order of the grid.
public java.lang.Boolean sort(java.lang.String sortField, SortDirection sortDirection)
sortDirection
if specified, or
sortDirection
.
Updates the sortFieldNum and sortDirection to reflect the new sort order of the grid.
sortField
- the field name to sort bysortDirection
- the direction to sort in
public java.lang.Boolean sort(int sortCol, SortDirection sortDirection)
sortDirection
if specified, or
sortDirection
.
Updates the sortFieldNum and sortDirection to reflect the new sort order of the grid.
sortCol
- the column number to sort bysortDirection
- the direction to sort in
public void saveAllEdits()
public void discardAllEdits()
public void freezeField(java.lang.String fieldName)
fieldName
- the field namepublic void freezeField(int colNum)
colNum
- the column numpublic void unfreezeField(java.lang.String fieldName)
fieldName
- the field namepublic void unfreezeField(int colNum)
colNum
- the column numpublic void refreshCell(int rowNum, int colNum, boolean refreshingRow, boolean allowEditCellRefresh)
The cell's value, CSS class, and CSS text will be refreshed, to the current values returned by getCellValue(), getCellStyle() and getCellCSSText() respectively.
rowNum
- row number of cell to refreshcolNum
- column number of cell to refreshpublic java.lang.Integer[] getVisibleRows()
public java.lang.Integer[] getDrawnRows()
The drawn rows differ from the getVisibleRows()
because of drawAheadRatio
. The drawn rows are the apppropriate range to consider if you need to, eg, using refreshCell(int, int)
to update all the cells in a column.
If the grid is undrawn or the emptyMessage
is currently shown, returns [null,null];
public void fetchRelatedData(Record record, DataSource dataSource)
record
- the DataSource recorddataSource
- the schema of the DataSource recordpublic void fetchRelatedData(Record record, DataSource dataSource, DSCallback callback, DSRequest requestProperties)
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 issuedpublic java.lang.Object getEditedCell(int rowNum, java.lang.String fieldName)
rowNum
- the row numberfieldName
- the field name
public java.lang.Object getEditedCell(int rowNum, int colNum)
rowNum
- the row numbercolNum
- the column number
public java.lang.Object getEditedCell(Record record, java.lang.String fieldName)
record
- an Object containing values for all the record's primary keysfieldName
- the field name
public java.lang.Object getEditedCell(Record record, int colNum)
record
- an Object containing values for all the record's primary keyscolNum
- the column number
public Record getEditedRecord(int rowNum)
The returned value is never null, and can be freely modified.
rowNum
- the row num
public java.lang.Object getEditValue(int rowNum, int colNum)
rowNum
- index of the row for which the editValue should be returnedcolNum
- index of the field for which value should be returned
public void setEditValue(int rowNum, int colNum, java.lang.String value)
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, int colNum, java.util.Date value)
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, int colNum, double value)
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, int colNum, boolean value)
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, int colNum, float value)
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, int colNum, int value)
rowNum
- row numbercolNum
- column number of cellvalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, java.lang.String fieldName, java.lang.String value)
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, java.lang.String fieldName, java.util.Date value)
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, java.lang.String fieldName, double value)
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, java.lang.String fieldName, boolean value)
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, java.lang.String fieldName, float value)
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate fieldpublic void setEditValue(int rowNum, java.lang.String fieldName, int value)
rowNum
- row numberfieldName
- the field namevalue
- new value for the appropriate fieldpublic void setEditValues(int rowNum, java.util.Map values)
rowNum
- the row num for the record being editedvalues
- new values for the rowpublic java.lang.Object getEditValue(int rowNum, java.lang.String fieldName)
rowNum
- index of the row for which the editValue should be returnedfieldName
- field name for which value should be returned
public java.util.Map getEditValues(int rowNum)
rowNum
- rowNum of the record being edited
public java.util.Map getEditValues(Record record)
record
- an Object containing values for all the record's primary keys
public void setRowErrors(int rowNum, java.util.Map errors)
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 errorspublic void setFieldError(int rowNum, java.lang.String fieldName, java.lang.String errorMessage)
rowNum
- row index of cell to add validation error forfieldName
- field name of cell to add validation error forerrorMessage
- validation error messagepublic void setFieldError(int rowNum, java.lang.String fieldName, java.lang.String[] errorMessages)
rowNum
- row index of cell to add validation error forfieldName
- field name of cell to add validation error forerrorMessages
- validation error messagespublic void selectSingleRecord(Record record)
Record
passed in explicitly, or by index, and deselect everything else. When programmatic selection of records is a requirement and selectionType
is "single", use this method rather than selectRecord(com.smartgwt.client.data.Record)
to enforce mutually-exclusive record-selection.
record
- record to selectpublic void selectSingleRecord(int rowNum)
Record
passed in explicitly, or by index, and deselect everything else. When programmatic selection of records is a requirement and selectionType
is "single", use this method rather than selectRecord(com.smartgwt.client.data.Record)
to enforce mutually-exclusive record-selection.
rowNum
- rowNum (or row number) to selectpublic int getFormulaFieldValue(ListGridField field, Record record)
canAddFormulaFields
.
field
- field that has a formularecord
- record to use to compute formula value
public int getSummaryFieldValue(ListGridField field, Record record)
canAddSummaryFields
.
field
- field that has a summary formatrecord
- record to use to compute formula value
public java.util.Map getRowErrors(int rowNum)
rowNum
- the index of row to check for validation errors
public java.lang.String[] getCellErrors(int rowNum, java.lang.String fieldName)
rowNum
- the index of row to check for validation errorsfieldName
- field to check for validation errors
public void setSortDirection(SortDirection sortDirection)
sortField
. May be overridden by specifying sortDirection
. After initialization, this property will be updated on sort()
to reflect the current sort direction of the grid.
sortDirection
- sortDirection Default value is SortDirection.ASCENDINGpublic SortDirection getSortDirection()
sortField
. May be overridden by specifying sortDirection
. After initialization, this property will be updated on sort()
to reflect the current sort direction of the grid.
public void setCriteria(Criteria criteria)
criteria
- new criteria to showpublic void setFilterEditorCriteria(Criteria criteria)
showFilterEditor
is true, this method will update the criteria shown in the filterEditor
without performing a filter.
criteria
- New criteria to showpublic Criteria getFilterEditorCriteria()
showFilterEditor
is true, this method will return the criteria currently displayed in the filterEditor
. Note that these values may differ from the criteria returned by getCriteria()
if the filter editor values have been modified without performing an actual filter.
public java.lang.Boolean validateCell(int rowNum, java.lang.String fieldName)
validateByCell
is true.
rowNum
- index of row to be validated.fieldName
- field name of field to be validated
public java.lang.Boolean validateCell(int rowNum, int colIndex)
validateByCell
is true.
rowNum
- index of row to be validated.colIndex
- column index of field to be validated
public java.lang.Boolean cellHasErrors(int rowNum, java.lang.String fieldName)
rowNum
- index of row to check for validation errorsfieldName
- name of field to check for validation errors
public java.lang.Boolean cellHasErrors(int rowNum, int colIndex)
rowNum
- index of row to check for validation errorscolIndex
- index of column to check for validation errors
public void clearFieldError(int rowNum, java.lang.String fieldName)
rowNum
- row index of cell to add validation error forfieldName
- field name of cell to add validation error forpublic void clearFieldError(int rowNum, int colIndex)
rowNum
- row index of cell to add validation error forcolIndex
- col index of cell to add validation error forpublic void setValueMap(java.lang.String fieldName, java.util.LinkedHashMap valueMap)
com.smartgwt.client.widgets.grid.ListGrid#setEditorValueMap
and com.smartgwt.client.widgets.grid.ListGrid#getEditorValueMap
methods which allow further
customization of the valueMap displayed while the field is in edit mode.
fieldName
- Name of field to updatevalueMap
- ValueMap for the fieldpublic void clearEditValue(int rowNum, java.lang.String fieldName)
The saved record value will be displayed in the the appropriate cell instead. Will also discard any validation errors for the specified field / row.
rowNum
- the row numberfieldName
- name of field for which the value is to be clearedpublic HandlerRegistration addHeaderClickHandler(HeaderClickHandler handler)
Handler fired when the user clicks a header in this listGrid before any other processing occurs. Return false to suppress the default header click handling
addHeaderClickHandler
in interface HasHeaderClickHandlers
handler
- the onHeaderClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRecordDropHandler(RecordDropHandler handler)
Handler fired when the user drops a record onto this listGrid before any other processing of the drop occurs. Return false to suppress the default record drop handling.
addRecordDropHandler
in interface HasRecordDropHandlers
handler
- the onRecordDrop handler
HandlerRegistration
used to remove this handlerpublic void setDataPageSize(int dataPageSize)
DataBoundComponent
com.smartgwt.client.data.ResultSet
object for this
component. In effect, this gives you control over the resultSize
attribute for this component.
Note that regardless of the dataPageSize
setting, a component will always fetch
all of data that it needs to draw. Settings such as
showAllRecords
,
drawAllMaxCells
and
drawAheadRatio
can cause more rows than the configured
dataPageSize
to be fetched.
setDataPageSize
in interface DataBoundComponent
dataPageSize
- dataPageSize Default value is 75public int getDataPageSize()
DataBoundComponent
com.smartgwt.client.data.ResultSet
object for this
component. In effect, this gives you control over the resultSize
attribute for this component.
Note that regardless of the dataPageSize
setting, a component will always fetch
all of data that it needs to draw. Settings such as
showAllRecords
,
drawAllMaxCells
and
drawAheadRatio
can cause more rows than the configured
dataPageSize
to be fetched.
getDataPageSize
in interface DataBoundComponent
public void setUseAllDataSourceFields(java.lang.Boolean useAllDataSourceFields)
DataBoundComponent
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.
${isc.DocUtils.linkForExampleId('validationFieldBinding', 'This example')} shows a mixture of component fields and DataSource fields, and how they interact for validation.
setUseAllDataSourceFields
in interface DataBoundComponent
useAllDataSourceFields
- useAllDataSourceFields Default value is falsepublic java.lang.Boolean getUseAllDataSourceFields()
DataBoundComponent
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.
${isc.DocUtils.linkForExampleId('validationFieldBinding', 'This example')} shows a mixture of component fields and DataSource fields, and how they interact for validation.
getUseAllDataSourceFields
in interface DataBoundComponent
public void setShowHiddenFields(java.lang.Boolean showHiddenFields)
DataBoundComponent
hidden:true
when a DataBoundComponent is given a
DataSource but no component.fields
.
The hidden
property is used on DataSource fields to mark fields that are
never of meaning to an end user.
setShowHiddenFields
in interface DataBoundComponent
showHiddenFields
- showHiddenFields Default value is falsepublic java.lang.Boolean getShowHiddenFields()
DataBoundComponent
hidden:true
when a DataBoundComponent is given a
DataSource but no component.fields
.
The hidden
property is used on DataSource fields to mark fields that are
never of meaning to an end user.
getShowHiddenFields
in interface DataBoundComponent
public void setShowDetailFields(java.lang.Boolean showDetailFields)
DataBoundComponent
detail:true
when a DataBoundComponent is
given a DataSource but no component.fields
.
The detail
property is used on DataSource fields to mark fields that
shouldn't appear by default in a view that tries to show many records in a small space.
setShowDetailFields
in interface DataBoundComponent
showDetailFields
- showDetailFields Default value is falsepublic java.lang.Boolean getShowDetailFields()
DataBoundComponent
detail:true
when a DataBoundComponent is
given a DataSource but no component.fields
.
The detail
property is used on DataSource fields to mark fields that
shouldn't appear by default in a view that tries to show many records in a small space.
getShowDetailFields
in interface DataBoundComponent
public void setShowComplexFields(java.lang.Boolean showComplexFields)
DataBoundComponent
component.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
setShowComplexFields
in interface DataBoundComponent
showComplexFields
- showComplexFields Default value is truepublic java.lang.Boolean getShowComplexFields()
DataBoundComponent
component.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.
getShowComplexFields
in interface DataBoundComponent
public void setFetchOperation(java.lang.String fetchOperation)
DataBoundComponent
setFetchOperation
in interface DataBoundComponent
fetchOperation
- fetchOperation Default value is nullpublic java.lang.String getFetchOperation()
DataBoundComponent
getFetchOperation
in interface DataBoundComponent
public void setUpdateOperation(java.lang.String updateOperation)
DataBoundComponent
setUpdateOperation
in interface DataBoundComponent
updateOperation
- updateOperation Default value is nullpublic java.lang.String getUpdateOperation()
DataBoundComponent
getUpdateOperation
in interface DataBoundComponent
public void setAddOperation(java.lang.String addOperation)
DataBoundComponent
setAddOperation
in interface DataBoundComponent
addOperation
- addOperation Default value is nullpublic java.lang.String getAddOperation()
DataBoundComponent
getAddOperation
in interface DataBoundComponent
public void setRemoveOperation(java.lang.String removeOperation)
DataBoundComponent
setRemoveOperation
in interface DataBoundComponent
removeOperation
- removeOperation Default value is nullpublic java.lang.String getRemoveOperation()
DataBoundComponent
getRemoveOperation
in interface DataBoundComponent
public void setExportFields(java.lang.String[] exportFields)
DataBoundComponent
If exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.
setExportFields
in interface DataBoundComponent
exportFields
- exportFields Default value is nullpublic java.lang.String[] getExportFields()
DataBoundComponent
If exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.
getExportFields
in interface DataBoundComponent
public void setExportAll(java.lang.Boolean exportAll)
DataBoundComponent
fields
.
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.
setExportAll
in interface DataBoundComponent
exportAll
- exportAll Default value is falsepublic java.lang.Boolean getExportAll()
DataBoundComponent
fields
.
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.
getExportAll
in interface DataBoundComponent
public void setPreventDuplicates(java.lang.Boolean preventDuplicates) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
. When a duplicate transfer is detected,
a dialog will appear showing the duplicateDragMessage
.
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.
setPreventDuplicates
in interface DataBoundComponent
preventDuplicates
- preventDuplicates Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getPreventDuplicates()
DataBoundComponent
DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent)
. When a duplicate transfer is detected,
a dialog will appear showing the duplicateDragMessage
.
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.
getPreventDuplicates
in interface DataBoundComponent
public void setDuplicateDragMessage(java.lang.String duplicateDragMessage) throws java.lang.IllegalStateException
DataBoundComponent
preventDuplicates
is enabled.
setDuplicateDragMessage
in interface DataBoundComponent
duplicateDragMessage
- duplicateDragMessage Default value is "Duplicates not allowed"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getDuplicateDragMessage()
DataBoundComponent
preventDuplicates
is enabled.
getDuplicateDragMessage
in interface DataBoundComponent
public void setAddDropValues(java.lang.Boolean addDropValues)
DataBoundComponent
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
setAddDropValues
in interface DataBoundComponent
addDropValues
- addDropValues Default value is truepublic java.lang.Boolean getAddDropValues()
DataBoundComponent
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
getAddDropValues
in interface DataBoundComponent
public void setDropValues(java.util.Map dropValues)
DataBoundComponent
addDropValues
is true and both
the source and target widgets are databound, either to the same DataSource or
to different DataSources that are related via a foreign key, this object
provides the "drop values" that SmartGWT will apply to the dropped object
before updating it.
If this property is not defined, SmartGWT 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
setDropValues
in interface DataBoundComponent
dropValues
- dropValues Default value is nullpublic java.util.Map getDropValues()
DataBoundComponent
addDropValues
is true and both
the source and target widgets are databound, either to the same DataSource or
to different DataSources that are related via a foreign key, this object
provides the "drop values" that SmartGWT will apply to the dropped object
before updating it.
If this property is not defined, SmartGWT 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.
getDropValues
in interface DataBoundComponent
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:
addDropValues
is falseYou can override this method if you need more complex setting of drop values than can be provided by simply supplying a dropValues object.
public void setUseFlatFields(java.lang.Boolean useFlatFields) throws java.lang.IllegalStateException
DataBoundComponent
useFlatFields
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>Setting
useFlatFields
on a DynamicForm
that is bound to this input
message schema would result in 5 FormItem
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 a
WebService
, these values can be automatically
mapped to the structure of the input message for a web service operation by setting
useFlatFields
(for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)
) or by setting
useFlatFields
(for use with a DataSource
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.
setUseFlatFields
in interface DataBoundComponent
useFlatFields
- useFlatFields Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getUseFlatFields()
DataBoundComponent
useFlatFields
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>Setting
useFlatFields
on a DynamicForm
that is bound to this input
message schema would result in 5 FormItem
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 a
WebService
, these values can be automatically
mapped to the structure of the input message for a web service operation by setting
useFlatFields
(for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)
) or by setting
useFlatFields
(for use with a DataSource
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.
getUseFlatFields
in interface DataBoundComponent
public void setHiliteProperty(java.lang.String hiliteProperty)
DataBoundComponent
id
for a hilite defined on this component.
setHiliteProperty
in interface DataBoundComponent
hiliteProperty
- hiliteProperty Default value is "_hilite"public java.lang.String getHiliteProperty()
DataBoundComponent
id
for a hilite defined on this component.
getHiliteProperty
in interface DataBoundComponent
public void setDragDataAction(DragDataAction dragDataAction)
DataBoundComponent
setDragDataAction
in interface DataBoundComponent
dragDataAction
- dragDataAction Default value is Canvas.MOVEpublic DragDataAction getDragDataAction()
DataBoundComponent
getDragDataAction
in interface DataBoundComponent
public void setDragTrackerStyle(java.lang.String dragTrackerStyle)
DataBoundComponent
setDragTrackerStyle
in interface DataBoundComponent
dragTrackerStyle
- dragTrackerStyle Default value is "gridDragTracker"public java.lang.String getDragTrackerStyle()
DataBoundComponent
getDragTrackerStyle
in interface DataBoundComponent
public void setCanAddFormulaFields(java.lang.Boolean canAddFormulaFields)
DataBoundComponent
com.smartgwt.client..FormulaBuilder
.
User-added formula fields can be persisted via getFieldState()
and
setFieldState(java.lang.String)
.
setCanAddFormulaFields
in interface DataBoundComponent
canAddFormulaFields
- canAddFormulaFields Default value is falsepublic void addSummaryField()
DataBoundComponent
com.smartgwt.client..SummaryBuilder
to create a new Summary Field. This
is equivalent to calling DataBoundComponentGen#editSummaryField
with
no paramater.
addSummaryField
in interface DataBoundComponent
public void addFormulaField()
DataBoundComponent
com.smartgwt.client..FormulaBuilder
to create a new Formula Field. This
is equivalent to calling DataBoundComponentGen#editFormulaField
with
no paramater.
addFormulaField
in interface DataBoundComponent
public java.lang.Boolean getCanAddFormulaFields()
DataBoundComponent
com.smartgwt.client..FormulaBuilder
.
User-added formula fields can be persisted via getFieldState()
and
setFieldState(java.lang.String)
.
getCanAddFormulaFields
in interface DataBoundComponent
public void setAddFormulaFieldText(java.lang.String addFormulaFieldText)
DataBoundComponent
setAddFormulaFieldText
in interface DataBoundComponent
addFormulaFieldText
- addFormulaFieldText Default value is "Add formula column..."public java.lang.String getAddFormulaFieldText()
DataBoundComponent
getAddFormulaFieldText
in interface DataBoundComponent
public void setEditFormulaFieldText(java.lang.String editFormulaFieldText)
DataBoundComponent
setEditFormulaFieldText
in interface DataBoundComponent
editFormulaFieldText
- editFormulaFieldText Default value is "Edit formula..."public java.lang.String getEditFormulaFieldText()
DataBoundComponent
getEditFormulaFieldText
in interface DataBoundComponent
public void setCanAddSummaryFields(java.lang.Boolean canAddSummaryFields)
DataBoundComponent
com.smartgwt.client..SummaryBuilder
.
User-added summary fields can be persisted via getFieldState()
and
setFieldState(java.lang.String)
.
setCanAddSummaryFields
in interface DataBoundComponent
canAddSummaryFields
- canAddSummaryFields Default value is falsepublic java.lang.Boolean getCanAddSummaryFields()
DataBoundComponent
com.smartgwt.client..SummaryBuilder
.
User-added summary fields can be persisted via getFieldState()
and
setFieldState(java.lang.String)
.
getCanAddSummaryFields
in interface DataBoundComponent
public void setAddSummaryFieldText(java.lang.String addSummaryFieldText)
DataBoundComponent
setAddSummaryFieldText
in interface DataBoundComponent
addSummaryFieldText
- addSummaryFieldText Default value is "Add summary column..."public java.lang.String getAddSummaryFieldText()
DataBoundComponent
getAddSummaryFieldText
in interface DataBoundComponent
public void setEditSummaryFieldText(java.lang.String editSummaryFieldText)
DataBoundComponent
setEditSummaryFieldText
in interface DataBoundComponent
editSummaryFieldText
- editSummaryFieldText Default value is "Edit summary format..."public java.lang.String getEditSummaryFieldText()
DataBoundComponent
getEditSummaryFieldText
in interface DataBoundComponent
public void selectRecord(Record record)
DataBoundComponent
Record
passed in explicitly, or by index.
selectRecord
in interface DataBoundComponent
record
- record (or row number) to selectpublic void selectRecord(int record)
DataBoundComponent
Record
passed in explicitly, or by index.
selectRecord
in interface DataBoundComponent
record
- record (or row number) to selectpublic void selectRecord(int record, boolean newState)
DataBoundComponent
Record
passed in explicitly, or by index.
selectRecord
in interface DataBoundComponent
record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)public void selectRecord(Record record, boolean newState)
DataBoundComponent
Record
passed in explicitly, or by index.
selectRecord
in interface DataBoundComponent
record
- record (or row number) to selectnewState
- new selection state (if null, defaults to true)public void selectRecords(int[] records)
DataBoundComponent
Record
s passed in explicitly, or by index.
selectRecords
in interface DataBoundComponent
records
- records (or row numbers) to selectpublic void selectRecords(int[] records, boolean newState)
DataBoundComponent
Record
s passed in explicitly, or by index.
selectRecords
in interface DataBoundComponent
records
- records (or row numbers) to selectnewState
- new selection statepublic void selectRecords(Record[] records)
DataBoundComponent
Record
s passed in explicitly, or by index.
selectRecords
in interface DataBoundComponent
records
- records (or row numbers) to selectpublic void selectRecords(Record[] records, boolean newState)
DataBoundComponent
Record
s passed in explicitly, or by index.
selectRecords
in interface DataBoundComponent
records
- records (or row numbers) to selectnewState
- new selection state (if null, defaults to true)public void deselectRecord(Record record)
DataBoundComponent
Record
passed in explicitly, or by index. Synonym for
selectRecord(record, false)
deselectRecord
in interface DataBoundComponent
record
- record (or row number) to deselectpublic void deselectRecord(int record)
DataBoundComponent
Record
passed in explicitly, or by index. Synonym for
selectRecord(record, false)
deselectRecord
in interface DataBoundComponent
record
- record (or row number) to deselectpublic void deselectRecords(int[] records)
DataBoundComponent
Record
s passed in explicitly, or by index. Synonym
for selectRecords(records, false)
deselectRecords
in interface DataBoundComponent
records
- records (or row numbers) to deselectpublic void deselectRecords(Record[] records)
DataBoundComponent
Record
s passed in explicitly, or by index. Synonym
for selectRecords(records, false)
deselectRecords
in interface DataBoundComponent
records
- records (or row numbers) to deselectpublic void selectAllRecords()
DataBoundComponent
selectAllRecords
in interface DataBoundComponent
public void deselectAllRecords()
DataBoundComponent
deselectAllRecords
in interface DataBoundComponent
public java.lang.Boolean anySelected()
DataBoundComponent
anySelected
in interface DataBoundComponent
public void enableHilite(java.lang.String hiliteID)
DataBoundComponent
hilites
enableHilite
in interface DataBoundComponent
hiliteID
- ID of hilite to enablepublic void enableHilite(java.lang.String hiliteID, boolean enable)
DataBoundComponent
hilites
enableHilite
in interface DataBoundComponent
hiliteID
- ID of hilite to enableenable
- new enabled state to apply - if null, defaults to truepublic void disableHilite(java.lang.String hiliteID)
DataBoundComponent
disableHilite
in interface DataBoundComponent
hiliteID
- ID of hilite to disablepublic void enableHiliting()
DataBoundComponent
enableHiliting
in interface DataBoundComponent
public void enableHiliting(boolean enable)
DataBoundComponent
enableHiliting
in interface DataBoundComponent
enable
- new enabled state to apply - if null, defaults to truepublic void disableHiliting()
DataBoundComponent
disableHiliting
in interface DataBoundComponent
public Record[] getDragData()
DataBoundComponent
This method is generally called by com.smartgwt.client.widgets.DataBoundComponent#transferDragData
and is consulted by
willAcceptDrop()
.
getDragData
in interface DataBoundComponent
Record
s that are currently selected.public void transferSelectedData(DataBoundComponent source)
DataBoundComponent
DataBoundComponent.getDropValues()
for each dropped record.
To transfer all data in, for example, a ListGrid
, call grid.selection.selectAll() first.
See the Dragging
documentation for an overview of list grid drag/drop data
transfer.
transferSelectedData
in interface DataBoundComponent
source
- source component from which the records will be tranferredpublic void transferSelectedData(DataBoundComponent source, int index)
DataBoundComponent
DataBoundComponent.getDropValues()
for each dropped record.
To transfer all data in, for example, a ListGrid
, call grid.selection.selectAll() first.
See the Dragging
documentation for an overview of list grid drag/drop data
transfer.
transferSelectedData
in interface DataBoundComponent
source
- source component from which the records will be tranferredindex
- target index (drop position) of the rows within this grid.public int getRecordIndex(Record record)
DataBoundComponent
Override in subclasses to provide more specific behaviour, for instance, when data holds a large number of records
getRecordIndex
in interface DataBoundComponent
record
- the record whose index is to be retrieved
public java.lang.String getTitleFieldValue(Record record)
DataBoundComponent
Override in subclasses
getTitleFieldValue
in interface DataBoundComponent
record
- the record whose index is to be retrieved
public void setTitleField(java.lang.String titleField)
setTitleField
in interface DataBoundComponent
public java.lang.String getTitleField()
DataBoundComponent
titleField
for databound
compounds."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.
getTitleField
in interface DataBoundComponent
public void setDataSource(DataSource dataSource)
DataBoundComponent
DSRequest
.
Can be specified as either a DataSource instance or the String ID of a DataSource. 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().
setDataSource
in interface DataBoundComponent
dataSource
- DataSource to bind to. Default value is nullpublic DataSource getDataSource()
DataBoundComponent
DSRequest
.
Can be specified as either a DataSource instance or the String ID of a DataSource.
getDataSource
in interface DataBoundComponent
public void setAutoFetchData(java.lang.Boolean autoFetchData) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.fetchData()
or DataBoundComponent.filterData()
depending on
DataBoundComponent.getAutoFetchAsFilter()
. Criteria for this fetch may be picked up from initialCriteria
.
setAutoFetchData
in interface DataBoundComponent
autoFetchData
- autoFetchData
java.lang.IllegalStateException
public java.lang.Boolean getAutoFetchData()
DataBoundComponent
DataBoundComponent.fetchData()
or DataBoundComponent.filterData()
depending on
DataBoundComponent.getAutoFetchAsFilter()
. Criteria for this fetch may be picked up from initialCriteria
.
getAutoFetchData
in interface DataBoundComponent
public void setAutoFetchAsFilter(java.lang.Boolean autoFetchAsFilter) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData()
or DataBoundComponent.filterData()
setAutoFetchAsFilter
in interface DataBoundComponent
autoFetchAsFilter
- autoFetchAsFilter
java.lang.IllegalStateException
public java.lang.Boolean getAutoFetchAsFilter()
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData()
or DataBoundComponent.filterData()
getAutoFetchAsFilter
in interface DataBoundComponent
public void setInitialCriteria(Criteria initialCriteria) throws java.lang.IllegalStateException
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is used.
setInitialCriteria
in interface DataBoundComponent
initialCriteria
- the initial criteria
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic Criteria getInitialCriteria()
DataBoundComponent
DataBoundComponent.setAutoFetchData(Boolean)
is used.
getInitialCriteria
in interface DataBoundComponent
public void fetchData()
DataBoundComponent
DataSource
to retrieve data that matches
the provided criteria, and displays the matching data in this component. If there are a large number of matching records, paging will automatically be enabled, so that initially a smaller number of records will be retrieved and further records will be fetched as the user navigates the dataset.
When first called, this
method will create a com.smartgwt.client.data.ResultSet
, which will be configured based on component
settings such as fetchOperation
and dataPageSize
, as well as the general purpose dataProperties
. The ResultSet is then available as
component.data
.
Subsequent calls to fetchData() will simply call com.smartgwt.client.data.ResultSet#setCriteria
on the created ResultSet with the passed criteria.
In some
cases fetchData() will not need to context the server as the new criteria can be satisfied by performing a
client-side filter against the currently cached set of data. You can determine whether criteria will cause a
fetch by calling com.smartgwt.client.data.ResultSet#willFetchData
.
If you need to force a server
fetch, you can call com.smartgwt.client.data.ResultSet#invalidateCache
via
component.data.invalidateCache()
to do so.
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 we recomment using com.smartgwt.client.data.ResultSet#willFetchData
before calling this method to determine whether or not a server
fetch will occur.
In addition to the callback parameter for this method, developers can use com.smartgwt.client.data.ResultSet#dataArrived
to be notified every time ResultSet data is loaded. A
dataArrived
method can be installed in the automatically created ResultSet by adding it to dataProperties
.
fetchData
in interface DataBoundComponent
public void fetchData(Criteria criteria)
DataBoundComponent
DataSource
to retrieve data that matches
the provided criteria, and displays the matching data in this component. If there are a large number of matching records, paging will automatically be enabled, so that initially a smaller number of records will be retrieved and further records will be fetched as the user navigates the dataset.
When first called, this
method will create a com.smartgwt.client.data.ResultSet
, which will be configured based on component
settings such as fetchOperation
and dataPageSize
, as well as the general purpose dataProperties
. The ResultSet is then available as
component.data
.
Subsequent calls to fetchData() will simply call com.smartgwt.client.data.ResultSet#setCriteria
on the created ResultSet with the passed criteria.
In some
cases fetchData() will not need to context the server as the new criteria can be satisfied by performing a
client-side filter against the currently cached set of data. You can determine whether criteria will cause a
fetch by calling com.smartgwt.client.data.ResultSet#willFetchData
.
If you need to force a server
fetch, you can call com.smartgwt.client.data.ResultSet#invalidateCache
via
component.data.invalidateCache()
to do so.
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 we recomment using com.smartgwt.client.data.ResultSet#willFetchData
before calling this method to determine whether or not a server
fetch will occur.
In addition to the callback parameter for this method, developers can use com.smartgwt.client.data.ResultSet#dataArrived
to be notified every time ResultSet data is loaded. A
dataArrived
method can be installed in the automatically created ResultSet by adding it to dataProperties
.
fetchData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object, will be
derived by calling DynamicForm.getValuesAsCriteria()
public void fetchData(Criteria criteria, DSCallback callback)
DataBoundComponent
DataSource
to retrieve data that matches
the provided criteria, and displays the matching data in this component. If there are a large number of matching records, paging will automatically be enabled, so that initially a smaller number of records will be retrieved and further records will be fetched as the user navigates the dataset.
When first called, this
method will create a com.smartgwt.client.data.ResultSet
, which will be configured based on component
settings such as fetchOperation
and dataPageSize
, as well as the general purpose dataProperties
. The ResultSet is then available as
component.data
.
Subsequent calls to fetchData() will simply call com.smartgwt.client.data.ResultSet#setCriteria
on the created ResultSet with the passed criteria.
In some
cases fetchData() will not need to context the server as the new criteria can be satisfied by performing a
client-side filter against the currently cached set of data. You can determine whether criteria will cause a
fetch by calling com.smartgwt.client.data.ResultSet#willFetchData
.
If you need to force a server
fetch, you can call com.smartgwt.client.data.ResultSet#invalidateCache
via
component.data.invalidateCache()
to do so.
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 we recomment using com.smartgwt.client.data.ResultSet#willFetchData
before calling this method to determine whether or not a server
fetch will occur.
In addition to the callback parameter for this method, developers can use com.smartgwt.client.data.ResultSet#dataArrived
to be notified every time ResultSet data is loaded. A
dataArrived
method can be installed in the automatically created ResultSet by adding it to dataProperties
.
fetchData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object, will be
derived by calling DynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires only
if server contact was requiredpublic void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
DataBoundComponent
DataSource
to retrieve data that matches
the provided criteria, and displays the matching data in this component. If there are a large number of matching records, paging will automatically be enabled, so that initially a smaller number of records will be retrieved and further records will be fetched as the user navigates the dataset.
When first called, this
method will create a com.smartgwt.client.data.ResultSet
, which will be configured based on component
settings such as fetchOperation
and dataPageSize
, as well as the general purpose dataProperties
. The ResultSet is then available as
component.data
.
Subsequent calls to fetchData() will simply call com.smartgwt.client.data.ResultSet#setCriteria
on the created ResultSet with the passed criteria.
In some
cases fetchData() will not need to context the server as the new criteria can be satisfied by performing a
client-side filter against the currently cached set of data. You can determine whether criteria will cause a
fetch by calling com.smartgwt.client.data.ResultSet#willFetchData
.
If you need to force a server
fetch, you can call com.smartgwt.client.data.ResultSet#invalidateCache
via
component.data.invalidateCache()
to do so.
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 we recomment using com.smartgwt.client.data.ResultSet#willFetchData
before calling this method to determine whether or not a server
fetch will occur.
In addition to the callback parameter for this method, developers can use com.smartgwt.client.data.ResultSet#dataArrived
to be notified every time ResultSet data is loaded. A
dataArrived
method can be installed in the automatically created ResultSet by adding it to dataProperties
.
fetchData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object,
will be derived by calling DynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires
only if server contact was requiredrequestProperties
- additional properties to set on the DSRequest
that will be issuedpublic void filterData()
DataBoundComponent
This
method behaves exactly like fetchData()
except that textMatchStyle
is automatically set to "substring" so that
String-valued fields are matched by case-insensitive substring comparison.
filterData
in interface DataBoundComponent
public void filterData(Criteria criteria)
DataBoundComponent
This
method behaves exactly like fetchData()
except that textMatchStyle
is automatically set to "substring" so that
String-valued fields are matched by case-insensitive substring comparison.
filterData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object, will be
derived by calling DynamicForm.getValuesAsCriteria()
public void filterData(Criteria criteria, DSCallback callback)
DataBoundComponent
This
method behaves exactly like fetchData()
except that textMatchStyle
is automatically set to "substring" so that
String-valued fields are matched by case-insensitive substring comparison.
filterData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object,
will be derived by calling DynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires
only if server contact was required; see
DataBoundComponent.fetchData()
for detailspublic void filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
DataBoundComponent
This
method behaves exactly like fetchData()
except that textMatchStyle
is automatically set to "substring" so that
String-valued fields are matched by case-insensitive substring comparison.
filterData
in interface DataBoundComponent
criteria
- Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object,
will be derived by calling DynamicForm.getValuesAsCriteria()
callback
- callback to invoke when a fetch is complete. Fires
only if server contact was required; see
DataBoundComponent.fetchData()
for detailsrequestProperties
- for databound components only - optional additional
properties to set on the DSRequest that will be issuedpublic void invalidateCache()
DataBoundComponent
this.data.invalidateCache()
. If necessary, this will cause a new fetch to
be performed with the current set of criteria for this component.
Has no effect if this component is not showing a set of filtered data.
invalidateCache
in interface DataBoundComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |