YUI recommends YUI3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

This documentation is no longer maintained.

Yahoo! UI Library

DataTable Widget  2.9.0

Yahoo! UI Library > datatable > YAHOO.widget.DataTable
Search:
 
Filters

Class YAHOO.widget.DataTable - extends YAHOO.util.Element

Known Subclasses:
YAHOO.widget.ScrollingDataTable
DataTable class for the YUI DataTable widget.

Constructor

YAHOO.widget.DataTable ( elContainer , aColumnDefs , oDataSource , oConfigs )
Parameters:
elContainer <HTMLElement> Container element for the TABLE.
aColumnDefs <Object[]> Array of object literal Column definitions.
oDataSource <YAHOO.util.DataSource> DataSource instance.
oConfigs <object> (optional) Object literal of configuration values.

Properties

_aDynFunctions - private Array

Sparse array of custom functions to set column widths for browsers that don't support dynamic CSS rules. Functions are added at the index representing the number of rows they update.

_aSelections - private Object[]

Array to track row selections (by sRecordId) and/or cell selections (by {recordId:sRecordId, columnKey:sColumnKey})

_bInit - private Boolean

True if instance is initialized, so as to fire the initEvent after render.
Default Value: true

_disabled - private Boolean

Disabled state.

_elCaption - private HTMLElement

DOM reference to the CAPTION element for the DataTable instance.

_elColgroup - private HTMLElement

DOM reference to the COLGROUP element for the DataTable instance.

_elColumnDragTarget - private HTMLElement

Element reference to shared Column drag target.

_elColumnResizerProxy - private HTMLElement

Element reference to shared Column resizer proxy.

_elContainer - private HTMLElement

DOM reference to the container element for the DataTable instance into which all other elements get created.

_elMask - private HTMLElement

DOM reference to the mask element for the DataTable instance which disables it.

_elMsgTbody - private HTMLElement

DOM reference to the secondary TBODY element used to display DataTable messages.

_elMsgTd - private HTMLElement

DOM reference to the secondary TBODY element's single TD element used to display DataTable messages.

_elMsgTr - private HTMLElement

DOM reference to the secondary TBODY element's single TR element used to display DataTable messages.

_elTable - private HTMLElement

DOM reference to the TABLE element for the DataTable instance.

_elTbody - private HTMLElement

DOM reference to the primary TBODY element for the DataTable instance.

_elThead - private HTMLElement

DOM reference to the THEAD element for the DataTable instance.

_elTrTemplate - private {HTMLElement}

Template row to create all new rows from.

_nIndex - private Number

Index assigned to instance.

_nTdCount - private Number

Counter for IDs assigned to TD elements.

_nTrCount - private Number

Counter for IDs assigned to TR elements.

_oAnchorCell - private Object

Object literal representing cell selection anchor: {recordId:sRecordId, columnKey:sColumnKey}.

_oAnchorRecord - private YAHOO.widget.Record

Record instance of the row selection anchor.

_oCellEditor - private YAHOO.widget.CellEditor

The active CellEditor instance for the DataTable instance.

_oChainRender - private YAHOO.util.Chain

Render chain.

_oColumnSet - private YAHOO.widget.ColumnSet

ColumnSet instance for the DataTable instance.

_oDataSource - private YAHOO.util.DataSource

DataSource instance for the DataTable instance.

_oRecordSet - private YAHOO.widget.RecordSet

RecordSet instance for the DataTable instance.

_sFirstTrId - private String

ID string of first TR element of the current DataTable page.

_sId - private String

Unique id assigned to instance "yui-dtN", useful prefix for generating unique DOM ID strings and log messages.

_sLastTrId - private String

ID string of the last TR element of the current DataTable page.

configs - Object

Returns object literal of initial configs.
Default Value: {}

DataTable._bDynStylesFallback - private static boolean

Set to true if _elDynStyleNode cannot be populated due to browser incompatibility.

DataTable._elDynStyleNode - private static HTMLElement

Reference to the STYLE node that is dynamically created and updated in order to manage Column widths.

DataTable._nCount - private static Number

Internal class variable for indexing multiple DataTable instances.

DataTable._nCurrentCount - private static Number

Internal class variable tracking current number of DataTable instances, so that certain class values can be reset when all instances are destroyed.

DataTable._oDynStyles - private static Object

Object literal hash of Columns and their dynamically create style rules.

DataTable.CLASS_ASC - static final String

Class name assigned to ascending elements.
Default Value: "yui-dt-asc"

DataTable.CLASS_BUTTON - static final String

Class name assigned to BUTTON elements and/or container elements.
Default Value: "yui-dt-button"

DataTable.CLASS_CHECKBOX - static final String

Class name assigned to INPUT TYPE=CHECKBOX elements and/or container elements.
Default Value: "yui-dt-checkbox"

DataTable.CLASS_COLTARGET - static final String

Class name assigned to Column drag target.
Default Value: "yui-dt-coltarget"

DataTable.CLASS_DATA - static final String

Class name assigned to data elements.
Default Value: "yui-dt-data"

DataTable.CLASS_DATATABLE - static final String

Class name assigned to outer DataTable container.
Default Value: "yui-dt"

DataTable.CLASS_DEFAULT - static final String

Class name assigned to default indicators.
Default Value: "yui-dt-default"

DataTable.CLASS_DESC - static final String

Class name assigned to descending elements.
Default Value: "yui-dt-desc"

DataTable.CLASS_DISABLED - static final String

Class name assigned to disabled elements.
Default Value: "yui-dt-disabled"

DataTable.CLASS_DRAGGABLE - static final String

Class name assigned to draggable elements.
Default Value: "yui-dt-draggable"

DataTable.CLASS_DROPDOWN - static final String

Class name assigned to SELECT elements and/or container elements.
Default Value: "yui-dt-dropdown"

DataTable.CLASS_EDITABLE - static final String

Class name assigned to editable elements.
Default Value: "yui-dt-editable"

DataTable.CLASS_EDITOR - static final String

Class name assigned to CellEditor container elements.
Default Value: "yui-dt-editor"

DataTable.CLASS_EDITOR_SHIM - static final String

Class name assigned to CellEditor container shim.
Default Value: "yui-dt-editor-shim"

DataTable.CLASS_EMPTY - static final String

Class name assigned to empty indicators.
Default Value: "yui-dt-empty"

DataTable.CLASS_ERROR - static final String

Class name assigned to error indicators.
Default Value: "yui-dt-error"

DataTable.CLASS_EVEN - static final String

Class name assigned to even elements.
Default Value: "yui-dt-even"

DataTable.CLASS_FIRST - static final String

Class name assigned to first elements.
Default Value: "yui-dt-first"

DataTable.CLASS_HIDDEN - static final String

Class name assigned to hidden elements.
Default Value: "yui-dt-hidden"

DataTable.CLASS_HIGHLIGHTED - static final String

Class name assigned to highlighted elements.
Default Value: "yui-dt-highlighted"

DataTable.CLASS_LABEL - static final String

Class name assigned to display label elements.
Default Value: "yui-dt-label"

DataTable.CLASS_LAST - static final String

Class name assigned to last elements.
Default Value: "yui-dt-last"

DataTable.CLASS_LINER - static final String

Class name assigned to liner DIV elements.
Default Value: "yui-dt-liner"

DataTable.CLASS_LOADING - static final String

Class name assigned to loading indicatorx.
Default Value: "yui-dt-loading"

DataTable.CLASS_MASK - static final String

Class name assigned to mask element when DataTable is disabled.
Default Value: "yui-dt-mask"

DataTable.CLASS_MESSAGE - static final String

Class name assigned to messaging elements.
Default Value: "yui-dt-message"

DataTable.CLASS_NEXT - static final String

Class name assigned next indicators.
Default Value: "yui-dt-next"

DataTable.CLASS_ODD - static final String

Class name assigned to odd elements.
Default Value: "yui-dt-odd"

DataTable.CLASS_PAGE - static final String

Class name assigned to page number indicators.
Default Value: "yui-dt-page"

DataTable.CLASS_PAGINATOR - static final String

Class name assigned to paginator container elements.
Default Value: "yui-dt-paginator"

DataTable.CLASS_PREVIOUS - static final String

Class name assigned to previous indicators.
Default Value: "yui-dt-previous"

DataTable.CLASS_RADIO - static final String

Class name assigned to INPUT TYPE=RADIO elements and/or container elements.
Default Value: "yui-dt-radio"

DataTable.CLASS_REC - static final String

Class name assigned to Record elements.
Default Value: "yui-dt-rec"

DataTable.CLASS_RESIZEABLE - static final String

Class name assigned to resizeable elements.
Default Value: "yui-dt-resizeable"

DataTable.CLASS_RESIZER - static final String

Class name assigned to resizer handle elements.
Default Value: "yui-dt-resizer"

DataTable.CLASS_RESIZERLINER - static final String

Class name assigned to resizer liner elements.
Default Value: "yui-dt-resizerliner"

DataTable.CLASS_RESIZERPROXY - static final String

Class name assigned to resizer proxy elements.
Default Value: "yui-dt-resizerproxy"

DataTable.CLASS_SCROLLABLE - static final String

Class name assigned to scrollable elements.
Default Value: "yui-dt-scrollable"

DataTable.CLASS_SELECTED - static final String

Class name assigned to selected elements.
Default Value: "yui-dt-selected"

DataTable.CLASS_SORTABLE - static final String

Class name assigned to sortable elements.
Default Value: "yui-dt-sortable"

DataTable.Formatter - static Object

Registry of cell formatting functions, enables shortcut pointers in Column definition formatter value (i.e., {key:"myColumn", formatter:"date"}).

Properties inherited from YAHOO.util.Element:

Properties inherited from YAHOO.util.AttributeProvider:

Methods

_clearMinWidth

private void _clearMinWidth ( oColumn )
Clears minWidth.
Parameters:
oColumn <YAHOO.widget.Column> Which Column.

_clearTrTemplateEl

private void _clearTrTemplateEl ( )
Clears TR element template in response to any Column state change.

_createTrEl

private HTMLElement _createTrEl ( oRecord )
Create a new TR element for a given Record and appends it with the correct number of Column-state-classed TD elements. Striping is the responsibility of the calling function, which may decide to stripe the single row, a subset of rows, or all the rows.
Parameters:
oRecord <YAHOO.widget.Record> Record instance
Returns: HTMLElement
The new TR element. This must be added to the DOM.

_defaultPaginatorContainers

private void _defaultPaginatorContainers ( create )
Returns the default containers used for Paginators. If create param is passed, the containers will be created and added to the DataTable container.
Parameters:
create <boolean> Create the default containers if not found

_deleteTrEl

private Boolean _deleteTrEl ( row )
Deletes TR element by DOM reference or by DataTable page row index.
Parameters:
row <HTMLElement | Number> TR element reference or Datatable page row index.
Returns: Boolean
Returns true if successful, else returns false.

_destroyColgroupEl

private void _destroyColgroupEl ( )
Destroy's the DataTable COLGROUP element, if available.

_destroyColumnDragTargetEl

private void _destroyColumnDragTargetEl ( )
Destroys shared Column drag target.

_destroyColumnHelpers

private void _destroyColumnHelpers ( )
Destroys elements associated with Column functionality: ColumnDD and ColumnResizers.

_destroyColumnResizerProxyEl

private HTMLElement _destroyColumnResizerProxyEl ( )
Destroys shared Column resizer proxy.
Returns: HTMLElement
Reference to Column resizer proxy.

_destroyContainerEl

private void _destroyContainerEl ( elContainer )
Destroy's the DataTable outer container element, if available.
Parameters:
elContainer <HTMLElement> Reference to the container element.

_destroyDraggableColumns

private void _destroyDraggableColumns ( )
Disables DD from top-level Column TH elements.

_destroyMsgTbodyEl

private void _destroyMsgTbodyEl ( )
Destroy's the DataTable message TBODY element, if available.

_destroyPaginator

private void _destroyPaginator ( )
Calls Paginator's destroy() method

_destroyResizeableColumns

private void _destroyResizeableColumns ( )
Disables resizeability on key Column TH elements.

_destroyTableEl

private void _destroyTableEl ( )
Destroy's the DataTable TABLE element, if available.

_destroyTbodyEl

private void _destroyTbodyEl ( )
Destroy's the DataTable TBODY element, if available.

_destroyTheadEl

private void _destroyTheadEl ( )
Destroy's the DataTable THEAD element, if available.

_focusEl

private void _focusEl ( el )
Sets focus on the given element.
Parameters:
el <HTMLElement> Element.

_formatTdEl

private HTMLElement _formatTdEl ( oColumn , elTd , index , isLast )
Formats a basic TD element.
Parameters:
oColumn <YAHOO.widget.Column> Associated Column instance.
elTd <HTMLElement> An unformatted TD element.
index <Number> Column key index.
isLast <Boolean> True if Column is last key of the ColumnSet.
Returns: HTMLElement
A formatted TD element.

_getColumnClassnames

private String _getColumnClassnames ( oColumn , aAddClasses )
Retruns classnames to represent current Column states.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
aAddClasses <String[]> An array of additional classnames to add to the return value.
Returns: String
A String of classnames to be assigned to TH or TD elements for given Column.

_getSelectionAnchor

private void _getSelectionAnchor ( oTrigger )
Returns object literal of values that represent the selection anchor. Used to determine selection behavior resulting from a user event.
Parameters:
oTrigger <Object> (Optional) Object literal of selection trigger values (for key events).

_getSelectionTrigger

private void _getSelectionTrigger ( )
Returns object literal of values that represent the selection trigger. Used to determine selection behavior resulting from a key event.

_getTrTemplateEl

private HTMLElement _getTrTemplateEl ( )
Returns a new TR element template with TD elements classed with current Column states.
Returns: HTMLElement
A TR element to be cloned and added to the DOM.

_getViewRecords

protected Array _getViewRecords ( )
Returns array of Records for current view. For example, if paginated, it returns the subset of Records for current page.
Returns: Array
Array of Records to display in current view.

_handleCellBlockSelectionByKey

private void _handleCellBlockSelectionByKey ( e )
Determines selection behavior resulting from a key event when selection mode is set to "cellblock".
Parameters:
e <HTMLEvent> Event object.

_handleCellBlockSelectionByMouse

private void _handleCellBlockSelectionByMouse ( oArgs.event , oArgs.target )
Determines selection behavior resulting from a mouse event when selection mode is set to "cellblock".
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

_handleCellRangeSelectionByKey

private void _handleCellRangeSelectionByKey ( e )
Determines selection behavior resulting from a key event when selection mode is set to "cellrange".
Parameters:
e <HTMLEvent> Event object.

_handleCellRangeSelectionByMouse

private void _handleCellRangeSelectionByMouse ( oArgs.event , oArgs.target )
Determines selection behavior resulting from a mouse event when selection mode is set to "cellrange".
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

_handleDataReturnPayload

private void _handleDataReturnPayload ( oRequest , oResponse , oPayload )
Updates the DataTable with state data sent in an onDataReturn* payload.
Parameters:
oRequest <MIXED> Original generated request.
oResponse <Object> Response object.
oPayload <MIXED> State values

_handlePaginatorChange

private void _handlePaginatorChange ( e )
Update the UI infrastructure in response to a "paginator" attribute change.
Parameters:
e <Object> Change event object containing keys 'type','newValue', and 'prevValue'

_handleSingleCellSelectionByKey

private void _handleSingleCellSelectionByKey ( e )
Determines selection behavior resulting from a key event when selection mode is set to "singlecell".
Parameters:
e <HTMLEvent> Event object.

_handleSingleCellSelectionByMouse

private void _handleSingleCellSelectionByMouse ( oArgs.event , oArgs.target )
Determines selection behavior resulting from a mouse event when selection mode is set to "singlecell".
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

_handleSingleSelectionByKey

private void _handleSingleSelectionByKey ( e )
Determines selection behavior resulting from a key event when selection mode is set to "single".
Parameters:
e <HTMLEvent> Event object.

_handleSingleSelectionByMouse

private void _handleSingleSelectionByMouse ( oArgs.event , oArgs.target )
Determines selection behavior resulting from a mouse event when selection mode is set to "single".
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

_handleStandardSelectionByKey

private void _handleStandardSelectionByKey ( e )
Determines selection behavior resulting from a key event when selection mode is set to "standard".
Parameters:
e <HTMLEvent> Event object.

_handleStandardSelectionByMouse

private void _handleStandardSelectionByMouse ( oArgs.event , oArgs.target )
Determines selection behavior resulting from a mouse event when selection mode is set to "standard".
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

_initCaptionEl

private void _initCaptionEl ( sCaption )
Creates HTML markup CAPTION element.
Parameters:
sCaption <HTML> Caption value. String values are treated as markup and inserted into the DOM with innerHTML.

_initCellEditing

private void _initCellEditing ( )
Initializes CellEditor integration.

_initCellEditorEl

private void _initCellEditorEl ( )
Backward compatibility.
Deprecated Use BaseCellEditor class.

_initColgroupEl

private void _initColgroupEl ( elTable )
Initializes COLGROUP and COL elements for managing minWidth.
Parameters:
elTable <HTMLElement> TABLE element into which to create COLGROUP.

_initColumnDragTargetEl

private HTMLElement _initColumnDragTargetEl ( )
Creates HTML markup for shared Column drag target.
Returns: HTMLElement
Reference to Column drag target.

_initColumnHelpers

private void _initColumnHelpers ( )
Initializes elements associated with Column functionality: ColumnDD and ColumnResizers.

_initColumnResizerProxyEl

private HTMLElement _initColumnResizerProxyEl ( )
Creates HTML markup for shared Column resizer proxy.
Returns: HTMLElement
Reference to Column resizer proxy.

_initColumnSet

private void _initColumnSet ( aColumnDefs )
Initializes ColumnSet.
Parameters:
aColumnDefs <Object[]> Array of object literal Column definitions.

_initColumnSort

private void _initColumnSort ( )
Initializes Column sorting.

_initConfigs

private void _initConfigs ( oConfig )
Initializes object literal of config values.
Parameters:
oConfig <Object> Object literal of config values.

_initContainerEl

private void _initContainerEl ( elContainer )
Initializes the DataTable outer container element, including a mask.
Parameters:
elContainer <HTMLElement | String> HTML DIV element by reference or ID.

_initDataSource

private void _initDataSource ( oDataSource )
Initializes DataSource.
Parameters:
oDataSource <YAHOO.util.DataSource> DataSource instance.

_initDomElements

private void _initDomElements ( elContainer )
Initializes DOM elements.
Parameters:
elContainer <HTMLElement | String} HTML DIV element by reference or ID. return {Boolean> False in case of error, otherwise true

_initDraggableColumns

private void _initDraggableColumns ( )
Initializes top-level Column TH elements into DD instances.

_initEvents

private void _initEvents ( )
Initialize internal event listeners

_initMsgTbodyEl

private void _initMsgTbodyEl ( elTable )
Initializes TBODY element for messaging.
Parameters:
elTable <HTMLElement> TABLE element into which to create TBODY

_initRecordSet

private void _initRecordSet ( )
Initializes RecordSet.

_initResizeableColumns

private void _initResizeableColumns ( )
Initializes resizeability on key Column TH elements.

_initTableEl

private void _initTableEl ( elContainer )
Creates HTML markup for TABLE, COLGROUP, THEAD and TBODY elements in outer container element.
Parameters:
elContainer <HTMLElement> Container element into which to create TABLE.

_initTbodyEl

private void _initTbodyEl ( elTable )
Initializes TBODY element for data.
Parameters:
elTable <HTMLElement> TABLE element into which to create TBODY .

_initTheadEl

private void _initTheadEl ( elTable , Initialized )
Initializes THEAD element.
Parameters:
elTable <HTMLElement> TABLE element into which to create COLGROUP.
Initialized <HTMLElement> THEAD element.

_initThEl

private void _initThEl ( elTh , oColumn )
Populates TH element as defined by Column.
Parameters:
elTh <HTMLElement> TH element reference.
oColumn <YAHOO.widget.Column> Column object.

_insertColgroupColEl

private void _insertColgroupColEl ( index )
Adds a COL element to COLGROUP at given index.
Parameters:
index <Number> Index of new COL element.

_onDocumentClick

private void _onDocumentClick ( e , oSelf )
Handles click events on the DOCUMENT.
Parameters:
e <HTMLEvent> The click event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onDropdownChange

private void _onDropdownChange ( e , oSelf )
Handles change events on SELECT elements within DataTable.
Parameters:
e <HTMLEvent> The change event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onEditorBlockEvent

private void _onEditorBlockEvent ( oArgs )
Passes through blockEvent of the active CellEditor.
Parameters:
oArgs <Object> Custom Event args.

_onEditorBlurEvent

private void _onEditorBlurEvent ( oArgs )
Passes through blurEvent of the active CellEditor.
Parameters:
oArgs <Object> Custom Event args.

_onEditorCancelEvent

private void _onEditorCancelEvent ( oArgs )
Passes through cancelEvent of the active CellEditor.
Parameters:
oArgs <Object> Custom Event args.

_onEditorKeydownEvent

private void _onEditorKeydownEvent ( oArgs )
Passes through keydownEvent of the active CellEditor.
Parameters:
oArgs <Object> Custom Event args.

_onEditorRevertEvent

private void _onEditorRevertEvent ( oArgs )
Passes through revertEvent of the active CellEditor.
Parameters:
oArgs <Object> Custom Event args.

_onEditorSaveEvent

private void _onEditorSaveEvent ( oArgs )
Passes through saveEvent of the active CellEditor.
Parameters:
oArgs <Object> Custom Event args.

_onEditorShowEvent

private void _onEditorShowEvent ( oArgs )
Passes through showEvent of the active CellEditor.
Parameters:
oArgs <Object> Custom Event args.

_onEditorUnblockEvent

private void _onEditorUnblockEvent ( oArgs )
Passes through unblockEvent of the active CellEditor.
Parameters:
oArgs <Object> Custom Event args.

_onRenderChainEnd

private void _onRenderChainEnd ( )
Validates minWidths whenever the render chain ends.

_onTableDblclick

private void _onTableDblclick ( e , oSelf )
Handles dblclick events on the DataTable instance.
Parameters:
e <HTMLEvent> The dblclick event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTableFocus

private void _onTableFocus ( e , oSelf )
Handles focus events on the DataTable instance.
Parameters:
e <HTMLEvent> The focus event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTableMousedown

private void _onTableMousedown ( e , oSelf )
Handles mousedown events on the DataTable instance.
Parameters:
e <HTMLEvent> The mousedown event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTableMouseout

private void _onTableMouseout ( e , origTarget , container , oSelf )
Handles mouseout events on the DataTable instance.
Parameters:
e <HTMLEvent> The mouseout event.
origTarget <HTMLElement> The mouseleave delegated element.
container <HTMLElement> The mouseleave delegation container.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTableMouseover

private void _onTableMouseover ( e , origTarget , container , oSelf )
Handles mouseover events on the DataTable instance.
Parameters:
e <HTMLEvent> The mouseover event.
origTarget <HTMLElement> The mouseenter delegated element.
container <HTMLElement> The mouseenter delegation container.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTableMouseup

private void _onTableMouseup ( e , oSelf )
Handles mouseup events on the DataTable instance.
Parameters:
e <HTMLEvent> The mouseup event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTbodyClick

private void _onTbodyClick ( e , oSelf )
Handles click events on the primary TBODY element.
Parameters:
e <HTMLEvent> The click event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTbodyFocus

private void _onTbodyFocus ( e , oSelf )
Handles focus events on the TBODY element.
Parameters:
e <HTMLEvent> The focus event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTbodyKeydown

private void _onTbodyKeydown ( e , oSelf )
Handles keydown events on the TBODY element. Handles selection behavior, provides hooks for ENTER to edit functionality.
Parameters:
e <HTMLEvent> The key event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTheadClick

private void _onTheadClick ( e , oSelf )
Handles click events on the THEAD element.
Parameters:
e <HTMLEvent> The click event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTheadFocus

private void _onTheadFocus ( e , oSelf )
Handles focus events on the THEAD element.
Parameters:
e <HTMLEvent> The focus event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_onTheadKeydown

private void _onTheadKeydown ( e , oSelf )
Handles keydown events on the THEAD element.
Parameters:
e <HTMLEvent> The key event.
oSelf <YAHOO.wiget.DataTable> DataTable instance.

_removeColgroupColEl

private void _removeColgroupColEl ( index )
Removes a COL element to COLGROUP at given index.
Parameters:
index <Number> Index of removed COL element.

_reorderColgroupColEl

private void _reorderColgroupColEl ( aKeyIndexes , newIndex )
Reorders a COL element from old index(es) to new index.
Parameters:
aKeyIndexes <Number[]> Array of indexes of removed COL element.
newIndex <Number> New index.

_repaintGecko

private void _repaintGecko ( )
Forces Gecko repaint.

_repaintOpera

private void _repaintOpera ( )
Forces Opera repaint.

_repaintWebkit

private void _repaintWebkit ( )
Forces Webkit repaint.

_restoreMinWidth

private void _restoreMinWidth ( oColumn )
Restores minWidth.
Parameters:
oColumn <YAHOO.widget.Column> Which Column.

_runRenderChain

private void _runRenderChain ( )
Internal wrapper calls run() on render Chain instance.

_setColumnWidth

private void _setColumnWidth ( oColumn , sWidth , sOverflow )
Sets liner DIV elements of given Column to given width. When value should be auto-calculated to fit content overflow is set to visible, otherwise overflow is set to hidden. No validations against minimum width and no updating Column.width value.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
sWidth <String> New width value.
sOverflow <String> Should be "hidden" when Column width is explicitly being set to a value, but should be "visible" when Column is meant to auto-fit content.

_setColumnWidthDynFunction

private void _setColumnWidthDynFunction ( oColumn , sWidth )
Updates width of a Column's liner DIV elements by dynamically creating a function to update all element style properties in one pass. Note: This technique is not supported in sandboxed environments that prohibit EVALs.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
sWidth <String> New width value.

_setColumnWidthDynStyles

private void _setColumnWidthDynStyles ( oColumn , sWidth )
Updates width of a Column's liner DIV elements by dynamically creating a STYLE node and writing and updating CSS style rules to it. If this fails during runtime, the fallback method _setColumnWidthDynFunction() will be called. Notes: This technique is not performant in IE6. IE7 crashes if DataTable is nested within another TABLE element. For these cases, it is recommended to use the method _setColumnWidthDynFunction by setting _bDynStylesFallback to TRUE.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
sWidth <String> New width value.

_setFirstRow

private void _setFirstRow ( )
Assigns the class YAHOO.widget.DataTable.CLASS_FIRST to the first TR element of the DataTable page and updates internal tracker.

_setLastRow

private void _setLastRow ( )
Assigns the class YAHOO.widget.DataTable.CLASS_LAST to the last TR element of the DataTable page and updates internal tracker.

_setRowStripes

private void _setRowStripes ( row , range )
Assigns the classes DT.CLASS_EVEN and DT.CLASS_ODD to one, many, or all TR elements.
Parameters:
row <HTMLElement | String | Number> (optional) HTML TR element reference or string ID, or page row index of where to start striping.
range <Number> (optional) If given, how many rows to stripe, otherwise stripe all the rows until the end.

_setSelections

private void _setSelections ( )
Assigns the class DT.CLASS_SELECTED to TR and TD elements.

_syncColWidths

void _syncColWidths ( )
Deprecated Use validateColumnWidths.

_unselectAllTdEls

private void _unselectAllTdEls ( )
Convenience method to remove the class YAHOO.widget.DataTable.CLASS_SELECTED from all TD elements in the internal tracker.

_unselectAllTrEls

private void _unselectAllTrEls ( )
Convenience method to remove the class YAHOO.widget.DataTable.CLASS_SELECTED from all TR elements on the page.

_unsetFirstRow

private void _unsetFirstRow ( )
Removes the class YAHOO.widget.DataTable.CLASS_FIRST from the first TR element of the DataTable page and updates internal tracker.

_unsetLastRow

private void _unsetLastRow ( )
Removes the class YAHOO.widget.DataTable.CLASS_LAST from the last TR element of the DataTable page and updates internal tracker.

_updatePaginator

private void _updatePaginator ( newPag )
Method executed during set() operation for the "paginator" attribute. Adds and/or severs event listeners between DataTable and Paginator
Parameters:
newPag <Paginator> Paginator instance (or null) for DataTable to use

_updateTrEl

private HTMLElement _updateTrEl ( elTr , oRecord )
Formats the contents of the given TR's TD elements with data from the given Record. Only innerHTML should change, nothing structural.
Parameters:
elTr <HTMLElement> The TR element to update.
oRecord <YAHOO.widget.Record> The associated Record instance.
Returns: HTMLElement
DOM reference to the new TR element.

addCellEditor

void addCellEditor ( oColumn , oEditor )
Assigns CellEditor instance to existing Column.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
oEditor <YAHOO.wdiget.CellEditor> CellEditor instance.

addRow

void addRow ( oData , index )
Adds one new Record of data into the RecordSet at the index if given, otherwise at the end. If the new Record is in page view, the corresponding DOM elements are also updated.
Parameters:
oData <Object> Object literal of data for the row.
index <Number> (optional) RecordSet position index at which to add data.

addRows

void addRows ( aData , index )
Convenience method to add multiple rows.
Parameters:
aData <Object[]> Array of object literal data for the rows.
index <Number> (optional) RecordSet position index at which to add data.

cancelCellEditor

void cancelCellEditor ( )
Cancels active CellEditor.

clearTextSelection

void clearTextSelection ( )
Clears browser text selection. Useful to call on rowSelectEvent or cellSelectEvent to prevent clicks or dblclicks from selecting text in the browser.

DataTable._cloneObject

private static void DataTable._cloneObject ( o )
Clones object literal or array of object literals.
Parameters:
o <Object> Object.

DataTable.editCheckbox

void DataTable.editCheckbox ( )
Deprecated Use YAHOO.widget.CheckboxCellEditor.

DataTable.editDate

void DataTable.editDate ( )
Deprecated Use YAHOO.widget.DateCellEditor.

DataTable.editDropdown

void DataTable.editDropdown ( )
Deprecated Use YAHOO.widget.DropdownCellEditor.

DataTable.editRadio

void DataTable.editRadio ( )
Deprecated Use YAHOO.widget.RadioCellEditor.

DataTable.editTextarea

void DataTable.editTextarea ( )
Deprecated Use YAHOO.widget.TextareaCellEditor

DataTable.editTextbox

void DataTable.editTextbox ( )
Deprecated Use YAHOO.widget.TextboxCellEditor

DataTable.formatButton

static void DataTable.formatButton ( el , oRecord , oColumn , oData , oDataTable )
Formats a BUTTON element.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <HTML> Data value for the cell. By default, the value is what gets written to the BUTTON. String values are treated as markup and inserted into the DOM with innerHTML.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatCheckbox

static void DataTable.formatCheckbox ( el , oRecord , oColumn , oData , oDataTable )
Formats a CHECKBOX element.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <Object | Boolean | HTML} Data value for the cell. Can be a simple Boolean to indicate whether checkbox is checked or not. Can be object literal {checked:bBoolean, label:sLabel> . String values are treated as markup and inserted into the DOM with innerHTML.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatCurrency

static void DataTable.formatCurrency ( el , oRecord , oColumn , oData , oDataTable )
Formats currency. Default unit is USD.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <Number> Data value for the cell.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatDate

static void DataTable.formatDate ( el , oRecord , oColumn , oData , oDataTable )
Formats JavaScript Dates.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <Object> Data value for the cell, or null. String values are treated as markup and inserted into the DOM with innerHTML.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatDefault

static void DataTable.formatDefault ( el , oRecord , oColumn , oData , oDataTable )
Default cell formatter
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <HTML> (Optional) Data value for the cell. String values are treated as markup and inserted into the DOM with innerHTML.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatDropdown

static void DataTable.formatDropdown ( el , oRecord , oColumn , oData , oDataTable )
Formats SELECT elements.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <Object> Data value for the cell, or null. String values may be treated as markup and inserted into the DOM with innerHTML as element label.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatEmail

static void DataTable.formatEmail ( el , oRecord , oColumn , oData , oDataTable )
Formats emails.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <String> Data value for the cell, or null. Values are HTML-escaped.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatLink

static void DataTable.formatLink ( el , oRecord , oColumn , oData , oDataTable )
Formats links.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <String> Data value for the cell, or null. Values are HTML-escaped
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatNumber

static void DataTable.formatNumber ( el , oRecord , oColumn , oData , oDataTable )
Formats numbers.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <Object> Data value for the cell, or null.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatRadio

static void DataTable.formatRadio ( el , oRecord , oColumn , oData , oDataTable )
Formats INPUT TYPE=RADIO elements.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <Object> (Optional) Data value for the cell.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatText

static void DataTable.formatText ( el , oRecord , oColumn , oData , oDataTable )
Formats text strings.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <String> (Optional) Data value for the cell. Values are HTML-escaped.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatTextarea

static void DataTable.formatTextarea ( el , oRecord , oColumn , oData , oDataTable )
Formats TEXTAREA elements.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <Object> (Optional) Data value for the cell. Values are HTML-escaped.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.formatTextbox

static void DataTable.formatTextbox ( el , oRecord , oColumn , oData , oDataTable )
Formats INPUT TYPE=TEXT elements.
Parameters:
el <HTMLElement> The element to format with markup.
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column> Column instance.
oData <Object> (Optional) Data value for the cell. Values are HTML-escaped.
oDataTable <YAHOO.widget.DataTable> DataTable instance.

DataTable.validateNumber

static void DataTable.validateNumber ( oData )
Validates data value to type Number, doing type conversion as necessary. A valid Number value is return, else null is returned if input value does not validate.
Parameters:
oData <Object> Data to validate.

deleteRow

void deleteRow ( row )
Deletes the given row's Record from the RecordSet. If the row is on current page, the corresponding DOM elements are also deleted.
Parameters:
row <HTMLElement | String | Number> DOM element reference or ID string to DataTable page element or RecordSet index.

deleteRows

void deleteRows ( row , count )
Convenience method to delete multiple rows.
Parameters:
row <HTMLElement | String | Number> DOM element reference or ID string to DataTable page element or RecordSet index.
count <Number> (optional) How many rows to delete. A negative value will delete towards the beginning.

destroy

void destroy ( )
Nulls out the entire DataTable instance and related objects, removes attached event listeners, and clears out DOM elements inside the container. After calling this method, the instance reference should be expliclitly nulled by implementer, as in myDataTable = null. Use with caution!

destroyCellEditor

void destroyCellEditor ( )
Destroys active CellEditor instance and UI.

disable

void disable ( )
Disables DataTable UI.

doBeforeLoadData

Boolean doBeforeLoadData ( sRequest , oResponse , oPayload )
Overridable method gives implementers a hook to access data before it gets added to RecordSet and rendered to the TBODY.
Parameters:
sRequest <String> Original request.
oResponse <Object> Response object.
oPayload <MIXED> additional arguments
Returns: Boolean
Return true to continue loading data into RecordSet and updating DataTable with new Records, false to cancel.

doBeforePaginatorChange

Boolean doBeforePaginatorChange ( oPaginatorState )
Overridable method gives implementers a hook to show loading message before changing Paginator value.
Parameters:
oPaginatorState <Object> An object literal describing the proposed pagination state.
Returns: Boolean
Return true to continue changing Paginator value.

doBeforeShowCellEditor

Boolean doBeforeShowCellEditor ( oCellEditor )
Overridable abstract method to customize CellEditor before showing.
Parameters:
oCellEditor <YAHOO.widget.CellEditor> The CellEditor instance.
Returns: Boolean
Return true to continue showing CellEditor.

doBeforeSortColumn

Boolean doBeforeSortColumn ( oColumn , sSortDir )
Overridable method gives implementers a hook to show loading message before sorting Column.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
sSortDir <String> YAHOO.widget.DataTable.CLASS_ASC or YAHOO.widget.DataTable.CLASS_DESC.
Returns: Boolean
Return true to continue sorting Column.

focus

void focus ( )
Brings focus to the TBODY element. Alias to focusTbodyEl.

focusTbodyEl

void focusTbodyEl ( )
Brings focus to the TBODY element.

focusTheadEl

void focusTheadEl ( )
Brings focus to the THEAD element.

formatCell

void formatCell ( elLiner , oRecord , oColumn )
Outputs markup into the given TD based on given Record.
Parameters:
elLiner <HTMLElement> The liner DIV element within the TD.
oRecord <YAHOO.widget.Record> (Optional) Record instance.
oColumn <YAHOO.widget.Column> (Optional) Column instance.

formatTheadCell

void formatTheadCell ( elCellLabel , oColumn , oSortedBy )
Outputs markup into the given TH based on given Column.
Parameters:
elCellLabel <HTMLElement> The label SPAN element within the TH liner, not the liner DIV element.
oColumn <YAHOO.widget.Column> Column instance.
oSortedBy <Object> Sort state object literal.

getAboveTdEl

HTMLElement getAboveTdEl ( cell , forcePrimary )
Returns DOM reference to the above TD element from the given cell, or null.
Parameters:
cell <HTMLElement | String | Object} DOM element reference or string ID, or object literal of syntax {record:oRecord, column:oColumn> from which to get next TD element.
forcePrimary <Boolean> (optional) If true, will only return TD elements from rows that correspond to Records. Non-primary rows (such as row expansions) will be skipped.
Returns: HTMLElement
Reference to above TD element, or null.

getBelowTdEl

HTMLElement getBelowTdEl ( cell , forcePrimary )
Returns DOM reference to the below TD element from the given cell, or null.
Parameters:
cell <HTMLElement | String | Object} DOM element reference or string ID, or object literal of syntax {record:oRecord, column:oColumn> from which to get previous TD element.
forcePrimary <Boolean> (optional) If true, will only return TD elements from rows that correspond to Records. Non-primary rows (such as row expansions) will be skipped.
Returns: HTMLElement
Reference to below TD element, or null.

getBody

void getBody ( )
Deprecated Use getTbodyEl().

getCell

void getCell ( )
Deprecated Use getTdEl().

getCellEditor

YAHOO.widget.CellEditor getCellEditor ( )
Returns current CellEditor instance, or null.
Returns: YAHOO.widget.CellEditor
CellEditor instance.

getCellIndex

Number getCellIndex ( cell )
Workaround for IE bug where hidden or not-in-dom elements cause cellIndex value to be incorrect.
Parameters:
cell <HTMLElement | Object} TD element or child of a TD element, or object literal of syntax {record:oRecord, column:oColumn> .
Returns: Number
TD.cellIndex value.

getColumn

YAHOO.widget.Column getColumn ( column )
For the given identifier, returns the associated Column instance. Note: For getting Columns by Column ID string, please use the method getColumnById().
Parameters:
column <HTMLElement | String | Number> TH/TD element (or child of a TH/TD element), a Column key, or a ColumnSet key index.
Returns: YAHOO.widget.Column
Column instance.

getColumnById

YAHOO.widget.Column getColumnById ( column )
For the given Column ID, returns the associated Column instance. Note: For getting Columns by key, please use the method getColumn().
Parameters:
column <String> Column ID string.
Returns: YAHOO.widget.Column
Column instance.

getColumnSet

YAHOO.widget.ColumnSet getColumnSet ( )
Returns the DataTable instance's ColumnSet instance.
Returns: YAHOO.widget.ColumnSet
ColumnSet instance.

getColumnSortDir

String getColumnSortDir ( oColumn , oSortedBy )
For the given Column instance, returns next direction to sort.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
oSortedBy <Object> (optional) Specify the state, or use current state.
Returns: String
YAHOO.widget.DataTable.CLASS_ASC or YAHOO.widget.DataTableCLASS_DESC.

getContainerEl

HTMLElement getContainerEl ( )
Returns DOM reference to the DataTable's container element.
Returns: HTMLElement
Reference to DIV element.

getDataSource

YAHOO.util.DataSource getDataSource ( )
Returns the DataTable instance's DataSource instance.
Returns: YAHOO.util.DataSource
DataSource instance.

getFirstTdEl

HTMLElement getFirstTdEl ( row )
Returns DOM reference to the first primary TD element in the DataTable page (by default), the first TD element of the optionally given row, or null.
Parameters:
row <HTMLElement> (optional) row from which to get first TD
Returns: HTMLElement
Reference to TD element.

getFirstTrEl

HTMLElement getFirstTrEl ( )
Returns DOM reference to the first primary TR element in the DataTable page, or null.
Returns: HTMLElement
Reference to TR element.

getId

String getId ( )
Returns unique id assigned to instance, which is a useful prefix for generating unique DOM ID strings.
Returns: String
Unique ID of the DataSource instance.

getLastSelectedCell

Object getLastSelectedCell ( )
Returns last selected cell as an object literal: {recordId:sRecordId, columnKey:sColumnKey}.
Returns: Object
Object literal representation of a cell.

getLastSelectedRecord

String getLastSelectedRecord ( )
Returns last selected Record ID.
Returns: String
Record ID of last selected row.

getLastTdEl

HTMLElement getLastTdEl ( row )
Returns DOM reference to the last primary TD element in the DataTable page (by default), the first TD element of the optionally given row, or null.
Parameters:
row <HTMLElement> (optional) row from which to get first TD
Returns: HTMLElement
Reference to last TD element.

getLastTrEl

HTMLElement getLastTrEl ( )
Returns DOM reference to the last primary TR element in the DataTable page, or null.
Returns: HTMLElement
Reference to last TR element.

getMsgTbodyEl

HTMLElement getMsgTbodyEl ( )
Returns DOM reference to the DataTable's secondary TBODY element that is used to display messages.
Returns: HTMLElement
Reference to TBODY element.

getMsgTdEl

HTMLElement getMsgTdEl ( )
Returns DOM reference to the TD element within the secondary TBODY that is used to display messages.
Returns: HTMLElement
Reference to TD element.

getNextTdEl

HTMLElement getNextTdEl ( cell )
Returns DOM reference to the next TD element from the given cell, or null.
Parameters:
cell <HTMLElement | String | Object} DOM element reference or string ID, or object literal of syntax {record:oRecord, column:oColumn> from which to get next TD element.
Returns: HTMLElement
Reference to next TD element, or null.

getNextTrEl

HTMLElement getNextTrEl ( row , forcePrimary )
Returns DOM reference to the next TR element from the given primary TR element, or null.
Parameters:
row <HTMLElement | String | Number | YAHOO.widget.Record> Element reference, ID string, page row index, or Record from which to get next TR element.
forcePrimary <Boolean> (optional) If true, will only return TR elements that correspond to Records. Non-primary rows (such as row expansions) will be skipped.
Returns: HTMLElement
Reference to next TR element.

getPreviousTdEl

HTMLElement getPreviousTdEl ( cell )
Returns DOM reference to the previous TD element from the given cell, or null.
Parameters:
cell <HTMLElement | String | Object} DOM element reference or string ID, or object literal of syntax {record:oRecord, column:oColumn> from which to get previous TD element.
Returns: HTMLElement
Reference to previous TD element, or null.

getPreviousTrEl

HTMLElement getPreviousTrEl ( row , forcePrimary )
Returns DOM reference to the previous TR element from the given primary TR element, or null.
Parameters:
row <HTMLElement | String | Number | YAHOO.widget.Record> Element reference, ID string, page row index, or Record from which to get previous TR element.
forcePrimary <Boolean> (optional) If true, will only return TR elements from rothat correspond to Records. Non-primary rows (such as row expansions) will be skipped.
Returns: HTMLElement
Reference to previous TR element.

getRecord

YAHOO.widget.Record getRecord ( row )
For the given identifier, returns the associated Record instance.
Parameters:
row <HTMLElement | Number | String> DOM reference to a TR element (or child of a TR element), RecordSet position index, or Record ID.
Returns: YAHOO.widget.Record
Record instance.

getRecordIndex

Number getRecordIndex ( row )
Returns Record index for given TR element or page row index.
Parameters:
row <YAHOO.widget.Record | HTMLElement | Number> Record instance, TR element reference or page row index.
Returns: Number
Record's RecordSet index, or null.

getRecordSet

YAHOO.widget.RecordSet getRecordSet ( )
Returns the DataTable instance's RecordSet instance.
Returns: YAHOO.widget.RecordSet
RecordSet instance.

getRow

void getRow ( )
Deprecated Use getTrEl().

getSelectedCells

Object[] getSelectedCells ( )
Returns selected cells as an array of object literals: {recordId:sRecordId, columnKey:sColumnKey}.
Returns: Object[]
Array of selected cells by Record ID and Column ID.

getSelectedColumns

YAHOO.widget.Column[] getSelectedColumns ( )
Returns an array selected Column instances.
Returns: YAHOO.widget.Column[]
Array of Column instances.

getSelectedRows

String[] getSelectedRows ( )
Returns selected rows as an array of Record IDs.
Returns: String[]
Array of selected rows by Record ID.

getSelectedTdEls

HTMLElement[] getSelectedTdEls ( )
Returns array of selected TD elements on the page.
Returns: HTMLElement[]
Array of selected TD elements.

getSelectedTrEls

HTMLElement[] getSelectedTrEls ( )
Returns array of selected TR elements on the page.
Returns: HTMLElement[]
Array of selected TR elements.

getState

Object getState ( )
Returns on object literal representing the DataTable instance's current state with the following properties:
pagination
Instance of YAHOO.widget.Paginator
sortedBy
sortedBy.key
{String} Key of sorted Column
sortedBy.dir
{String} Initial sort direction, either YAHOO.widget.DataTable.CLASS_ASC or YAHOO.widget.DataTable.CLASS_DESC
selectedRows
Array of selected rows by Record ID.
selectedCells
Selected cells as an array of object literals: {recordId:sRecordId, columnKey:sColumnKey}
Returns: Object
DataTable instance state object literal values.

getTableEl

HTMLElement getTableEl ( )
Returns DOM reference to the DataTable's TABLE element.
Returns: HTMLElement
Reference to TABLE element.

getTbodyEl

HTMLElement getTbodyEl ( )
Returns DOM reference to the DataTable's primary TBODY element.
Returns: HTMLElement
Reference to TBODY element.

getTdEl

HTMLElement getTdEl ( cell )
Returns DOM reference to a TD element. Returns null if the row is not considered a primary row (i.e., row extensions).
Parameters:
cell <HTMLElement | String | Object} TD element or child of a TD element, or object literal of syntax {record:oRecord, column:oColumn> .
Returns: HTMLElement
Reference to TD element.

getTdLinerEl

HTMLElement getTdLinerEl ( cell )
Returns DOM reference to a TD liner element.
Parameters:
cell <HTMLElement | Object} TD element or child of a TD element, or object literal of syntax {record:oRecord, column:oColumn> .
Returns: HTMLElement
Reference to TD liner element.

getTheadEl

HTMLElement getTheadEl ( )
Returns DOM reference to the DataTable's THEAD element.
Returns: HTMLElement
Reference to THEAD element.

getThEl

HTMLElement getThEl ( theadCell )
Returns DOM reference to a TH element.
Parameters:
theadCell <YAHOO.widget.Column | HTMLElement | String> Column instance, DOM element reference, or string ID.
Returns: HTMLElement
Reference to TH element.

getThLinerEl

HTMLElement getThLinerEl ( theadCell )
Returns DOM reference to a TH liner element. Needed to normalize for resizeable Columns, which have an additional resizer liner DIV element between the TH element and the liner DIV element.
Parameters:
theadCell <YAHOO.widget.Column | HTMLElement | String> Column instance, DOM element reference, or string ID.
Returns: HTMLElement
Reference to TH liner element.

getTrEl

HTMLElement getTrEl ( row )
Returns the corresponding TR reference for a given DOM element, ID string or page row index. If the given identifier is a child of a TR element, then DOM tree is traversed until a parent TR element is returned, otherwise null. Returns null if the row is not considered a primary row (i.e., row extensions).
Parameters:
row <HTMLElement | String | Number | YAHOO.widget.Record> Which row to get: by element reference, ID string, page row index, or Record.
Returns: HTMLElement
Reference to TR element, or null.

getTrIndex

Number getTrIndex ( row )
Returns the page row index of given primary row. Returns null if the row is not on the current DataTable page, or if row is not considered a primary row (i.e., row extensions).
Parameters:
row <HTMLElement | String | YAHOO.widget.Record | Number> DOM or ID string reference to an element within the DataTable page, a Record instance, or a Record's RecordSet index.
Returns: Number
Page row index, or null if data row does not exist or is not on current page.

handleDataReturnPayload

MIXED handleDataReturnPayload ( oRequest , oResponse , oPayload )
Hook to update oPayload before consumption.
Parameters:
oRequest <MIXED> Original generated request.
oResponse <Object> Response object.
oPayload <MIXED> State values.
Returns: MIXED
oPayload State values.

hideColumn

void hideColumn ( oColumn )
Hides given Column. NOTE: You cannot hide/show nested Columns. You can only hide/show non-nested Columns, and top-level parent Columns (which will hide/show all children Columns).
Parameters:
oColumn <YAHOO.widget.Column | HTMLElement | String | Number> Column instance, TH/TD element (or child of a TH/TD element), a Column key, or a ColumnSet key index.

hideTableMessage

void hideTableMessage ( )
Hides secondary TBODY.

highlightCell

void highlightCell ( cell )
Assigns the class YAHOO.widget.DataTable.CLASS_HIGHLIGHTED to the given cell.
Parameters:
cell <HTMLElement | String> DOM element reference or ID string.

highlightColumn

void highlightColumn ( column )
Assigns the class YAHOO.widget.DataTable.CLASS_HIGHLIGHTED to cells of the given Column. NOTE: You cannot highlight/unhighlight nested Columns. You can only highlight/unhighlight non-nested Columns, and bottom-level key Columns.
Parameters:
column <HTMLElement | String | Number> DOM reference or ID string to a TH/TD element (or child of a TH/TD element), a Column key, or a ColumnSet key index.

highlightRow

void highlightRow ( row )
Assigns the class YAHOO.widget.DataTable.CLASS_HIGHLIGHTED to the given row.
Parameters:
row <HTMLElement | String> DOM element reference or ID string.

initAttributes

private void initAttributes ( oConfigs )
Implementation of Element's abstract method. Sets up config values.
Parameters:
oConfigs <Object> (Optional) Object literal definition of configuration values.

initializeTable

void initializeTable ( )
Resets a RecordSet with the given data and populates the page view with the new data. Any previous data, and selection and sort states are cleared. New data should be added as a separate step.

insertColumn

YAHOO.widget.Column insertColumn ( oColumn , index )
Inserts given Column at the index if given, otherwise at the end. NOTE: You can only add non-nested Columns and top-level parent Columns. You cannot add a nested Column to an existing parent.
Parameters:
oColumn <Object | YAHOO.widget.Column> Object literal Column definition or a Column instance.
index <Number> (optional) New tree index.
Returns: YAHOO.widget.Column
oColumn Inserted Column instance.

isDisabled

Boolean isDisabled ( )
Returns disabled state.
Returns: Boolean
True if UI is disabled, otherwise false

isSelected

Boolean isSelected ( o )
Returns true if given item is selected, false otherwise.
Parameters:
o <String | HTMLElement | YAHOO.widget.Record | Number {record:YAHOO.widget.Record, column:YAHOO.widget.Column} > TR or TD element by reference or ID string, a Record instance, a RecordSet position index, or an object literal representation of a cell.
Returns: Boolean
True if item is selected.

load

void load ( oConfig )
Loads new data. Convenience method that calls DataSource's sendRequest() method under the hood.
Parameters:
oConfig <object> Optional configuration parameters:
request
Pass in a new request, or initialRequest is used.
callback
Pass in DataSource sendRequest() callback object, or the following is used:
success
datatable.onDataReturnInitializeTable
failure
datatable.onDataReturnInitializeTable
scope
datatable
argument
datatable.getState()
datasource
Pass in a new DataSource instance to override the current DataSource for this transaction.

onDataReturnAppendRows

void onDataReturnAppendRows ( sRequest , oResponse , oPayload )
Callback function receives data from DataSource and appends to an existing DataTable new Records and, if applicable, creates or updates corresponding TR elements.
Parameters:
sRequest <String> Original request.
oResponse <Object> Response object.
oPayload <MIXED> (optional) Additional argument(s)

onDataReturnInitializeTable

void onDataReturnInitializeTable ( sRequest , oResponse , oPayload )
Callback function receives data from DataSource and populates an entire DataTable with Records and TR elements, clearing previous Records, if any.
Parameters:
sRequest <String> Original request.
oResponse <Object> Response object.
oPayload <MIXED> (optional) Additional argument(s)

onDataReturnInsertRows

void onDataReturnInsertRows ( sRequest , oResponse , oPayload )
Callback function receives data from DataSource and inserts new records starting at the index specified in oPayload.insertIndex. The value for oPayload.insertIndex can be populated when sending the request to the DataSource, or by accessing oPayload.insertIndex with the doBeforeLoadData() method at runtime. If applicable, creates or updates corresponding TR elements.
Parameters:
sRequest <String> Original request.
oResponse <Object> Response object.
oPayload <MIXED> Argument payload, looks in oPayload.insertIndex.

onDataReturnReplaceRows

void onDataReturnReplaceRows ( oRequest , oResponse , oPayload )
Callback function receives reponse from DataSource, replaces all existing Records in RecordSet, updates TR elements with new data, and updates state UI for pagination and sorting from payload data, if necessary.
Parameters:
oRequest <MIXED> Original generated request.
oResponse <Object> Response object.
oPayload <MIXED> (optional) Additional argument(s)

onDataReturnSetRecords

void onDataReturnSetRecords ( )
Alias for onDataReturnSetRows for backward compatibility
Deprecated Use onDataReturnSetRows

onDataReturnSetRows

void onDataReturnSetRows ( oRequest , oResponse , oPayload )
Callback function receives reponse from DataSource and populates the RecordSet with the results.
Parameters:
oRequest <MIXED> Original generated request.
oResponse <Object> Response object.
oPayload <MIXED> (optional) Additional argument(s)

onDataReturnUpdateRows

void onDataReturnUpdateRows ( sRequest , oResponse , oPayload )
Callback function receives data from DataSource and incrementally updates Records starting at the index specified in oPayload.updateIndex. The value for oPayload.updateIndex can be populated when sending the request to the DataSource, or by accessing oPayload.updateIndex with the doBeforeLoadData() method at runtime. If applicable, creates or updates corresponding TR elements.
Parameters:
sRequest <String> Original request.
oResponse <Object> Response object.
oPayload <MIXED> Argument payload, looks in oPayload.updateIndex.

onEditorBlockEvent

void onEditorBlockEvent ( oArgs )
Public handler of the editorBlockEvent. By default, disables DataTable UI.
Parameters:
oArgs <Object> Custom Event args.

onEditorBlurEvent

void onEditorBlurEvent ( oArgs )
Public handler of the editorBlurEvent. By default, saves on blur if disableBtns is true, otherwise cancels on blur.
Parameters:
oArgs <Object> Custom Event args.

onEditorUnblockEvent

void onEditorUnblockEvent ( oArgs )
Public handler of the editorUnblockEvent. By default, undisables DataTable UI.
Parameters:
oArgs <Object> Custom Event args.

onEventCancelCellEditor

void onEventCancelCellEditor ( )
Custom event handler to cancel active CellEditor.

onEventEditCell

void onEventEditCell ( )
Deprecated Use onEventShowCellEditor.

onEventFormatCell

void onEventFormatCell ( oArgs.event , oArgs.target )
Custom event handler to format cell.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventHighlightCell

void onEventHighlightCell ( oArgs.event , oArgs.target )
Custom event handler to highlight cell. Accounts for spurious caused-by-child events.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventHighlightColumn

void onEventHighlightColumn ( oArgs.event , oArgs.target )
Custom event handler to highlight Column. Accounts for spurious caused-by-child events.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventHighlightRow

void onEventHighlightRow ( oArgs.event , oArgs.target )
Custom event handler to highlight row. Accounts for spurious caused-by-child events.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventSaveCellEditor

void onEventSaveCellEditor ( )
Custom event handler to save active CellEditor input.

onEventSelectCell

void onEventSelectCell ( oArgs.event , oArgs.target )
Custom event handler to select cell.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventSelectColumn

void onEventSelectColumn ( oArgs.event , oArgs.target )
Custom event handler to select Column.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventSelectRow

void onEventSelectRow ( oArgs.event , oArgs.target )
Custom event handler to manage selection according to desktop paradigm.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventShowCellEditor

void onEventShowCellEditor ( oArgs.event , oArgs.target )
Custom event handler to edit cell.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventSortColumn

void onEventSortColumn ( oArgs.event , oArgs.target )
Custom event handler to sort Column.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventUnhighlightCell

void onEventUnhighlightCell ( oArgs.event , oArgs.target )
Custom event handler to unhighlight cell. Accounts for spurious caused-by-child events.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventUnhighlightColumn

void onEventUnhighlightColumn ( oArgs.event , oArgs.target )
Custom event handler to unhighlight Column. Accounts for spurious caused-by-child events.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onEventUnhighlightRow

void onEventUnhighlightRow ( oArgs.event , oArgs.target )
Custom event handler to unhighlight row. Accounts for spurious caused-by-child events.
Parameters:
oArgs.event <HTMLEvent> Event object.
oArgs.target <HTMLElement> Target element.

onPaginatorChange

void onPaginatorChange ( )
Alias for onPaginatorChange for backward compatibility
Deprecated Use onPaginatorChangeRequest

onPaginatorChangeRequest

void onPaginatorChangeRequest ( oPaginatorState )
Responds to new Pagination states. By default, updates the UI to reflect the new state. If "dynamicData" is true, current selections are purged before a request is sent to the DataSource for data for the new state (using the request returned by "generateRequest()").
Parameters:
oPaginatorState <Object> An object literal describing the proposed pagination state.

onShow

void onShow ( )
Setting display:none on DataTable or any parent may impact width validations. After setting display back to "", implementers should call this method to manually perform those validations.

refreshView

void refreshView ( )
Deprecated Use render.

removeColumn

YAHOO.widget.Column removeColumn ( oColumn )
Removes given Column. NOTE: You cannot remove nested Columns. You can only remove non-nested Columns, and top-level parent Columns (which will remove all children Columns).
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
Returns: YAHOO.widget.Column
oColumn Removed Column instance.

render

void render ( )
Renders the view with existing Records from the RecordSet while maintaining sort, pagination, and selection states. For performance, reuses existing DOM elements when possible while deleting extraneous elements.

renderPaginator

void renderPaginator ( )
Renders the Paginator to the DataTable UI

reorderColumn

YAHOO.widget.Column reorderColumn ( oColumn , index )
Removes given Column and inserts into given tree index. NOTE: You can only reorder non-nested Columns and top-level parent Columns. You cannot reorder a nested Column to an existing parent.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
index <Number> New tree index.
Returns: YAHOO.widget.Column
oColumn Reordered Column instance.

resetCellEditor

void resetCellEditor ( )
Deprecated Use destroyCellEditor

saveCellEditor

void saveCellEditor ( )
Saves active CellEditor input to Record and upates DOM UI.

select

void select ( )
Deprecated Use selectRow.

selectCell

void selectCell ( cell )
Sets given cell to the selected state.
Parameters:
cell <HTMLElement | String | Object} TD element or child of a TD element, or object literal of syntax {record:oRecord, column:oColumn> .

selectColumn

void selectColumn ( column )
Selects given Column. NOTE: You cannot select/unselect nested Columns. You can only select/unselect non-nested Columns, and bottom-level key Columns.
Parameters:
column <HTMLElement | String | Number> DOM reference or ID string to a TH/TD element (or child of a TH/TD element), a Column key, or a ColumnSet key index.

selectRow

void selectRow ( row )
Sets given row to the selected state.
Parameters:
row <HTMLElement | String | YAHOO.widget.Record | Number> HTML element reference or ID string, Record instance, or RecordSet position index.

setColumnWidth

void setColumnWidth ( oColumn , nWidth )
Sets given Column to given pixel width. If new width is less than minimum width, sets to minimum width. Updates oColumn.width value.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
nWidth <Number> New width in pixels. A null value auto-sizes Column, subject to minWidth and maxAutoWidth validations.

showCellEditor

void showCellEditor ( elCell )
Activates and shows CellEditor instance for the given cell while deactivating and canceling previous CellEditor. It is baked into DataTable that only one CellEditor can be active at any given time.
Parameters:
elCell <HTMLElement | String> Cell to edit.

showColumn

void showColumn ( oColumn )
Shows given Column. NOTE: You cannot hide/show nested Columns. You can only hide/show non-nested Columns, and top-level parent Columns (which will hide/show all children Columns).
Parameters:
oColumn <YAHOO.widget.Column | HTMLElement | String | Number> Column instance, TH/TD element (or child of a TH/TD element), a Column key, or a ColumnSet key index.

showTableMessage

void showTableMessage ( sHTML , sClassName )
Displays message within secondary TBODY.
Parameters:
sHTML <HTML> (optional) Value for innerHTML.
sClassName <String> (optional) Classname.

sortColumn

void sortColumn ( oColumn , sDir )
Sorts given Column. If "dynamicData" is true, current selections are purged before a request is sent to the DataSource for data for the new state (using the request returned by "generateRequest()").
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
sDir <String> (Optional) YAHOO.widget.DataTable.CLASS_ASC or YAHOO.widget.DataTable.CLASS_DESC

toString

String toString ( )
DataSource instance name, for logging.
Returns: String
Unique name of the DataSource instance.

undisable

void undisable ( )
Undisables DataTable UI.

unhighlightCell

void unhighlightCell ( cell )
Removes the class YAHOO.widget.DataTable.CLASS_HIGHLIGHTED from the given cell.
Parameters:
cell <HTMLElement | String> DOM element reference or ID string.

unhighlightColumn

void unhighlightColumn ( column )
Removes the class YAHOO.widget.DataTable.CLASS_HIGHLIGHTED to cells of the given Column. NOTE: You cannot highlight/unhighlight nested Columns. You can only highlight/unhighlight non-nested Columns, and bottom-level key Columns.
Parameters:
column <HTMLElement | String | Number> DOM reference or ID string to a TH/TD element (or child of a TH/TD element), a Column key, or a ColumnSet key index.

unhighlightRow

void unhighlightRow ( row )
Removes the class YAHOO.widget.DataTable.CLASS_HIGHLIGHTED from the given row.
Parameters:
row <HTMLElement | String> DOM element reference or ID string.

unselectAllCells

void unselectAllCells ( )
Clears out all cell selections.

unselectAllRows

void unselectAllRows ( )
Clears out all row selections.

unselectCell

void unselectCell ( cell )
Sets given cell to the unselected state.
Parameters:
cell <HTMLElement | String | Object} TD element or child of a TD element, or object literal of syntax {record:oRecord, column:oColumn> .
cell <HTMLElement | String> DOM element reference or ID string to DataTable page element or RecordSet index.

unselectColumn

void unselectColumn ( column )
Unselects given Column. NOTE: You cannot select/unselect nested Columns. You can only select/unselect non-nested Columns, and bottom-level key Columns.
Parameters:
column <HTMLElement | String | Number> DOM reference or ID string to a TH/TD element (or child of a TH/TD element), a Column key, or a ColumnSet key index.

unselectRow

void unselectRow ( row )
Sets given row to the unselected state.
Parameters:
row <HTMLElement | String | YAHOO.widget.Record | Number> HTML element reference or ID string, Record instance, or RecordSet position index.

updateCell

void updateCell ( oRecord , oColumn , oData , skipRender )
For the given row and column, updates the Record with the given data. If the cell is on current page, the corresponding DOM elements are also updated.
Parameters:
oRecord <YAHOO.widget.Record> Record instance.
oColumn <YAHOO.widget.Column | String | Number> A Column key, or a ColumnSet key index.
oData <Object> New data value for the cell.
skipRender <Boolean> Skips render step. Editors that update multiple cells in ScrollingDataTable should render only on the last call to updateCell().

updateRow

void updateRow ( row , oData )
For the given row, updates the associated Record with the given data. If the row is on current page, the corresponding DOM elements are also updated.
Parameters:
row <YAHOO.widget.Record | Number | HTMLElement | String> Which row to update: By Record instance, by Record's RecordSet position index, by HTMLElement reference to the TR element, or by ID string of the TR element.
oData <Object> Object literal of data for the row.

updateRows

void updateRows ( startrow , aData )
Starting with the given row, updates associated Records with the given data. The number of rows to update are determined by the array of data provided. Undefined data (i.e., not an object literal) causes a row to be skipped. If any of the rows are on current page, the corresponding DOM elements are also updated.
Parameters:
startrow <YAHOO.widget.Record | Number | HTMLElement | String> Starting row to update: By Record instance, by Record's RecordSet position index, by HTMLElement reference to the TR element, or by ID string of the TR element.
aData <Object[]> Array of object literal of data for the rows.

validateColumnWidths

void validateColumnWidths ( oArg.column )
For one or all Columns, when Column is not hidden, width is not set, and minWidth and/or maxAutoWidth is set, validates auto-width against minWidth and maxAutoWidth.
Parameters:
oArg.column <YAHOO.widget.Column> (optional) One Column to validate. If null, all Columns' widths are validated.

Events

beforeCaptionChange

beforeCaptionChange ( event )
Fires before the value for the configuration attribute 'caption' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeCurrencyOptionsChange

beforeCurrencyOptionsChange ( event )
Fires before the value for the configuration attribute 'currencyOptions' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeCurrencySymbolChange

beforeCurrencySymbolChange ( event )
Fires before the value for the configuration attribute 'currencySymbol' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeDateOptionsChange

beforeDateOptionsChange ( event )
Fires before the value for the configuration attribute 'dateOptions' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeDraggableColumnsChange

beforeDraggableColumnsChange ( event )
Fires before the value for the configuration attribute 'draggableColumns' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeDynamicDataChange

beforeDynamicDataChange ( event )
Fires before the value for the configuration attribute 'dynamicData' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeFormatRowChange

beforeFormatRowChange ( event )
Fires before the value for the configuration attribute 'formatRow' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeGenerateRequestChange

beforeGenerateRequestChange ( event )
Fires before the value for the configuration attribute 'generateRequest' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeInitialLoadChange

beforeInitialLoadChange ( event )
Fires before the value for the configuration attribute 'initialLoad' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeInitialRequestChange

beforeInitialRequestChange ( event )
Fires before the value for the configuration attribute 'initialRequest' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeMSG_EMPTYChange

beforeMSG_EMPTYChange ( event )
Fires before the value for the configuration attribute 'MSG_EMPTY' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeMSG_ERRORChange

beforeMSG_ERRORChange ( event )
Fires before the value for the configuration attribute 'MSG_ERROR' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeMSG_LOADINGChange

beforeMSG_LOADINGChange ( event )
Fires before the value for the configuration attribute 'MSG_LOADING' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeMSG_SORTASCChange

beforeMSG_SORTASCChange ( event )
Fires before the value for the configuration attribute 'MSG_SORTASC' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeMSG_SORTDESCChange

beforeMSG_SORTDESCChange ( event )
Fires before the value for the configuration attribute 'MSG_SORTDESC' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeNumberOptionsChange

beforeNumberOptionsChange ( event )
Fires before the value for the configuration attribute 'numberOptions' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforePaginatorChange

beforePaginatorChange ( event )
Fires before the value for the configuration attribute 'paginator' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeRenderEvent

beforeRenderEvent ( )
Fired before the DataTable's DOM is rendered or modified.

beforeRenderLoopSizeChange

beforeRenderLoopSizeChange ( event )
Fires before the value for the configuration attribute 'renderLoopSize' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeSelectionModeChange

beforeSelectionModeChange ( event )
Fires before the value for the configuration attribute 'selectionMode' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeSortedByChange

beforeSortedByChange ( event )
Fires before the value for the configuration attribute 'sortedBy' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeSortFunctionChange

beforeSortFunctionChange ( event )
Fires before the value for the configuration attribute 'sortFunction' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeSummaryChange

beforeSummaryChange ( event )
Fires before the value for the configuration attribute 'summary' changes. Return false to cancel the attribute change.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

buttonClickEvent

buttonClickEvent ( oArgs.event , oArgs.target )
Fired when a BUTTON element or INPUT element of type "button", "image", "submit", "reset" is clicked.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The BUTTON element.

captionChange

captionChange ( event )
Fires when the value for the configuration attribute 'caption' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

cellClickEvent

cellClickEvent ( oArgs.event , oArgs.target )
Fired when a cell has a click.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TD element.

cellDblclickEvent

cellDblclickEvent ( oArgs.event , oArgs.target )
Fired when a cell has a dblclick.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TD element.

cellFormatEvent

cellFormatEvent ( oArgs.el , oArgs.record , oArgs.column , oArgs.key )
Fired when a cell is formatted.
Parameters:
oArgs.el <HTMLElement> The formatted TD element.
oArgs.record <YAHOO.widget.Record> The associated Record instance.
oArgs.column <YAHOO.widget.Column> The associated Column instance.
oArgs.key <String> (deprecated) The key of the formatted cell.

cellHighlightEvent

cellHighlightEvent ( oArgs.el , oArgs.record , oArgs.column , oArgs.key )
Fired when a cell is highlighted.
Parameters:
oArgs.el <HTMLElement> The highlighted TD element.
oArgs.record <YAHOO.widget.Record> The associated Record instance.
oArgs.column <YAHOO.widget.Column> The associated Column instance.
oArgs.key <String> (deprecated) The key of the highlighted cell.

cellMousedownEvent

cellMousedownEvent ( oArgs.event , oArgs.target )
Fired when a cell has a mousedown.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TD element.

cellMouseoutEvent

cellMouseoutEvent ( oArgs.event , oArgs.target )
Fired when a cell has a mouseout.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TD element.

cellMouseoverEvent

cellMouseoverEvent ( oArgs.event , oArgs.target )
Fired when a cell has a mouseover.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TD element.

cellMouseupEvent

cellMouseupEvent ( oArgs.event , oArgs.target )
Fired when a cell has a mouseup.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TD element.

cellSelectEvent

cellSelectEvent ( oArgs.el , oArgs.record , oArgs.column , oArgs.key )
Fired when a cell is selected.
Parameters:
oArgs.el <HTMLElement> The selected TD element.
oArgs.record <YAHOO.widget.Record> The associated Record instance.
oArgs.column <YAHOO.widget.Column> The associated Column instance.
oArgs.key <String> (deprecated) The key of the selected cell.

cellUnhighlightEvent

cellUnhighlightEvent ( oArgs.el , oArgs.record , oArgs.column , oArgs.key )
Fired when a cell is unhighlighted.
Parameters:
oArgs.el <HTMLElement> The unhighlighted TD element.
oArgs.record <YAHOO.widget.Record> The associated Record instance.
oArgs.column <YAHOO.widget.Column> The associated Column instance.
oArgs.key <String> (deprecated) The key of the unhighlighted cell.

cellUnselectEvent

cellUnselectEvent ( oArgs.el , oArgs.record , oArgs.column , oArgs.key )
Fired when a cell is unselected.
Parameters:
oArgs.el <HTMLElement> The unselected TD element.
oArgs.record <YAHOO.widget.Record> The associated Record.
oArgs.column <YAHOO.widget.Column> The associated Column instance.
oArgs.key <String> (deprecated) The key of the unselected cell.

cellUpdateEvent

cellUpdateEvent ( oArgs.record , oArgs.column , oArgs.oldData )
Fired when a cell is updated.
Parameters:
oArgs.record <YAHOO.widget.Record> The updated Record.
oArgs.column <YAHOO.widget.Column> The updated Column.
oArgs.oldData <Object> Original data value of the updated cell.

checkboxClickEvent

checkboxClickEvent ( oArgs.event , oArgs.target )
Fired when a CHECKBOX element is clicked.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The CHECKBOX element.

columnHideEvent

columnHideEvent ( oArgs.column )
Fired when a column is hidden.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.

columnHighlightEvent

columnHighlightEvent ( oArgs.column )
Fired when a column is highlighted.
Parameters:
oArgs.column <YAHOO.widget.Column> The highlighted Column.

columnInsertEvent

columnInsertEvent ( oArgs.column , oArgs.index )
Fired when a column is inserted.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.
oArgs.index <Number> The index position.

columnRemoveEvent

columnRemoveEvent ( oArgs.column )
Fired when a column is removed.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.

columnReorderEvent

columnReorderEvent ( oArgs.column , oArgs.oldIndex )
Fired when a Column is moved to a new index.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.
oArgs.oldIndex <Number> The previous tree index position.

columnResizeEvent

columnResizeEvent ( oArgs.column , oArgs.target , oArgs.width )
Fired when a column is drag-resized.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.
oArgs.target <HTMLElement> The TH element.
oArgs.width <Number> Width in pixels.

columnSelectEvent

columnSelectEvent ( oArgs.column )
Fired when a column is selected.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.

columnSetWidthEvent

columnSetWidthEvent ( oArgs.column , oArgs.width )
Fired when a column width is set.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.
oArgs.width <Number> The width in pixels.

columnShowEvent

columnShowEvent ( oArgs.column )
Fired when a column is shown.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.

columnSortEvent

columnSortEvent ( oArgs.column , oArgs.dir )
Fired when a column is sorted.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.
oArgs.dir <String> Sort direction: YAHOO.widget.DataTable.CLASS_ASC or YAHOO.widget.DataTable.CLASS_DESC.

columnUnhighlightEvent

columnUnhighlightEvent ( oArgs.column )
Fired when a column is unhighlighted.
Parameters:
oArgs.column <YAHOO.widget.Column> The unhighlighted Column.

columnUnselectEvent

columnUnselectEvent ( oArgs.column )
Fired when a column is unselected.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.

columnUnsetWidthEvent

columnUnsetWidthEvent ( oArgs.column )
Fired when a column width is unset.
Parameters:
oArgs.column <YAHOO.widget.Column> The Column instance.

currencyOptionsChange

currencyOptionsChange ( event )
Fires when the value for the configuration attribute 'currencyOptions' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

currencySymbolChange

currencySymbolChange ( event )
Fires when the value for the configuration attribute 'currencySymbol' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

dataReturnEvent

dataReturnEvent ( oArgs.request , oArgs.response )
Fired when data is returned from DataSource but before it is consumed by DataTable.
Parameters:
oArgs.request <String> Original request.
oArgs.response <Object> Response object.

dateOptionsChange

dateOptionsChange ( event )
Fires when the value for the configuration attribute 'dateOptions' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

disableEvent

disableEvent ( )
Fired when the DataTable is disabled.

draggableColumnsChange

draggableColumnsChange ( event )
Fires when the value for the configuration attribute 'draggableColumns' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

dropdownChangeEvent

dropdownChangeEvent ( oArgs.event , oArgs.target )
Fired when a SELECT element is changed.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The SELECT element.

dynamicDataChange

dynamicDataChange ( event )
Fires when the value for the configuration attribute 'dynamicData' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

editorBlockEvent

editorBlockEvent ( oArgs.editor )
Fired when a CellEditor is blocked.
Parameters:
oArgs.editor <YAHOO.widget.CellEditor> The CellEditor instance.

editorBlurEvent

editorBlurEvent ( oArgs.editor )
Fired when a CellEditor has a blur event.
Parameters:
oArgs.editor <YAHOO.widget.CellEditor> The CellEditor instance.

editorCancelEvent

editorCancelEvent ( oArgs.editor )
Fired when a CellEditor input is canceled.
Parameters:
oArgs.editor <YAHOO.widget.CellEditor> The CellEditor instance.

editorKeydownEvent

editorKeydownEvent ( oArgs.editor , oArgs.event )
Fired when a CellEditor has a keydown.
Parameters:
oArgs.editor <YAHOO.widget.CellEditor> The CellEditor instance.
oArgs.event <HTMLEvent> The event object.

editorRevertEvent

editorRevertEvent ( oArgs.editor , oArgs.newData , oArgs.oldData )
Fired when a CellEditor input is reverted.
Parameters:
oArgs.editor <YAHOO.widget.CellEditor> The CellEditor instance.
oArgs.newData <Object> New data value from form input field.
oArgs.oldData <Object> Old data value.

editorSaveEvent

editorSaveEvent ( oArgs.editor , oArgs.newData , oArgs.oldData )
Fired when a CellEditor input is saved.
Parameters:
oArgs.editor <YAHOO.widget.CellEditor> The CellEditor instance.
oArgs.newData <Object> New data value from form input field.
oArgs.oldData <Object> Old data value.

editorShowEvent

editorShowEvent ( oArgs.editor )
Fired when a CellEditor is shown.
Parameters:
oArgs.editor <YAHOO.widget.CellEditor> The CellEditor instance.

editorUnblockEvent

editorUnblockEvent ( oArgs.editor )
Fired when a CellEditor is unblocked.
Parameters:
oArgs.editor <YAHOO.widget.CellEditor> The CellEditor instance.

editorUpdateEvent

editorUpdateEvent ( )
Deprecated Use CellEditor class.

formatRowChange

formatRowChange ( event )
Fires when the value for the configuration attribute 'formatRow' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

generateRequestChange

generateRequestChange ( event )
Fires when the value for the configuration attribute 'generateRequest' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

headerCellClickEvent

headerCellClickEvent ( )
Deprecated Use theadCellClickEvent.

headerCellDblclickEvent

headerCellDblclickEvent ( )
Deprecated Use theadCellDblclickEvent.

headerCellMousedownEvent

headerCellMousedownEvent ( )
Deprecated Use theadCellMousedownEvent.

headerCellMouseoutEvent

headerCellMouseoutEvent ( )
Deprecated Use theadCellMouseoutEvent.

headerCellMouseoverEvent

headerCellMouseoverEvent ( )
Deprecated Use theadCellMouseoverEvent.

headerLabelClickEvent

headerLabelClickEvent ( )
Deprecated Use theadLabelClickEvent.

headerLabelDbllickEvent

headerLabelDbllickEvent ( )
Deprecated Use theadLabelDblclickEvent.

headerLabelMousedownEvent

headerLabelMousedownEvent ( )
Deprecated Use theadLabelMousedownEvent.

headerLabelMouseoutEvent

headerLabelMouseoutEvent ( )
Deprecated Use theadLabelMouseoutEvent.

headerLabelMouseoverEvent

headerLabelMouseoverEvent ( )
Deprecated Use theadLabelMouseoverEvent.

headerRowClickEvent

headerRowClickEvent ( )
Deprecated Use theadRowClickEvent.

headerRowDblclickEvent

headerRowDblclickEvent ( )
Deprecated Use theadRowDblclickEvent.

headerRowMousedownEvent

headerRowMousedownEvent ( )
Deprecated Use theadRowMousedownEvent.

headerRowMouseoutEvent

headerRowMouseoutEvent ( )
Deprecated Use theadRowMouseoutEvent.

headerRowMouseoverEvent

headerRowMouseoverEvent ( )
Deprecated Use theadRowMouseoverEvent.

initEvent

initEvent ( )
Fired when the DataTable's rows are rendered from an initialized state.

initialLoadChange

initialLoadChange ( event )
Fires when the value for the configuration attribute 'initialLoad' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

initialRequestChange

initialRequestChange ( event )
Fires when the value for the configuration attribute 'initialRequest' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

linkClickEvent

linkClickEvent ( oArgs.event , oArgs.target )
Fired when a link is clicked.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The A element.

MSG_EMPTYChange

MSG_EMPTYChange ( event )
Fires when the value for the configuration attribute 'MSG_EMPTY' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

MSG_ERRORChange

MSG_ERRORChange ( event )
Fires when the value for the configuration attribute 'MSG_ERROR' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

MSG_LOADINGChange

MSG_LOADINGChange ( event )
Fires when the value for the configuration attribute 'MSG_LOADING' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

MSG_SORTASCChange

MSG_SORTASCChange ( event )
Fires when the value for the configuration attribute 'MSG_SORTASC' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

MSG_SORTDESCChange

MSG_SORTDESCChange ( event )
Fires when the value for the configuration attribute 'MSG_SORTDESC' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

numberOptionsChange

numberOptionsChange ( event )
Fires when the value for the configuration attribute 'numberOptions' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

paginatorChange

paginatorChange ( event )
Fires when the value for the configuration attribute 'paginator' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

postRenderEvent

postRenderEvent ( )
Fired when the DataTable's post-render routine is complete, including Column width validations.

radioClickEvent

radioClickEvent ( oArgs.event , oArgs.target )
Fired when a RADIO element is clicked.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The RADIO element.

renderEvent

renderEvent ( )
Fired when the DataTable's DOM is rendered or modified.

renderLoopSizeChange

renderLoopSizeChange ( event )
Fires when the value for the configuration attribute 'renderLoopSize' changes.
Parameters:
event <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

rowAddEvent

rowAddEvent ( oArgs.record )
Fired when a row is added.
Parameters:
oArgs.record <YAHOO.widget.Record> The added Record.

rowClickEvent

rowClickEvent ( oArgs.event , oArgs.target )
Fired when a row has a click.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TR element.

rowDblclickEvent

rowDblclickEvent ( oArgs.event , oArgs.target )
Fired when a row has a dblclick.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TR element.

rowDeleteEvent

rowDeleteEvent ( oArgs.oldData , oArgs.recordIndex , oArgs.trElIndex )
Fired when a row is deleted.
Parameters:
oArgs.oldData <Object> Object literal of the deleted data.
oArgs.recordIndex <Number> Index of the deleted Record.
oArgs.trElIndex <Number> Index of the deleted TR element, if on current page.

rowHighlightEvent

rowHighlightEvent ( oArgs.el , oArgs.record )
Fired when a row is highlighted.
Parameters:
oArgs.el <HTMLElement> The highlighted TR element.
oArgs.record <YAHOO.widget.Record> The highlighted Record.

rowMousedownEvent

rowMousedownEvent ( oArgs.event , oArgs.target )
Fired when a row has a mousedown.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TR element.

rowMouseoutEvent

rowMouseoutEvent ( oArgs.event , oArgs.target )
Fired when a row has a mouseout.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TR element.

rowMouseoverEvent

rowMouseoverEvent ( oArgs.event , oArgs.target )
Fired when a row has a mouseover.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TR element.

rowMouseupEvent

rowMouseupEvent ( oArgs.event , oArgs.target )
Fired when a row has a mouseup.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The TR element.

rowsAddEvent

rowsAddEvent ( oArgs.record )
Fired when rows are added.
Parameters: