Yahoo! UI Library

DataTable Widget  2.6.0

Yahoo! UI Library > datatable > YAHOO.widget.DataTable

Class YAHOO.widget.DataTable - extends 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

configs - Object

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

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_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_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

Cell formatting functions.

Methods

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.
Returns: void

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.
Returns: void

cancelCellEditor

void cancelCellEditor ( )
Cancels active CellEditor.
Returns: void

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.
Returns: void

DataTable.formatButton

static void DataTable.formatButton ( el , oRecord , oColumn , oData )
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 <Object | Boolean> Data value for the cell. By default, the value is what gets written to the BUTTON.
Returns: void

DataTable.formatCheckbox

static void DataTable.formatCheckbox ( el , oRecord , oColumn , oData )
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} 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> . Other forms of oData require a custom formatter.
Returns: void

DataTable.formatCurrency

static void DataTable.formatCurrency ( el , oRecord , oColumn , oData )
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.
Returns: void

DataTable.formatDate

static void DataTable.formatDate ( el , oRecord , oColumn , oData )
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.
Returns: void

DataTable.formatDefault

static void DataTable.formatDefault ( el , oRecord , oColumn , oData )
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 <Object> (Optional) Data value for the cell.
Returns: void

DataTable.formatDropdown

static void DataTable.formatDropdown ( el , oRecord , oColumn , oData )
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.
Returns: void

DataTable.formatEmail

static void DataTable.formatEmail ( el , oRecord , oColumn , oData )
Formats emails.
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.
Returns: void

DataTable.formatLink

static void DataTable.formatLink ( el , oRecord , oColumn , oData )
Formats links.
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.
Returns: void

DataTable.formatNumber

static void DataTable.formatNumber ( el , oRecord , oColumn , oData )
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.
Returns: void

DataTable.formatRadio

static void DataTable.formatRadio ( el , oRecord , oColumn , oData )
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.
Returns: void

DataTable.formatText

static void DataTable.formatText ( el , oRecord , oColumn , oData )
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 <Object> (Optional) Data value for the cell.
Returns: void

DataTable.formatTextarea

static void DataTable.formatTextarea ( el , oRecord , oColumn , oData )
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.
Returns: void

DataTable.formatTextbox

static void DataTable.formatTextbox ( el , oRecord , oColumn , oData )
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.
Returns: void

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.
Returns: void

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.
Returns: void

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.
Returns: void

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!
Returns: void

destroyCellEditor

void destroyCellEditor ( )
Destroys active CellEditor instance and UI.
Returns: void

disable

void disable ( )
Disables DataTable UI.
Returns: void

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.
Returns: void

focusTbodyEl

void focusTbodyEl ( )
Brings focus to the TBODY element.
Returns: void

focusTheadEl

void focusTheadEl ( )
Brings focus to the THEAD element.
Returns: void

formatCell

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

getAboveTdEl

HTMLElement getAboveTdEl ( cell )
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.
Returns: HTMLElement
Reference to next TD element, or null.

getBelowTdEl

HTMLElement getBelowTdEl ( cell )
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.
Returns: HTMLElement
Reference to previous TD element, or null.

getBody

void getBody ( )
Returns: void
Deprecated Use getTbodyEl().

getCell

void getCell ( )
Returns: void
Deprecated Use getTdEl().

getCellEditor

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

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 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 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 ( )
Returns DOM reference to the last TD element in the DataTable page (by default), the first TD element of the optionally given row, or null.
Returns: HTMLElement
Reference to last TD element.

getLastTrEl

HTMLElement getLastTrEl ( )
Returns DOM reference to the last 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 )
Returns DOM reference to the next TR element from the given 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.
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 )
Returns DOM reference to the previous TR element from the given 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.
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 ( )
Returns: void
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.
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 directly 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.
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 row. Returns null if the row is not on the current DataTable page.
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 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> Column instance.
Returns: void

hideTableMessage

void hideTableMessage ( )
Hides secondary TBODY.
Returns: void

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.
Returns: void

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.
Returns: void

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.
Returns: void

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.
Returns: void

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.
Returns: void

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.

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.

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)
Returns: void

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)
Returns: void

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.
Returns: void

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)
Returns: void

onDataReturnSetRecords

void onDataReturnSetRecords ( )
Alias for onDataReturnSetRows for backward compatibility
Returns: void
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)
Returns: void

onEditorBlockEvent

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

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.
Returns: void

onEditorUnblockEvent

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

onEventCancelCellEditor

void onEventCancelCellEditor ( )
Overridable custom event handler to cancel active CellEditor.
Returns: void

onEventEditCell

void onEventEditCell ( )
Returns: void
Deprecated Use onEventShowCellEditor.

onEventFormatCell

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

onEventHighlightCell

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

onEventHighlightColumn

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

onEventHighlightRow

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

onEventSaveCellEditor

void onEventSaveCellEditor ( )
Overridable custom event handler to save active CellEditor input.
Returns: void

onEventSelectCell

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

onEventSelectColumn

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

onEventSelectRow

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

onEventShowCellEditor

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

onEventSortColumn

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

onEventUnhighlightCell

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

onEventUnhighlightColumn

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

onEventUnhighlightRow

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

onPaginatorChange

void onPaginatorChange ( )
Alias for onPaginatorChange for backward compatibility
Returns: void
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.
Returns: void

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.
Returns: void

refreshView

void refreshView ( )
Returns: void
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.
Returns: void

renderPaginator

void renderPaginator ( )
Renders the Paginator to the DataTable UI
Returns: void

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 ( )
Returns: void
Deprecated Use destroyCellEditor

saveCellEditor

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

select

void select ( )
Returns: void
Deprecated Use selectRow.

selectCell

void selectCell ( cell )
Sets given cell to the selected state.
Parameters:
cell <HTMLElement | String> DOM element reference or ID string to DataTable page element or RecordSet index.
Returns: void

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.
Returns: void

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.
Returns: void

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.
Returns: void

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.
Returns: void

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> Column instance.
Returns: void

showTableMessage

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

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
Returns: void

toString

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

undisable

void undisable ( )
Undisables DataTable UI.
Returns: void

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.
Returns: void

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.
Returns: void

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.
Returns: void

unselectAllCells

void unselectAllCells ( )
Clears out all cell selections.
Returns: void

unselectAllRows

void unselectAllRows ( )
Clears out all row selections.
Returns: void

unselectCell

void unselectCell ( cell )
Sets given cell to the unselected state.
Parameters:
cell <HTMLElement | String> DOM element reference or ID string to DataTable page element or RecordSet index.
Returns: void

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.
Returns: void

unselectRow

void unselectRow ( 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.
Returns: void

updateCell

void updateCell ( oRecord , oColumn , oData )
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> Object literal of data for the cell.
Returns: void

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.
Returns: void

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.
Returns: void

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.

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.

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 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> Object literal of the old data.

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 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:
oArgs.record <YAHOO.widget.Record[]> The added Records.

rowsDeleteEvent

rowsDeleteEvent ( oArgs.oldData , oArgs.recordIndex , oArgs.count )
Fired when rows are deleted.
Parameters:
oArgs.oldData <Object[]> Array of object literals of the deleted data.
oArgs.recordIndex <Number> Index of the first deleted Record.
oArgs.count <Number> Number of deleted Records.

rowSelectEvent

rowSelectEvent ( oArgs.el , oArgs.record )
Fired when a row is selected.
Parameters:
oArgs.el <HTMLElement> The selected TR element, if applicable.
oArgs.record <YAHOO.widget.Record> The selected Record.

rowUnhighlightEvent

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

rowUnselectEvent

rowUnselectEvent ( oArgs.el , oArgs.record )
Fired when a row is unselected.
Parameters:
oArgs.el <HTMLElement> The unselected TR element, if applicable.
oArgs.record <YAHOO.widget.Record> The unselected Record.

rowUpdateEvent

rowUpdateEvent ( oArgs.record , oArgs.oldData )
Fired when a row is updated.
Parameters:
oArgs.record <YAHOO.widget.Record> The updated Record.
oArgs.oldData <Object> Object literal of the old data.

selectionModeChange

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

sortedByChange

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

summaryChange

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

tableBlurEvent

tableBlurEvent ( )
Fired when the DataTable has a blur event.

tableClickEvent

tableClickEvent ( oArgs.event , oArgs.target )
Fired when the DataTable has a click.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

tableDblclickEvent

tableDblclickEvent ( oArgs.event , oArgs.target )
Fired when the DataTable has a dblclick.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

tableFocusEvent

tableFocusEvent ( )
Fired when the DataTable has a focus event.

tableKeyEvent

tableKeyEvent ( oArgs.event , oArgs.target )
Fired when the DataTable has a key event.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

tableMousedownEvent

tableMousedownEvent ( oArgs.event , oArgs.target )
Fired when the DataTable has a mousedown.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

tableMouseoutEvent

tableMouseoutEvent ( oArgs.event , oArgs.target )
Fired when the DataTable has a mouseout.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

tableMouseoverEvent

tableMouseoverEvent ( oArgs.event , oArgs.target )
Fired when the DataTable has a mouseover.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

tableMouseupEvent

tableMouseupEvent ( oArgs.event , oArgs.target )
Fired when the DataTable has a mouseup.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

tableMsgHideEvent

tableMsgHideEvent ( )
Fired when the DataTable's message element is hidden.

tableMsgShowEvent

tableMsgShowEvent ( oArgs.html , oArgs.className )
Fired when a message is shown in the DataTable's message element.
Parameters:
oArgs.html <String> The HTML displayed.
oArgs.className <String> The className assigned.

tbodyFocusEvent

tbodyFocusEvent ( )
Fired when the DataTable TBODY element has a focus event.

tbodyKeyEvent

tbodyKeyEvent ( oArgs.event , oArgs.target )
Fired when the DataTable TBODY element has a key event.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

theadCellClickEvent

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

theadCellDblclickEvent

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

theadCellMousedownEvent

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

theadCellMouseoutEvent

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

theadCellMouseoverEvent

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

theadCellMouseupEvent

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

theadFocusEvent

theadFocusEvent ( )
Fired when the DataTable THEAD element has a focus event.

theadKeyEvent

theadKeyEvent ( oArgs.event , oArgs.target )
Fired when the DataTable THEAD element has a key event.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's TABLE element.

theadLabelClickEvent

theadLabelClickEvent ( oArgs.event , oArgs.target )
Fired when a THEAD label has a click.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The SPAN element.

theadLabelDblclickEvent

theadLabelDblclickEvent ( oArgs.event , oArgs.target )
Fired when a THEAD label has a dblclick.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The SPAN element.

theadLabelMousedownEvent

theadLabelMousedownEvent ( oArgs.event , oArgs.target )
Fired when a THEAD label has a mousedown.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The SPAN element.

theadLabelMouseoutEvent

theadLabelMouseoutEvent ( oArgs.event , oArgs.target )
Fired when a THEAD label has a mouseout.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The SPAN element.

theadLabelMouseoverEvent

theadLabelMouseoverEvent ( oArgs.event , oArgs.target )
Fired when a THEAD label has a mouseover.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The SPAN element.

theadLabelMouseupEvent

theadLabelMouseupEvent ( oArgs.event , oArgs.target )
Fired when a THEAD label has a mouseup.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The SPAN element.

theadRowClickEvent

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

theadRowDblclickEvent

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

theadRowMousedownEvent

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

theadRowMouseoutEvent

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

theadRowMouseoverEvent

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

theadRowMouseupEvent

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

undisableEvent

undisableEvent ( )
Fired when the DataTable is undisabled.

unselectAllCellsEvent

unselectAllCellsEvent ( )
Fired when all cell selections are cleared.

unselectAllRowsEvent

unselectAllRowsEvent ( )
Fired when all row selections are cleared.

Configuration Attributes

caption - String

Value for the CAPTION element. NB: Not supported in ScrollingDataTable.

currencyOptions - Object

Default config passed to YAHOO.util.Number.format() by the 'currency' Column formatter.
Default Value: {prefix: $, decimalPlaces:2, decimalSeparator:".", thousandsSeparator:","}

currencySymbol - object

Deprecated  

dateOptions - Object

Default config passed to YAHOO.util.Date.format() by the 'date' Column formatter.
Default Value: {format:"%m/%d/%Y", locale:"en"}

draggableColumns - Boolean

True if Columns are draggable to reorder, false otherwise. The Drag & Drop Utility is required to enable this feature. Only top-level and non-nested Columns are draggable. Write once.
Default Value: false

dynamicData - Boolean

If true, sorting and pagination are relegated to the DataSource for handling, using the request returned by the "generateRequest" function. Each new DataSource response blows away all previous Records. False by default, so sorting and pagination will be handled directly on the client side, without causing any new requests for data from the DataSource.
Default Value: false

formatRow - function

A function that accepts a TR element and its associated Record for custom formatting. The function must return TRUE in order to automatically continue formatting of child TD elements, else TD elements will not be automatically formatted.
Default Value: null

generateRequest - function

A function that converts an object literal of desired DataTable states into a request value which is then passed to the DataSource's sendRequest method in order to retrieve data for those states. This function is passed an object literal of state data and a reference to the DataTable instance:
pagination
offsetRecord
{Number} Index of the first Record of the desired page
rowsPerPage
{Number} Number of rows per page
sortedBy
key
{String} Key of sorted Column
dir
{String} Sort direction, either YAHOO.widget.DataTable.CLASS_ASC or YAHOO.widget.DataTable.CLASS_DESC
self
The DataTable instance
and by default returns a String of syntax: "sort={sortColumn}&dir={sortDir}&startIndex={pageStartIndex}&results={rowsPerPage}"
Default Value: HTMLFunction

initialLoad - Boolean | Object

Determines whether or not to load data at instantiation. By default, will trigger a sendRequest() to the DataSource and pass in the request defined by initialRequest. If set to false, data will not load at instantiation. Alternatively, implementers who wish to work with a custom payload may pass in an object literal with the following values:
request (MIXED)
Request value.
argument (MIXED)
Custom data that will be passed through to the callback function.
Default Value: true

initialRequest - MIXED

Defines the initial request that gets sent to the DataSource during initialization. Value is ignored if initialLoad is set to any value other than true.
Default Value: null

MSG_EMPTY - String

Message to display if DataTable has no data.
Default Value: "No records found."

MSG_ERROR - String

Message to display while DataTable has data error.
Default Value: "Data error."

MSG_LOADING - String

Message to display while DataTable is loading data.
Default Value: "Loading..."

MSG_SORTASC - String

Message to display in tooltip to sort Column in ascending order.
Default Value: "Click to sort ascending"

MSG_SORTDESC - String

Message to display in tooltip to sort Column in descending order.
Default Value: "Click to sort descending"

numberOptions - Object

Default config passed to YAHOO.util.Number.format() by the 'number' Column formatter.
Default Value: {decimalPlaces:0, thousandsSeparator:","}

paginator - {Object|YAHOO.widget.Paginator}

An instance of YAHOO.widget.Paginator.
Default Value: null

renderLoopSize - Number

A value greater than 0 enables DOM rendering of rows to be executed from a non-blocking timeout queue and sets how many rows to be rendered per timeout. Recommended for very large data sets.
Default Value: 0

selectionMode - String

Specifies row or cell selection mode. Accepts the following strings:
"standard"
Standard row selection with support for modifier keys to enable multiple selections.
"single"
Row selection with modifier keys disabled to not allow multiple selections.
"singlecell"
Cell selection with modifier keys disabled to not allow multiple selections.
"cellblock"
Cell selection with support for modifier keys to enable multiple selections in a block-fashion, like a spreadsheet.
"cellrange"
Cell selection with support for modifier keys to enable multiple selections in a range-fashion, like a calendar.
Default Value: "standard"

sortedBy - Object | null

Object literal provides metadata for initial sort values if data will arrive pre-sorted:
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

summary - String

Value for the SUMMARY attribute.
Default Value: ""


Copyright © 2008 Yahoo! Inc. All rights reserved.