Yahoo! UI Library

DataTable Widget  2.6.0

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

Class YAHOO.widget.ScrollingDataTable - extends YAHOO.widget.DataTable

The ScrollingDataTable class extends the DataTable class to provide functionality for x-scrolling, y-scrolling, and xy-scrolling.

Constructor

YAHOO.widget.ScrollingDataTable ( 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

DataTable.CLASS_BODY - static final String

Class name assigned to inner DataTable body container.
Default Value: "yui-dt-bd"

DataTable.CLASS_HEADER - static final String

Class name assigned to inner DataTable header container.
Default Value: "yui-dt-hd"

Methods

disable

void disable ( )
Disables ScrollingDataTable UI.
Returns: void

getBdContainerEl

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

getBdTableEl

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

getHdContainerEl

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

getHdTableEl

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

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.

onColumnChange

void onColumnChange ( oArgs )
Handles Column mutations
Parameters:
oArgs <Object> Custom Event data.
Returns: void

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.

reorderColumn

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

setColumnWidth

void setColumnWidth ( oColumn , nWidth )
Sets given Column to given pixel width. If new width is less than minWidth width, sets to minWidth. Updates oColumn.width value.
Parameters:
oColumn <YAHOO.widget.Column> Column instance.
nWidth <Number> New width in pixels.
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

validateColumnWidths

void validateColumnWidths ( oArg.column )
For one or all Columns of a ScrollingDataTable, when Column is not hidden, and width is not set, syncs widths of header and body cells and validates that width against minWidth and/or maxAutoWidth as necessary.
Parameters:
oArg.column <YAHOO.widget.Column> (optional) One Column to validate. If null, all Columns' widths are validated.
Returns: void

Methods inherited from YAHOO.widget.DataTable:

addRow, addRows, cancelCellEditor, clearTextSelection, deleteRow, deleteRows, destroy, destroyCellEditor, disable, doBeforeLoadData, doBeforePaginatorChange, doBeforeShowCellEditor, doBeforeSortColumn, focus, focusTbodyEl, focusTheadEl, formatCell, getAboveTdEl, getBelowTdEl, getCellEditor, getColumn, getColumnById, getColumnSet, getColumnSortDir, getContainerEl, getDataSource, getFirstTdEl, getFirstTrEl, getId, getLastSelectedCell, getLastSelectedRecord, getLastTdEl, getLastTrEl, getMsgTbodyEl, getMsgTdEl, getNextTdEl, getNextTrEl, getPreviousTdEl, getPreviousTrEl, getRecord, getRecordIndex, getRecordSet, getSelectedCells, getSelectedColumns, getSelectedRows, getSelectedTdEls, getSelectedTrEls, getState, getTableEl, getTbodyEl, getTdEl, getTdLinerEl, getTheadEl, getThEl, getThLinerEl, getTrEl, getTrIndex, handleDataReturnPayload, hideColumn, hideTableMessage, highlightCell, highlightColumn, highlightRow, initializeTable, insertColumn, isSelected, onDataReturnAppendRows, onDataReturnInitializeTable, onDataReturnInsertRows, onDataReturnReplaceRows, onDataReturnSetRows, onEditorBlockEvent, onEditorBlurEvent, onEditorUnblockEvent, onEventCancelCellEditor, onEventFormatCell, onEventHighlightCell, onEventHighlightColumn, onEventHighlightRow, onEventSaveCellEditor, onEventSelectCell, onEventSelectColumn, onEventSelectRow, onEventShowCellEditor, onEventSortColumn, onEventUnhighlightCell, onEventUnhighlightColumn, onEventUnhighlightRow, onPaginatorChangeRequest, onShow, removeColumn, render, renderPaginator, reorderColumn, saveCellEditor, selectCell, selectColumn, selectRow, setColumnWidth, showCellEditor, showColumn, showTableMessage, sortColumn, toString, undisable, unhighlightCell, unhighlightColumn, unhighlightRow, unselectAllCells, unselectAllRows, unselectCell, unselectColumn, unselectRow, updateCell, updateRow, validateColumnWidths

Events

beforeCOLOR_COLUMNFILLERChange

beforeCOLOR_COLUMNFILLERChange ( event )
Fires before the value for the configuration attribute 'COLOR_COLUMNFILLER' 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.

beforeHeightChange

beforeHeightChange ( event )
Fires before the value for the configuration attribute 'height' 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.

beforeWidthChange

beforeWidthChange ( event )
Fires before the value for the configuration attribute 'width' 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.

COLOR_COLUMNFILLERChange

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

heightChange

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

tableScrollEvent

tableScrollEvent ( oArgs.event , oArgs.target )
Fired when a fixed scrolling DataTable has a scroll.
Parameters:
oArgs.event <HTMLEvent> The event object.
oArgs.target <HTMLElement> The DataTable's CONTAINER element (in IE) or the DataTable's TBODY element (everyone else).

widthChange

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

Events inherited from YAHOO.widget.DataTable:

beforeCaptionChange, beforeCurrencyOptionsChange, beforeCurrencySymbolChange, beforeDateOptionsChange, beforeDraggableColumnsChange, beforeDynamicDataChange, beforeFormatRowChange, beforeGenerateRequestChange, beforeInitialLoadChange, beforeInitialRequestChange, beforeMSG_EMPTYChange, beforeMSG_ERRORChange, beforeMSG_LOADINGChange, beforeMSG_SORTASCChange, beforeMSG_SORTDESCChange, beforeNumberOptionsChange, beforePaginatorChange, beforeRenderLoopSizeChange, beforeSelectionModeChange, beforeSortedByChange, beforeSummaryChange, buttonClickEvent, captionChange, cellClickEvent, cellDblclickEvent, cellFormatEvent, cellHighlightEvent, cellMousedownEvent, cellMouseoutEvent, cellMouseoverEvent, cellMouseupEvent, cellSelectEvent, cellUnhighlightEvent, cellUnselectEvent, cellUpdateEvent, checkboxClickEvent, columnHideEvent, columnHighlightEvent, columnInsertEvent, columnRemoveEvent, columnReorderEvent, columnResizeEvent, columnSelectEvent, columnSetWidthEvent, columnShowEvent, columnSortEvent, columnUnhighlightEvent, columnUnselectEvent, columnUnsetWidthEvent, currencyOptionsChange, currencySymbolChange, dataReturnEvent, dateOptionsChange, disableEvent, draggableColumnsChange, dropdownChangeEvent, dynamicDataChange, editorBlockEvent, editorBlurEvent, editorCancelEvent, editorKeydownEvent, editorRevertEvent, editorSaveEvent, editorShowEvent, editorUnblockEvent, formatRowChange, generateRequestChange, initEvent, initialLoadChange, initialRequestChange, linkClickEvent, MSG_EMPTYChange, MSG_ERRORChange, MSG_LOADINGChange, MSG_SORTASCChange, MSG_SORTDESCChange, numberOptionsChange, paginatorChange, postRenderEvent, radioClickEvent, renderEvent, renderLoopSizeChange, rowAddEvent, rowClickEvent, rowDblclickEvent, rowDeleteEvent, rowHighlightEvent, rowMousedownEvent, rowMouseoutEvent, rowMouseoverEvent, rowMouseupEvent, rowsAddEvent, rowsDeleteEvent, rowSelectEvent, rowUnhighlightEvent, rowUnselectEvent, rowUpdateEvent, selectionModeChange, sortedByChange summaryChange tableBlurEvent tableClickEvent tableDblclickEvent tableFocusEvent tableKeyEvent tableMousedownEvent tableMouseoutEvent tableMouseoverEvent tableMouseupEvent tableMsgHideEvent tableMsgShowEvent tbodyFocusEvent tbodyKeyEvent theadCellClickEvent theadCellDblclickEvent theadCellMousedownEvent theadCellMouseoutEvent theadCellMouseoverEvent theadCellMouseupEvent theadFocusEvent theadKeyEvent theadLabelClickEvent theadLabelDblclickEvent theadLabelMousedownEvent theadLabelMouseoutEvent theadLabelMouseoverEvent theadLabelMouseupEvent theadRowClickEvent theadRowDblclickEvent theadRowMousedownEvent theadRowMouseoutEvent theadRowMouseoverEvent theadRowMouseupEvent undisableEvent unselectAllCellsEvent unselectAllRowsEvent

Configuration Attributes

COLOR_COLUMNFILLER - String

CSS color value assigned to header filler on scrollable tables.
Default Value: "#F2F2F2"

height - String

Table body height for scrollable tables, not including headers.

width - String

Table width for scrollable tables. Note: When setting width and height at runtime, please set height first.


Copyright © 2008 Yahoo! Inc. All rights reserved.